Page 1 of 2
All standard VM checks dependent on NRPE service change
Posted: Tue May 03, 2016 9:21 am
by philip.ianni
I've read documentation but I'm afraid Im not doing this right.
I'm running Nagios XI and Im looking to make the services on a particular host be dependent on the services tied to that host.
In in Service Dependancies, I've added all the relevant hostgroups, and NRPE.
I've left dependent hosts and hostgroups blank, then I've put the names of the other services that depend on NRPE in "Service Dependancies".
Is this correct?
Re: All standard VM checks dependent on NRPE service change
Posted: Tue May 03, 2016 10:22 am
by bwallace
This looks right- if I'm following you correctly. Is there any particular step here which arouses suspicion and doubt?
Here is a 78 second tutorial on configuring Service Dependencies, perhaps it will clear a few things up if you haven't already seen it.
https://www.youtube.com/watch?v=U_vWdRtCtPI
Re: All standard VM checks dependent on NRPE service change
Posted: Tue May 03, 2016 12:45 pm
by lmiltchev
philip.ianni, go to CCM->Advanced->Service Dependencies, click on the "View Text Config" actions button on the right (the diskette icon), and show us the text config.
Re: All standard VM checks dependent on NRPE service change
Posted: Tue May 03, 2016 7:26 pm
by Box293
https://support.nagios.com/kb/article.php?id=505
Make sure your master service goes down HARD before the dependent services.
Re: All standard VM checks dependent on NRPE service change
Posted: Wed May 04, 2016 9:36 am
by philip.ianni
My only doubt is when I actually save my settings and apply my configuration, then go back that same configuration, it seems Nagios is automatically removing all dependant service except my CPU stats.
To verify that this is just not a visual glitch, by viewing "/usr/local/nagios/etc/servicedependencies.cfg" I can see that CPU stats is indeed the only service listed in this.
define servicedependency {
# config_name NRPE Dependency for Trusted, Governed, and Linux Tools
dependent_service_description CPU Stats
hostgroup_name Governed VMs,Linux Tools Vms,SHS - UAT - HOSTS [formerly QA-NEXT],Trusted Environment
service_description NRPE
inherits_parent 1
execution_failure_criteria w,u,c,p,
notification_failure_criteria w,u,c,p,
dependency_period 24x7
}
Maybe I have to make a dependency individually for each base VM service?
Re: All standard VM checks dependent on NRPE service change
Posted: Wed May 04, 2016 4:28 pm
by Box293
Dependencies can get a bit confusing, lets check this first.
Can you do the following.
Look at the file /usr/local/nagios/var/objects.cache
Search for your dependencies in this file. Can you post them please, there may be more than one.
Re: All standard VM checks dependent on NRPE service change
Posted: Thu May 05, 2016 4:12 pm
by philip.ianni
Code: Select all
define servicedependency {
host_name subversion - inhoci03
service_description NRPE
dependent_host_name subversion - inhoci03
dependent_service_description CPU Stats
dependency_period 24x7
inherits_parent 1
notification_failure_options w,u,c,p
}
[/icode]
The file basically contains one of the above for each host configured in my system. This is a good sign however its only for the "CPU Stats" service, and now I want to do it for the rest of them. Im guessing that you cant handle more than one dependent service in the above declaration alone, you have to define another dependency for each of my services. In other words, in the XI gui, keep copying the existing service dependency and replace CPU stats with another base VM check until I have all services covered?
Thanks
Re: All standard VM checks dependent on NRPE service change
Posted: Thu May 05, 2016 4:53 pm
by Box293
What version of XI is this? I want to see if this is a bug.
Re: All standard VM checks dependent on NRPE service change
Posted: Thu May 12, 2016 1:56 pm
by philip.ianni
This is on 5.2.2
I believe the same thing is happening on our older Nagios box as well (version 2014R2.7)
Re: All standard VM checks dependent on NRPE service change
Posted: Thu May 12, 2016 4:17 pm
by lmiltchev
The file basically contains one of the above for each host configured in my system. This is a good sign however its only for the "CPU Stats" service, and now I want to do it for the rest of them. Im guessing that you cant handle more than one dependent service in the above declaration alone, you have to define another dependency for each of my services. In other words, in the XI gui, keep copying the existing service dependency and replace CPU stats with another base VM check until I have all services covered?
This shouldn't be the case. I am not able to recreate the issue. I was able to add a few dependent services under the CCM with "one go". Here's what my service dependency config looks like:
Code: Select all
define servicedependency {
# config_name test
dependent_host_name CentOS6-NRPE
dependent_service_description / Disk Usage,APICHECK,CPU Stats,Load,Open Files
host_name CentOS6-NRPE
service_description Ping
inherits_parent 1
execution_failure_criteria w,c,
notification_failure_criteria w,c,
dependency_period 24x7
}
Are your services added to more than one host, hostgroup, or a service group? Can you post the service configs for a review?