Using Nagios XI I am monitoring a URL (ping / http / dns check etc) - I have selected the option to check 'Web Page Content' - in the 'Content String To Expect:' I have typed the work Zebra (as a test) knowing that this word does not appear anywhere on the page of the site being monitored. When Nagios checks the URL it passes the Web Page Content check as successful and i am confused as to why?
Any ideas would be much appreciated.
Web Page Content Check Query
Re: Web Page Content Check Query
There is probably something wrong with your definition...or you do have a zebra out there...
Try running a check from the command line to see if it will pass. See an example bellow:
Try running a check from the command line to see if it will pass. See an example bellow:
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Web Page Content Check Query
Thanks for your response, i'll test your command line suggestion.
Just for clarity, through the XI gui in the section, 'Content String To Expect' once you have selected 'Web Page Content' you do enter a word that you want Nagios to check is apparent on the page it is monitoring i.e. you dont enter code etc...?
Thanks again
Just for clarity, through the XI gui in the section, 'Content String To Expect' once you have selected 'Web Page Content' you do enter a word that you want Nagios to check is apparent on the page it is monitoring i.e. you dont enter code etc...?
Thanks again
Re: Web Page Content Check Query
Go to the Core Config Manager->Monitoring->Services and filter the results through the "Config name filter" by selecting your host. Click on "Modify" Action button next to the "Web Page Content" service. Under the "Common Settings" tab you can see the "Command view", which should look like this:
$USER1$ is basically your plugins folder - "/usr/local/nagios/libexec"
To test your check command from the command line, go to your plugins folder:
and run:
where you substitute $HOSTADDRESS$ and $ARG1$ with the appropriate values (you can see the $ARG1$ under the "Common Settings" tab)
Here is our documentation on how to check commands from the command line:
http://support.nagios.com/wiki/index.ph ... mmand-line
Once, your command is working from the command line, you can modify your existing check command through the Core Config Manager.
Code: Select all
$USER1$/check_http -H $HOSTADDRESS$ $ARG1$To test your check command from the command line, go to your plugins folder:
Code: Select all
# cd /usr/local/nagios/libexecCode: Select all
# ./check_http -H $HOSTADDRESS$ $ARG1$Here is our documentation on how to check commands from the command line:
http://support.nagios.com/wiki/index.ph ... mmand-line
Once, your command is working from the command line, you can modify your existing check command through the Core Config Manager.
Be sure to check out our Knowledgebase for helpful articles and solutions!