Page 1 of 1

Nagios command for check_http and check_http_content comman

Posted: Wed Dec 11, 2013 12:11 am
by vinoth_selvam
All ,

can some one share few command to check the url of the pages in check_http and check_http_content .

Regards
vinoth

Re: Nagios command for check_http and check_http_content com

Posted: Wed Dec 11, 2013 11:30 am
by abrist
You can display the usage for a plugin with "--help". From the nagios server:

Code: Select all

/usr/local/nagios/libexec/check_http --help
check_http will check to see if a url exists and then match a string (optional).
The command definition usually looks like:

Code: Select all

define command {
       command_name                             check_http
       command_line                             $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}
Where $ARG1$ includes all options - thresholds, string checks, etc.

Re: Nagios command for check_http and check_http_content com

Posted: Wed Dec 11, 2013 11:37 am
by tmcdonald
Can you be a bit more specific?

If you just want to check if a URL is reachable:

Code: Select all

check_http -H www.nagios.org -u "/about"
If you are looking for a specific string in a page:

Code: Select all

check_http -H www.nagios.org -u "/about" -s "monitoring"