I am trying to configure http check for nagios status on different server using -S, I can get response by manually but not into nagios.

root@ubuntu: /usr/local/nagios/libexec$ ./check_http -H servername -u ‘/nagios/cgi-bin/status.cgi’ -w 10 -c 30 -t 60 -p 443 -a nagios:XXXXX -S
HTTP CRITICAL: - HTTP/1.1 200 OK - 33.824 second response time |time=33.824371s;10.000000;30.000000;0.000000 size=1608091B;;;0

but I am using same command into nagios command.cfg file its giving me this output.

Current Status: UNKNOWN (for 0d 0h 0m 4s)
Status Information: Usage: check_http -H
-w ] -c ] -t ] -L]
-a auth] -f <ok
Performance Data: -I -u ] -p ] warn | critcal | follow>] -e ] -s string] -l] -r | -R ] -P string] -m <min_pg_size>:<max_pg_size>] -4|-6] -N] -M ] -A string] -k string] -S] -C ] -T ]
Current Attempt: 1/4 (HARD state)

I have tried with whole url servername/nagios/cgi-bin/status.cgi but no luck. Thanks for any help.


33 seconds response time?! that’s a lot…

what’s the service conifg? and the relevant commands.cfg part?


Thanks for your reply but I found the solution. there was $ character into my password so I just put one more $ with that for escaping. And use -N for not to reading whole contains.