Is there a way to check if Event Handler kicked in?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Is there a way to check if Event Handler kicked in?

Post by Sampath.Basireddy »

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.
kyang

Re: Is there a way to check if Event Handler kicked in?

Post by kyang »

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.

Code: Select all

#!/bin/bash
DATE=$(date)
echo "The host has changed state at $DATE" > /tmp/hostinfo.txt
This is showing when the file was updated last.

Code: Select all

 ll /tmp/hostinfo.txt
-rw-r--r-- 1 nagios nagios 31 Jan  4 12:34 /tmp/hostinfo.txt
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

I hope this helps!
Locked