Multiple Hosts under one service, getting alerts for all

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

Multiple Hosts under one service, getting alerts for all

Post 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 ?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

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

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

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

Post 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
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

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

Post by sujitt »

All the hosts are directly app,lied on the service definition and not a host group
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post by lmiltchev »

Can you show us the "Click_XMAP" service definitions for the three hosts?
Be sure to check out our Knowledgebase for helpful articles and solutions!
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

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

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

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

Post 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.
Former Nagios employee
jwelch
Posts: 225
Joined: Wed Sep 05, 2012 12:49 pm

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

Post 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)
sujitt
Posts: 132
Joined: Thu Apr 25, 2013 1:50 pm

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

Post 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.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

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

Post by sreinhardt »

Correct, the hardcoded IP was resulting in all systems showing as down. locking this up for now.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked