To be honest, I have had similar problems on one or two occasions in the last year and a half and it's always been something subtly wrong in configuration. Nagios only executes the plugin the same way that you would from the command line, so I'm not sure about a difference of environment variables. If I recall correctly, the environment variables should be reset by Nagios, so perhaps if you are relying on them then that is your problem, but this seems less likely to me.
You could try doing a "su - nagiosuser" and then removing all environment variables and then re-running the plugin exactly as it appears in your definitions taking your macros into account. Remember that $HOSTADDRESS$ is not hostname but ip address specified in your hosts configuration file. Then the test should be closer to what you are actually getting Nagios to do. -h Hari Sekhon zack kenton wrote: > Hi Hari > > Unforutnately the nagios user has no problem runnign the script from the > command line, and I believe that the proper IP of the UPS has been provided > in service definition. The snmp agent on the UPS just doesnt seem to like > nagios. Could it be some sort of environmental variable? > > > - zack kenton (zkenton) > > ----------------------- > This thread is located in the archive at this URL: > http://www.nagiosexchange.org/nagios-users.34.0.html?&tx_maillisttofaq_pi1[showUid]=5870 > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Nagios-users mailing list > [email protected] > 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 > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Nagios-users mailing list [email protected] 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
