Executing a command after throwing an alert

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jliewhm
Posts: 6
Joined: Sat Aug 15, 2020 8:26 pm

Executing a command after throwing an alert

Post 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
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Executing a command after throwing an alert

Post 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
jliewhm
Posts: 6
Joined: Sat Aug 15, 2020 8:26 pm

Re: Executing a command after throwing an alert

Post by jliewhm »

Thanks gsmith!

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

Best Regards,
Jason
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Executing a command after throwing an alert

Post by gsmith »

Cool.

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

Thanks!
Locked