Page 1 of 1

Executing a command after throwing an alert

Posted: Tue Jun 15, 2021 5:29 am
by jliewhm
Hi Nagios Support Team,

I have a plugin written in bash script that I use to monitor the NTP time on my servers. I would like to know how can I go about running a command like ntpdate -u to update the NTP time on the monitored host when an alert is triggered indicating that the NTP time is out of sync on the monitored host.

Thank You.
Best Regards,
Jason

Re: Executing a command after throwing an alert

Posted: Tue Jun 15, 2021 2:05 pm
by gsmith
Hi Jason,

Take a look at this and see if it helps you out

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

Thanks

Re: Executing a command after throwing an alert

Posted: Tue Jun 15, 2021 11:05 pm
by jliewhm
Thanks gsmith!

Looks like what I'm looking for. I'll give it a go.

Best Regards,
Jason

Re: Executing a command after throwing an alert

Posted: Wed Jun 16, 2021 10:06 am
by gsmith
Cool.

Let me know if you need help, or if you get it working so I can close this out.

Thanks!