Services dependancy

Robert Bossecker nagios-u-rb at bossecker.de
Fri Jan 21 05:17:39 CET 2005


Andreas Ericsson wrote:

> Bergström Sebastian wrote:
>
>> Hi!
>>
>> I think Vincent Alloos question is interesting... Can you set
>> dependencies between service checks? Like for instance, when using
>> check_nt - can you define that if a service check doesn't get through
>> for any reason the next service check on the host will not be run?
>>
>
> Yes you can, but you'd have to type more than you want, and the result 
> wouldn't most likely be what you want. Instead, you would want to 
> disable notifications for the other services until any of them return 
> OK. This would be easier to implement if the config could handle 
> something like classes, where one service is 'master' of other 
> services (it can be done with servicedependencies too, but not in a 
> very intuitive way).
>
we use service dependencies a lot to prevent from hauling about all 
other services which are checked via
one service.
Is this feature somewhere available to build a 'master' for other services??
I have setup nagios 2.0b1

Actual we have for every host several servicedependencies which i can 
now reduce hopefully to at least one servicedependency definition using 
service patterns. After reducing the service definitions more than 50% 
by using wildcards and regexps i also want to get rid of dependency 
definitions for standard situations.
As i understand the documentation i can actually define a 
servicedependency using wildcards for the
host_name and the dependent_host_name which i suppose to rely the 
service of all expanded hosts from dependent_host_name on the service on 
all hosts expanded from host_name

But to reduce them more, the config parser should have some "Macro" like 
'thishost' which
may have the semantik to create separate servicedependency definitions 
according to specific host matched by a
host pattern. e.g.

define servicedependency{
        host_name                       ^host1
        service_description             remote_checkd
        dependent_host_name             ^host1
        dependent_service_description   raid
        execution_failure_criteria      c,u     ; These are the criteria 
for which check execution will be supressed
        notification_failure_criteria   c,u     ; These are the criteria 
for which notifications will be supressed
        }

may turn into
define servicedependency{
        host_name                       ^host.*
        service_description             remote_checkd
        dependent_host_name             $thishost$
        dependent_service_description   raid
        execution_failure_criteria      c,u     ; These are the criteria 
for which check execution will be supressed
        notification_failure_criteria   c,u     ; These are the criteria 
for which notifications will be supressed
        }

which means when there are host1 host2 host3 and so on
that the internal expanded version should look like:

define servicedependency{
        host_name                       host1
        service_description             remote_checkd
        dependent_host_name             host1
        dependent_service_description   raid
        execution_failure_criteria      c,u     ; These are the criteria 
for which check execution will be supressed
        notification_failure_criteria   c,u     ; These are the criteria 
for which notifications will be supressed
        }
define servicedependency{
        host_name                       host2
        service_description             remote_checkd
        dependent_host_name             host2
        dependent_service_description   raid
        execution_failure_criteria      c,u     ; These are the criteria 
for which check execution will be supressed
        notification_failure_criteria   c,u     ; These are the criteria 
for which notifications will be supressed
        }
define servicedependency{
        host_name                       host3
        service_description             remote_checkd
        dependent_host_name             host3
        dependent_service_description   raid
        execution_failure_criteria      c,u     ; These are the criteria 
for which check execution will be supressed
        notification_failure_criteria   c,u     ; These are the criteria 
for which notifications will be supressed
        }

>>
>> Best regards, Sebastian Bergstroem
>>
>> -----Original Message----- From: Andreas Ericsson [mailto:ae at op5.se]
>>  Sent: den 19 januari 2005 16:19 To:
>> nagios-users at lists.sourceforge.net Subject: Re: [Nagios-users]
>> Services dependancy
>>
>> Alloo, Vincent wrote:
>>
>>> Hello, We are using Nagios 1.2 to monitor thousand of servers for
>>> few services. Very helpful tool !! Here is my question: - for
>>> server1..150 (hostgroup1), I have 3 services: ping, service1, 
>>> service2 How can I setup Nagios to check service1 and service2 only
>>> if ping is OK?
>>
>>
>>
>> Assuming you're using ping to check if the host is alive, you don't
>> have to do anything at all. They will all depend on the host-check
>> returning OK, or notifications will be supressed.
>>
>>
>



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list