Im a newbie to Nagios. Ive successfully installed the latest version on FC5. Ive installed PNP/ RRDTool and I intgrated Webinject and this all works great.
What I want to do next is add my own plugin. Ive got a PHP script which I would like to be executed by Nagios. So on the hour or whatever Nagios executes this PHP script. So basically Im using Nagios as a scheduler.
If all you want is to have a script run once per hour, use cron, as that’s what cron is for. You can always write the output as a passive service check result to the nagios command file if you want Nagios to process the output from the script.
If you get Nagios to run the script instead as a plugin, it may run give or take once per hour, but won’t always run at the same number of minutes past the hour each time it is run.
Thanks for that. I want to use Nagios cos I get the alerts and I can check availability at the same time. I got the plugin installed and on its own it works fine. but when the php has to execute i get permission problems. ive chown and chgrp also 777 the files and still no luck. The path is correct as when i use alerts in the php ‘cant open file for writing’ they get output to nagios. ive also ‘touch’ files and that didnt help. hmm