Monitoring Mail Queue With Zenoss
Create a shell script queuecheck.sh
#!/bin/sh
# Below will be used to report back the mail queue stats to zenoss
mailq | head -1 | cut -d'(' -f2 | cut -d' ' -f01
Add the following to the snmpd.conf file and reload snmpd deamon
extend queuecheck /etc/queuecheck.sh
Run snmpwalk will produce the below result and verified by mailq Total request .
#snmpwalk -v2c -c public localhost NET-SNMP-EXTEND-MIB::nsExtendOutputFull
NET-SNMP-EXTEND-MIB::nsExtendOutputFull."queuecheck" = STRING: No of emails in mail queue if zero it will report /var/spool/mqueue
Now add a new template to the Devices which you want to monitor mail queue and use the snmp as datasource and use the above extend result oid to the get the data and create a threshold and attach to the datasource.
You can find more info on adding datasource and threshold in Zenoss Administrative Guide.
No comments:
Post a Comment