event handler

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.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: event handler

Post by vvz »

file test.txt was not created, so no output. If you have a look at my script I've already tried to debug this way, there is touch command in case "$3". That's the reason my saying that script is not called at all from commands.cfg
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: event handler

Post by abrist »

Ahh. It will only run the event handler on state change (or on every check if volatility is set). Is the host changing HARD states?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: event handler

Post by vvz »

I run event handler script on DOWN SOFT 3, yes it's changing to HARD on next check and I get email
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: event handler

Post by abrist »

Yeah, it looks like the event handler does run:
HOST EVENT HANDLER: test-condor-site;DOWN;HARD;4;asteriks-host-phone-call
But neither the touched file nor the txt file are created, is that correct?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
vvz
Posts: 187
Joined: Wed Oct 30, 2013 5:15 pm

Re: event handler

Post by vvz »

I've solved the problem. It was completely my fault with configs.
Nagios is great!!!!
Thank you for your help, I really appreciate it.
Locked