Service Dependencies

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
parisa
Posts: 62
Joined: Tue Sep 25, 2018 3:18 am

Service Dependencies

Post by parisa »

Hi,
I have around 500 hosts, that they are checked as passive check (SNMP Trap), I have some services for any host. some of the services are related to each other, I configure service dependencies for the services on all of hosts. But the dependencies don't work.
For example, I have a host : "Dezful PC-AGG4" and have services " FCS_ERROR, LCAS_PLCR, LCAS_PLCT, LCAS_TLCR, LCAS_TLCT, AU_AIS" and any service uses from an event-handler and I have defined service dependencies for the host and the services as below:

Code: Select all

define servicedependency {
    # config_name                    Fiber_Alarms_Dezful PC-AGG4_1
    dependent_host_name              Dezful PC-AGG4
    dependent_service_description    FCS_ERROR,LCAS_PLCR,LCAS_PLCT,LCAS_TLCR,LCAS_TLCT
    host_name                        Dezful PC-AGG4
    service_description              AU_AIS
    inherits_parent                  1
    execution_failure_criteria       n
    notification_failure_criteria    w,u,c,
    dependency_period                24x7
}

define servicedependency {
    # config_name                    Fiber_Alarms_Dezful PC-AGG4_2
    dependent_host_name              Dezful PC-AGG4
    dependent_service_description    FCS_ERROR,LCAS_PLCR,LCAS_PLCT,LCAS_TLCR
    host_name                        Dezful PC-AGG4
    service_description              LCAS_TLCT
    inherits_parent                  1
    execution_failure_criteria       n
    notification_failure_criteria    w,u,c,
    dependency_period                24x7
}

define servicedependency {
    # config_name                    Fiber_Alarms_Venous-KR1L411032_2 _3
    dependent_host_name              Dezful PC-AGG4
    dependent_service_description    FCS_ERROR,LCAS_PLCR,LCAS_PLCT
    host_name                        Dezful PC-AGG4
    service_description              LCAS_TLCR
    inherits_parent                  1
    execution_failure_criteria       n
    notification_failure_criteria    w,u,c,
    dependency_period                24x7
}

define servicedependency {
    # config_name                    Fiber_Alarms_Dezful PC-AGG4_4
    dependent_host_name              Dezful PC-AGG4
    dependent_service_description    FCS_ERROR,LCAS_PLCT
    host_name                        Dezful PC-AGG4
    service_description              LCAS_PLCR
    inherits_parent                  1
    execution_failure_criteria       n
    notification_failure_criteria    w,u,c,
    dependency_period                24x7
}

define servicedependency {
    # config_name                    Fiber_Alarms_Dezful PC-AGG4_5
    dependent_host_name             Dezful PC-AGG4
    dependent_service_description    FCS_ERROR
    host_name                        Dezful PC-AGG4
    service_description              LCAS_PLCT
    inherits_parent                  1
    execution_failure_criteria       n
    notification_failure_criteria    w,u,c,
    dependency_period                24x7
}
but when two alarms LCAS_PLCR,LCAS_PLCT were generated for the host, two event-handlers were run.

would you please guide me about the problem.
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Service Dependencies

Post by benjaminsmith »

Hi @Parisa,

In this example, the following dependency will make set LCAS_PLCT as a dependent service of LCAS_PLCR.

Code: Select all

define servicedependency {
    # config_name                    Fiber_Alarms_Dezful PC-AGG4_4
    dependent_host_name              Dezful PC-AGG4
    dependent_service_description    FCS_ERROR,LCAS_PLCT
    host_name                        Dezful PC-AGG4
    service_description              LCAS_PLCR
    inherits_parent                  1
    execution_failure_criteria       n
    notification_failure_criteria    w,u,c,
    dependency_period                24x7
}
However, the execution_failure_criteria is set to none. This directive is used to specify the criteria that determine when the dependent service should not be actively checked. So in this case, LCAS_PLCT should still be actively checked.

Go to Home > Incident Management > Notifications and upload the report for Dezful PC-AGG4 during this time period to verify which services notifications were sent on.

Thanks
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
parisa
Posts: 62
Joined: Tue Sep 25, 2018 3:18 am

Re: Service Dependencies

Post by parisa »

@benjaminsmith Thanks for your answer

I don't have any records in "Incident Management > Notifications", because I don't configure notification hosts,I don't need to notification right now, but
I wanted to monitor some services on the hosts as passive check, when a trap is received for a service that changes state of it, event-handler of the service is run.
I have different scripts for the event-handlers. I have defined dependencies because I wanted not to run the event-handlers for dependent services when I have alarm on main services.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Service Dependencies

Post by benjaminsmith »

Hi Parisa,

Service dependencies are used to restrict active checks and notifications for services, and passive checks are not restricted by service dependencies. So in this case with passive checks, service dependencies will not affect the execution of event handlers. I've done some research and short of using customs scripts, there's not a simple workaround.

The Nagios Core documentation contains a detailed explanation of the functionality of service dependencies.

Host and Service Dependencies

Let me know if you have any questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked