I have multiple machines that I need to look for the string "Diagnostics" on a website. These machines are all identical and running the same web service. I have one machine working fine but would like to setup a service template using the check_xi_service_http check command. Currently my check looks like this: $USER1$/check_http -H $HOSTADDRESS$ $ARG1$ with the $ARG1$ as -s "Diagnostics" -f ok -I <MACHINE IP> -u "/" -p <PORT NUMBER>
The <MACHINE IP> is what I am trying to use a variable for to use the Host Address. The <PORT NUMBER> would always be the same but this might be nice to have as a variable as well.
I figure once I get this all working I could do the same for several other checks I have for multiple machines and instead of using separate checks for each and every host place the service check within a service template. Others I am trying to do this with are the DNS service check $USER1$/check_dns -H $HOSTADDRESS$ $ARG1$ using -a <MACHINE IP>
check_xi_service_http multiple checks
Re: check_xi_service_http multiple checks
For the check_http command, you could omit the -I if you do not want to check a certain IP address. This could affect the check if you are using load balancing for your web site. Without the IP address, you wouldn't know which one of the servers you are checking.
Description for the -I option.
-I, --IP-address=ADDRESS
IP address or name (use numeric address if possible to bypass DNS lookup).
For the check_dns command, the -a is optional, see below.
-a, --expected-address=IP-ADDRESS|HOST
Optional IP-ADDRESS you expect the DNS server to return. HOST must end with
a dot (.). This option can be repeated multiple times (Returns OK if any
value match). If multiple addresses are returned at once, you have to match
the whole string of addresses separated with commas (sorted alphabetically).
If you would like to test for the presence of a cname, combine with -n param.
Would either of these work for you?
Description for the -I option.
-I, --IP-address=ADDRESS
IP address or name (use numeric address if possible to bypass DNS lookup).
For the check_dns command, the -a is optional, see below.
-a, --expected-address=IP-ADDRESS|HOST
Optional IP-ADDRESS you expect the DNS server to return. HOST must end with
a dot (.). This option can be repeated multiple times (Returns OK if any
value match). If multiple addresses are returned at once, you have to match
the whole string of addresses separated with commas (sorted alphabetically).
If you would like to test for the presence of a cname, combine with -n param.
Would either of these work for you?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_xi_service_http multiple checks
From my initial testing I believe that will work.
Thanks!
Thanks!
Re: check_xi_service_http multiple checks
No problem. I'll close the ticket for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!