> I made a plugin that counts mails in particular postfix queues and when > invoke from shell at remote host (mail server) it returns me valid > values on stdout: > > ./check_postfixq.sh -w 30000 -c 50000 -p > OK - total mails in queues: 10606 | mail in queues=10606;30000;50000;0 > > but when I invoke it from Nagios server it always returns 0 as if all > queues are empty: > > ./check_nrpe -H mail.server.hostname -c check_postfixq > OK - total mails in queues: 0 | mail in queues=0;30000;50000;0 > > What's wrong with this plugin? If any configs are necessary or something > I'll provide them. If anyone have any reasonable idea please share.
Two things: 1) Make sure your custom plugin is trapping errors correctly, because I bet that: 2) The user that Nagios is running the plugin as does not have the permissions to look at the mail queue. If you're using NRPE or some other method to run the custom plugin on the remote host, it should be running as a non-privileged user. And typically, non-privileged users cannot see the mail queue... Benny -- "Well, we *could* hunt down the perpetrators, pool some $$, and hire 3 or 4 baseball-bat wielding professional explainers to go explain our position to them. Figuring out how to do so without breaking any laws is the tough part..." -- Valdis Kletnieks, 2009-01-23 ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null