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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gdolidze
Posts: 154
Joined: Tue Apr 07, 2015 10:07 am

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

Post by gdolidze »

How can i make nagios run a script remotely when oracle alert goes away.(Oracle comes backup) Like connection time.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked