'Website Monitoring Wizard' and check_xi_service_dns
Posted: Tue Mar 26, 2013 4:29 pm
I just added website monitoring to a couple of URLs and started getting DNS IP Match alerts.
Looking into it. It seems that the check_dns command uses $HOSTNAME$ and check_xi_service_dns uses $HOSTADRESS$
check_dns $USER1$/check_dns -H $HOSTNAME$ $ARG1$
check_xi_service_dns $USER1$/check_dns -H $HOSTADDRESS$ $ARG1$
The wizard used check_xi_service_dns and added '-a <ip>' as $ARG1$ (where <ip> is the ip address of the webserver).
This resulted in the command being fed the address and tried to compare the hostname to the IP Address resulting in a mismatch.
(something like found <hostname> expected <ip>)
I changed the service check to use check_dns since I really wanted it to use the hostname and look for the correct IP.
This part of the wizard appears to be what caused the mismatch:
I'm guessing it should either call check_dns or use $hostname instead of $ip for $ARG1$....or maybe it's just something out of whack on my system, though I *think* I'm using current verisions of XI and wizards. (website wizard is version 1.2)
Looking into it. It seems that the check_dns command uses $HOSTNAME$ and check_xi_service_dns uses $HOSTADRESS$
check_dns $USER1$/check_dns -H $HOSTNAME$ $ARG1$
check_xi_service_dns $USER1$/check_dns -H $HOSTADDRESS$ $ARG1$
The wizard used check_xi_service_dns and added '-a <ip>' as $ARG1$ (where <ip> is the ip address of the webserver).
This resulted in the command being fed the address and tried to compare the hostname to the IP Address resulting in a mismatch.
(something like found <hostname> expected <ip>)
I changed the service check to use check_dns since I really wanted it to use the hostname and look for the correct IP.
This part of the wizard appears to be what caused the mismatch:
Code: Select all
case "dnsip":
$objs[]=array(
"type" => OBJECTTYPE_SERVICE,
"host_name" => $hostname,
"service_description" => gettext("DNS IP Match"),
"use" => "xiwizard_website_dnsip_service",
"check_command" => "check_xi_service_dns!-a ".$ip."",
"_xiwizard" => $wizard_name,
);
break;