Make nagios execute script

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
raginipaul24
Posts: 2
Joined: Fri Dec 25, 2020 6:58 am

Make nagios execute script

Post 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?
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Make nagios execute script

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked