Hello There,
I have recently added Event Handler for few service checks to execute a script with set of instructions.
I just want to check if there is any way to find out if the Event Handler kicked in?
Thank You,
Sampath.
Is there a way to check if Event Handler kicked in?
-
Sampath.Basireddy
- Posts: 252
- Joined: Wed Dec 14, 2016 12:30 pm
-
kyang
Re: Is there a way to check if Event Handler kicked in?
Is your event handler a bash script?
If not, either way, you could add a message at the end of your event handler and send that .txt to /tmp on your Nagios Server.
Here's the example from the event handler guide.
This is showing when the file was updated last.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
I hope this helps!
If not, either way, you could add a message at the end of your event handler and send that .txt to /tmp on your Nagios Server.
Here's the example from the event handler guide.
Code: Select all
#!/bin/bash
DATE=$(date)
echo "The host has changed state at $DATE" > /tmp/hostinfo.txtCode: Select all
ll /tmp/hostinfo.txt
-rw-r--r-- 1 nagios nagios 31 Jan 4 12:34 /tmp/hostinfo.txt
I hope this helps!