[Nagiosplug-help] check_squid.pl cannot run in Nagios ; works from the CLI

Marc Powell marc at ena.com
Wed Dec 9 21:45:22 CET 2009


On Dec 9, 2009, at 2:35 PM, JKL wrote:

>> I have the same result when run as Nagios.
>> 
>> nagios at abc1234:/usr/local/nagios/libexec$ ./check_squid.pl -u
>> http://www.google.com -p fredprox -l 8080 -e200
>> OK - Status: 200 OK

Then I'm even more confident that you need to specify the FQDN or IP for fredprox in the command{} definition instead of just the hostname 'fredprox'.

>> Here it is with 2>&1
>> nagios at abc1234:/usr/local/nagios/libexec$ ./check_squid.pl -u
>> http://www.google.com -p 10.206.2.131 -l 8080 -e200  2>&1
>> OK - Status: 200 OK

My intention was that you would add the ' 2>&1' to the command_line in the command definition. That will capture any output being sent to STDERR when nagios runs the plugin and you will see it in the logs and web interface.

--
Marc





More information about the Help mailing list