16 lines
395 B
16 lines
395 B
#!/bin/bash
|
|
|
|
case $1 in
|
|
queue_local)
|
|
/usr/bin/qmqtool -s | perl -ne 'm/^Messages with local recipients: (\d+)/ && print $1'
|
|
;;
|
|
queue_remote)
|
|
/usr/bin/qmqtool -s | perl -ne 'm/^Messages with remote recipients: (\d+)/ && print $1'
|
|
;;
|
|
queue_total)
|
|
/usr/bin/qmqtool -s | perl -ne 'm/^Total messages in queue: (\d+)/ && print $1'
|
|
;;
|
|
*)
|
|
echo 'ZBX_NOTSUPPORTED'
|
|
;;
|
|
esac
|
|
|