Monitoring a URL - wrong address being used
Posted: Mon May 13, 2019 12:14 pm
We have a host being monitored using NRPE, let's call it server1. Attached to that same host, we are monitoring several URLs that are being hosted on server1 (e.g. http://www.website1.com, http://www.website2.com, etc.). If we view these checks in the CCM, the "check command" being used is "check_https_url." In the $ARG1$ field, the URL is shown.
This is a basic check, and doesn't actually tell us if there is a problem with the website (for example, if the page loads, but is 404, the check will still succeed).
We are monitoring another host using NRPE, let's call it server2. Server2 also has a couple website checks attached to it. I'm pretty sure these were done using the "Website" Configuration Wizard, and then the option for "Web Page Content" was selected. A string was input to check for, so that even if the page loads, but it is 404 or some other error, the check won't succeed. If we view these checks in the CCM, the "check command" being used is "check_xi_service_http." In the $ARG1$ field, we have the string that we are looking for, along with the IP address of the website (not the URL, for some reason). Note, the IP of the website is different from the IP of the host (server2), even though they are both on the same box.
If I try to use the same wizard, or even duplicate the service check in the CCM, and change it so that we are on server1, it never works. It ignores the IP of the website we want to check (specified in $ARG1$), and uses the IP of the host (server1).
How can I check a website for a certain string, but have it attached to the host that serves it, even if that host is being monitored using a different IP address? I'd be fine with monitoring the website using the URL and not the IP, but the wizard always seems to take the URL I type in and changes it (in the service check) to the IP (not that it actually uses that IP. It seems to only use the IP of the host itself for the check. Very odd.).
This is a basic check, and doesn't actually tell us if there is a problem with the website (for example, if the page loads, but is 404, the check will still succeed).
We are monitoring another host using NRPE, let's call it server2. Server2 also has a couple website checks attached to it. I'm pretty sure these were done using the "Website" Configuration Wizard, and then the option for "Web Page Content" was selected. A string was input to check for, so that even if the page loads, but it is 404 or some other error, the check won't succeed. If we view these checks in the CCM, the "check command" being used is "check_xi_service_http." In the $ARG1$ field, we have the string that we are looking for, along with the IP address of the website (not the URL, for some reason). Note, the IP of the website is different from the IP of the host (server2), even though they are both on the same box.
If I try to use the same wizard, or even duplicate the service check in the CCM, and change it so that we are on server1, it never works. It ignores the IP of the website we want to check (specified in $ARG1$), and uses the IP of the host (server1).
How can I check a website for a certain string, but have it attached to the host that serves it, even if that host is being monitored using a different IP address? I'd be fine with monitoring the website using the URL and not the IP, but the wizard always seems to take the URL I type in and changes it (in the service check) to the IP (not that it actually uses that IP. It seems to only use the IP of the host itself for the check. Very odd.).