service dependencies

Support requests, bug reports, questions etc.
User avatar
scrat
NConf enthusiast
NConf enthusiast
Posts: 101
Joined: Mon Aug 23, 2010 16:28
Location: Vienna, Austria
Contact:

service dependencies

Post by scrat » Thu Dec 29, 2011 12:09

Hi,

First of all - many thanks for the NConf 1.3.0 final release - great work!

I've a question regarding service dependencies:
In an alpha version auto generated service dependencies where introduced - do they still exist in NConf 1.3 or did you remove them again?
As I use NRPE for checking, all my NRPE checks should depend on an NRPE-Alive check. So I configured this for all NRPE check commands, but no service dependencies are created for advanced services.
Manually creating a service dependency isn't working as, I can only choose services, but no advanced services.

My solutions for service dependencies on advanced services would be:
Create a new class advanced-service-dependency and create all attributes in the same way as for service-dependency, but link service_description and dependent_service_description to advanced services.
If I do this and my class has the same file name as for service dependencies (service_dependencies.cfg) - will this file be overwritten from my custom class or will my dependecies be appended to this file? It's possible to create a file advanced_service_dependencies.cfg for sure, but I prefere to have all deps in one file if possible.
Is it generally a good idea the have custom classes or can this be a problem when upgrading NConf to the next version?


Thanks,
René

User avatar
agargiulo
NConf developer
NConf developer
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland
Contact:

Re: service dependencies

Post by agargiulo » Mon Jan 02, 2012 05:26

Hi scrat.

1) auto-generated service-dependencies were implemented a while ago and yes, they are part of release 1.3.
As you already stated, service-dependencies are not yet available for advanced-services.

2) without having looked into it in detail, I don't think simply adding an additional class will do the trick, because certain special routines were implemented for the service-dependencies class.

3) you can indeed use tha same config file name for multiple classes. Content will be appended.

4) it's not generally a good idea to define your own classes if they cover functionality we are likely to implement in a later version of NConf

User avatar
scrat
NConf enthusiast
NConf enthusiast
Posts: 101
Joined: Mon Aug 23, 2010 16:28
Location: Vienna, Austria
Contact:

Re: service dependencies

Post by scrat » Tue Jan 10, 2012 15:33

Thanks a lot for your answer.

I tried creating a class for advanced service dependencies, but it didn't work, as the service name instead of the service description was written to service_dependencies.cfg.
After reading the Icinga documentation I found the following solution for creating service dependencies for my advanced services, which are checked via nrpe.

1. Created a static_cfg file service_dependencies.cfg with the following content:

Code: Select all

define servicedependency {
        service_description     NRPE Alive
        dependent_servicegroup_name     nrpe
        execution_failure_criteria      n
        notification_failure_criteria   u,c,p
}


2. Put all advanced services, which are checked via nrpe to the "nrpe" servicegroup.

With the config above all nrpe-checks depend on check-nrpe-alive on the same host and no notifications will be sent out when check-nrpe-alive is unknown, critical or pending.


Regards,
René

User avatar
agargiulo
NConf developer
NConf developer
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland
Contact:

Re: service dependencies

Post by agargiulo » Tue Jan 10, 2012 15:41

Hi.

That's an interesting work-around. Thank you for posting!

Locked