Page 1 of 1

Setup Nagios dependencies to monitor a service on a Windows

Posted: Thu Nov 24, 2022 6:12 am
by MonatalBrowink
I'm having difficulties setting up nagios dependencies so I only receive notifications if the host is up (Pingable).

My host cfg file is as follow:

# Configuration file /etc/nagios/adagios/hosts/dp-front.cfg
# Edited by PyNag on Wed Nov 11 16:38:15 2015

define host {
alias Ditmas Park Front Desk
use windows-server
host_name dp-front
max_check_attempts 2
check_command check-host-alive
check_period workhours
notification_period workhours

define service{
use generic-service
host_name dp-front
service_description Medical Records
check_command check_nt!PROCSTATE!-d SHOWALL -l Robocopy.exe
notification_interval 0
max_check_attempts 1

define servicedependency{
host_name localhost
service_description PING
dependent_host_name localhost
dependent_service_description PING
execution_failure_criteria c
notification_failure_criteria w,u,c

Nagios is monitoring the service correctly and I omegle shagle voojio receive notifications all the time when the service go down. I'm just not sure how to setup the "servicedependency" section of it.

I'd really appreciate your help as always.