Multiple service dependencies

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

Multiple service dependencies

Post by TSCAdmin »

Dear Nagios support,

We are using SNMP to monitor most of our Linux infrastructure.

To avoid raising and sending multiple alerts if SNMP failed or stopped we defined servicedependencies, example:

Code: Select all

define servicedependency {
       dependent_host_name                      server1.example.com
       dependent_service_description            atd,Cron,Disk Monitor,ntpd,syslog,sysstat,xinet
       host_name                                server1.example.com
       service_description                      SNMP
       inherits_parent                          1
       execution_failure_criteria               w
       notification_failure_criteria            w,u,c
}
Now, we are going to implement NRPE too to monitor additional services. Again, if NRPE fails we don't want to raise multiple alerts but only one stating that NRPE has failed. I tried to import the service dependency file with following config:

Code: Select all

define servicedependency {
       dependent_host_name                      server1.example.com
       dependent_service_description            Current Users,Disk Monitor /boot,Load Average
       host_name                                server1.example.com
       service_description                      NRPE
       inherits_parent                          1
       execution_failure_criteria               w
       notification_failure_criteria            w,u,c
}
When I checked servicedependencies.cfg file it kept only the first version and NRPE dependency was missing. I tried again by putting both the configurations in the same file and imported again. Unfortunately, it did not work this time too and kept only the SNMP dependency version.

I understand that one way to overcome this is:

Code: Select all

CCM -> Advanced -> Service Dependencies -> Add New -> and then use different config name
but this is not a good solution in my case since we have got over 500 servers and it would take lifetime to define all the service dependencies.

Is there another way to fix this by being able to define multiple service dependencies for a host?

Thanks in advance.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Multiple service dependencies

Post by scottwilkerson »

Just to clarify you do have all of the services that are specified in the new dependency already configured correct?

Is all of the capitalization correct?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

Re: Multiple service dependencies

Post by TSCAdmin »

That is correct, Scott. We do have all the services in the new dependency being configured and monitored. The capitalization is also correct for NRPE and the dependent services. I just verified it again.

Is there any other information required from my side?

Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Multiple service dependencies

Post by scottwilkerson »

Just to clarify, are you importing them by placing them in the /usr/local/nagios/etc/import directory?

And if so, can you also clarify that you are able to successfully apply configuration without errors at
Configure -> CCM -> Apply Configuration
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

Re: Multiple service dependencies

Post by TSCAdmin »

scottwilkerson wrote:Just to clarify, are you importing them by placing them in the /usr/local/nagios/etc/import directory?
Yes that is correct, I imported the configurations mentioned in my first post. Firstly, one by one and secondly both of them together.
scottwilkerson wrote:And if so, can you also clarify that you are able to successfully apply configuration without errors at
Configure -> CCM -> Apply Configuration
The apply configuration finished without any errors, so the configuration was applied successfully.

How do we resolve this?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Multiple service dependencies

Post by scottwilkerson »

I have confirmed there is a bug in the way the importer imports service dependencies, and have posted a bug to our tracker
http://tracker.nagios.com/view.php?id=289

As a solution for the time being you can place your dependency files (that you wanted to import) in the /usr/local/nagios/etc/static directory for the time being and they will be used by Nagios, you just will not be able to modify them in the editor.
Last edited by scottwilkerson on Fri Sep 07, 2012 3:20 pm, edited 1 time in total.
Reason: updating tracker link
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked