<div dir="ltr">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.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 3, 2015 at 7:32 AM, Schimpke, Dr. Thomas - bhn <span dir="ltr"><<a href="mailto:Schimpke.Thomas@bhn-services.com" target="_blank">Schimpke.Thomas@bhn-services.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Just to clarify: the use of inheritance is somewhat "historical". I can<br>
work around the problem using something like<br>
<br>
define servicedependency {<br>
<span class=""><br>
host_name cordelia<br>
<br>
service_description Snmp Daemon<br>
</span> dependent_service_description ewrm FS,smb FS, ...<br>
<br>
execution_failure_criteria u,c,p<br>
notification_failure_criteria u,c,p<br>
}<br>
<br>
Its somewhat clearer (and shorter) anyway. Downside is, that I have to<br>
change so many services (2000 or so).<br>
<span class="HOEnZb"><font color="#888888"><br>
Thomas<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Wed, 2015-06-03 at 16:20 +0200, Schimpke, Dr. Thomas - bhn wrote:<br>
> Hi,<br>
><br>
> I'm trying to migrate my nagios installation to naemon. It seems, that<br>
> it is not possible to inherit servicedependencies. What I want to do is<br>
> something like that:<br>
><br>
> define servicedependency {<br>
> name dependSnmpdCordelia<br>
> register 0<br>
><br>
> host_name cordelia<br>
><br>
> service_description Snmp Daemon<br>
><br>
> execution_failure_criteria u,c,p<br>
> notification_failure_criteria u,c,p<br>
> }<br>
><br>
> and then later something like e.g.<br>
><br>
> define servicedependency {<br>
> use dependSnmpdCordelia<br>
> dependent_service_description ewrm FS<br>
> }<br>
><br>
> If I try to verify the configuration the error message is<br>
><br>
> Processing object config file '/etc/naemon/conf.d/cordelia.cfg'...<br>
> Warning: Duplicate definition found for service dependency<br>
> 'dependSnmpdCordelia' (config file '/etc/naemon/conf.d/cordelia.cfg',<br>
> starting on line 127)<br>
> Error: Could not add object property in file<br>
> '/etc/naemon/conf.d/cordelia.cfg' on line 131.<br>
> Error processing object config files!<br>
><br>
> Normal servicedependency definitions (i.e. without inheritance) seem to<br>
> work fine.<br>
><br>
> Is this a bug or has there been a change I'm not aware of ?<br>
><br>
> Kind regards,<br>
><br>
> Thomas<br>
><br>
<br>
</div></div></blockquote></div><br></div>