Page 1 of 1
Make nagios execute script
Posted: Thu Feb 11, 2021 4:29 am
by raginipaul24
have a php script can read status.dat file and return data at json format in data.json file.
So how can I make nagios core execute a php script in background like the plugins?
Re: Make nagios execute script
Posted: Fri Feb 12, 2021 2:17 pm
by benjaminsmith
Hi,
If you want to actually hook into Nagios Core, then it's necessary to create a Broker Module (using C). There is not much
documentation on the Nagios Event Broker Module (take a look at the source code). The other option would be to use event handlers or set this up as a cron job running on some interval.
https://assets.nagios.com/downloads/nag ... dlers.html