Start service event handler only on specific nodes

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
galliar
Posts: 5
Joined: Wed Nov 28, 2012 11:31 am

Start service event handler only on specific nodes

Post by galliar »

Hello,

Subject: Start event handler only on specific nodes

I am using Nagios Core 4.0.8. I have a service that monitors drive C usage on Windows Systems. The service have an event handler attached:

define service{
use generic-service
host_name hostname
service_description Drive C: Auto Clean
check_command check_nt!USEDDISKSPACE!-l c -w 92 -c 95
event_handler CustPurgeFiles
}

I would like that event handler to run only on certain systems. Is there a way to specifiy this, or do I need a separate service for C drive monitoring that doesn’t use the even_handler directive?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Start service event handler only on specific nodes

Post by Box293 »

There is no way to do what you want with just one service, you'll need separate services.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
galliar
Posts: 5
Joined: Wed Nov 28, 2012 11:31 am

Re: Start service event handler only on specific nodes

Post by galliar »

Thank you,

I appreciate your quick reply.

Regards,

Randy.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Start service event handler only on specific nodes

Post by hsmith »

Is there anything else we can do to help you with this one?
Former Nagios Employee.
me.
Locked