[naemon-users] naemon 1.0.3 and inheritance of servicedependencies

Scott Lillibridge scott.lillibridge at gmail.com
Wed Jun 3 17:21:07 CEST 2015


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
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/naemon-users/attachments/20150603/42f0f0b9/attachment.html>


More information about the Naemon-users mailing list