[naemon-users] naemon 1.0.3 and inheritance of servicedependencies

Schimpke, Dr. Thomas - bhn Schimpke.Thomas at bhn-services.com
Fri Jun 5 08:48:11 CEST 2015


Hi Scott,

the second dependency simply inherits the first (that'S why there is 
"use dependSnmpdCordelia..."). It works fine with nagios. 
Anyway...I can work around it. I just wanted the developers/ndreas to
know, that there might be an issue with inheritance. But it could also
be intended...

Cheers,

Thomas

On Wed, 2015-06-03 at 08:21 -0700, Scott Lillibridge wrote:
> Just a guess, but wouldn't you need to override the name in your
> second servicedependency? That would be why you are getting the
> duplicate definition error, because it is inheriting the name.
> 
> On Wed, Jun 3, 2015 at 7:32 AM, Schimpke, Dr. Thomas - bhn
> <Schimpke.Thomas at bhn-services.com> wrote:
>         Just to clarify: the use of inheritance is somewhat
>         "historical". I can
>         work around  the problem using something like
>         
>         define servicedependency {
>         
>            host_name             cordelia
>         
>            service_description   Snmp Daemon
>            dependent_service_description ewrm FS,smb FS, ...
>         
>            execution_failure_criteria  u,c,p
>            notification_failure_criteria u,c,p
>         }
>         
>         Its somewhat clearer (and shorter) anyway. Downside is, that I
>         have to
>         change so many services (2000 or so).
>         
>         Thomas
>         
>         
>         On Wed, 2015-06-03 at 16:20 +0200, Schimpke, Dr. Thomas - bhn
>         wrote:
>         > Hi,
>         >
>         > I'm trying to migrate my nagios installation to naemon. It
>         seems, that
>         > it is not possible to inherit servicedependencies. What I
>         want to do is
>         > something like that:
>         >
>         > define servicedependency {
>         >    name                  dependSnmpdCordelia
>         >    register              0
>         >
>         >    host_name             cordelia
>         >
>         >    service_description   Snmp Daemon
>         >
>         >    execution_failure_criteria  u,c,p
>         >    notification_failure_criteria u,c,p
>         > }
>         >
>         > and then later something like e.g.
>         >
>         > define servicedependency {
>         >   use                           dependSnmpdCordelia
>         >   dependent_service_description ewrm FS
>         > }
>         >
>         > If I try to verify the configuration the error message is
>         >
>         > Processing object config file
>         '/etc/naemon/conf.d/cordelia.cfg'...
>         > Warning: Duplicate definition found for service dependency
>         > 'dependSnmpdCordelia' (config file
>         '/etc/naemon/conf.d/cordelia.cfg',
>         > starting on line 127)
>         > Error: Could not add object property in file
>         > '/etc/naemon/conf.d/cordelia.cfg' on line 131.
>         >    Error processing object config files!
>         >
>         > Normal servicedependency definitions (i.e. without
>         inheritance) seem to
>         > work fine.
>         >
>         > Is this a bug or has there been a change I'm not aware of ?
>         >
>         > Kind regards,
>         >
>         > Thomas
>         >
>         
>         
> 
> 



More information about the Naemon-users mailing list