Page 1 of 1

Multiple Hosts under one service, getting alerts for all

Posted: Thu Sep 25, 2014 6:09 pm
by sujitt
I have a service setup with 3 hosts.

when service stopped running on one host. we received alerts that other 2 hosts failed. why would that be ?

How do I stop that from happening ?

Re: Multiple Hosts under one service, getting alerts for all

Posted: Fri Sep 26, 2014 9:54 am
by abrist
Can you be a bit more specific about this case?
1) What type of check is this?
2) How are the services applied to the hosts? Through a hostgroup, template, directly defined, etc?
3) Could you post the full check command for the service check?

Re: Multiple Hosts under one service, getting alerts for all

Posted: Fri Sep 26, 2014 10:16 am
by sujitt
Service Definition
Name :Click_XMAP
command : $USER1$/check_http -H $HOSTADDRESS$ $ARG1$
Arg1 : -e "ok" -f ok -I 10.2.55.31 -u '/' -p 50011

Template : xiwizard_website_http_content_service

Hosts : 321 (10.1.10.20)
940 (10.1.2.30)
941 (10.23.2.23)

Service was stopped on 321 . But there were notification received as failed on 940 and 941 too, detail said 10.1.10.20 and port 50011 .


I am using
Nagios XI Version : 2014R1.4
gaatlt83u 2.6.32-358.2.1.el6.x86_64 x86_64
CentOS release 6.4 (Final)
Gnome is not installed


Thanks

Re: Multiple Hosts under one service, getting alerts for all

Posted: Fri Sep 26, 2014 10:18 am
by sujitt
All the hosts are directly app,lied on the service definition and not a host group

Re: Multiple Hosts under one service, getting alerts for all

Posted: Fri Sep 26, 2014 11:06 am
by lmiltchev
Can you show us the "Click_XMAP" service definitions for the three hosts?

Re: Multiple Hosts under one service, getting alerts for all

Posted: Fri Sep 26, 2014 3:54 pm
by sujitt
resolved the issue. My argument ARG1 had IP address hardcoded in it. looks like the http wizard I used planted the Ip in it. I think there should be a change to the wizard to use only $HOSTADDRESS$ macro, because when you add additional hosts then it will stop working.

Re: Multiple Hosts under one service, getting alerts for all

Posted: Fri Sep 26, 2014 4:13 pm
by tmcdonald
I'm seeing the same behavior. I removed the -I <ip address> and it still worked. I will bring this up to the developers and see if it is intentional or if it can be removed.

Re: Multiple Hosts under one service, getting alerts for all

Posted: Sat Sep 27, 2014 4:13 am
by jwelch
I'm guessing if you want it to use an IP instead of the hostname, then the -I <ipaddress> will still be required. But the wizard should probably use $HOSTADDRESS$ instead of hard coding the IP. I now only run those type of wizards once, then modify the service and copy the result the next time just so I don't have to manually change the services after using the wizard. It's actually quicker to copy an existing service in most cases and modify the config name and target host than running the wizard. (if the parameters don't need to be modified)

Re: Multiple Hosts under one service, getting alerts for all

Posted: Mon Sep 29, 2014 7:37 am
by sujitt
I
tmcdonald wrote:I'm seeing the same behavior. I removed the -I <ip address> and it still worked. I will bring this up to the developers and see if it is intentional or if it can be removed.
I think the only change is not to use hard coded values while creating using Wizard. Check_http does work with both options.

Thanks for your response.

Re: Multiple Hosts under one service, getting alerts for all

Posted: Mon Sep 29, 2014 1:41 pm
by sreinhardt
Correct, the hardcoded IP was resulting in all systems showing as down. locking this up for now.