Page 1 of 1

'Website Monitoring Wizard' and check_xi_service_dns

Posted: Tue Mar 26, 2013 4:29 pm
by jwelch
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:

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;
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)

Re: 'Website Monitoring Wizard' and check_xi_service_dns

Posted: Wed Mar 27, 2013 9:29 am
by lmiltchev
You are correct. We will be fixing the wizard. Meanwhile, you can modify your command. Thank you for the feedback!