Page 1 of 1

running script remotely when nagios alert goes green/good/ok

Posted: Tue Jul 02, 2019 3:39 pm
by gdolidze
How can i make nagios run a script remotely when oracle alert goes away.(Oracle comes backup) Like connection time.

Re: running script remotely when nagios alert goes green/goo

Posted: Tue Jul 02, 2019 3:46 pm
by scottwilkerson
Here is a doc on "Introduction to Event Handlers"

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

when you get to the example on page 15 you would change this line

Code: Select all

if [[ "$SERVICESTATETYPE" == "HARD"  && "$SERVICESTATE" == "CRITICAL" ]]; then
to

Code: Select all

if [[ "$SERVICESTATETYPE" == "HARD"  && "$SERVICESTATE" == "OK" ]]; then
This will trigger when changing to OK HARD