Monitoring a script
Posted: Mon May 12, 2014 4:46 pm
Hello, I have a problem and ask for help to users of this forum. I have a bash script that alerts me on the number of files that are generated in a folder. The script contains 3 outputs : exit 0 : all ok , exit 1 : motion has been detected (indicating that generated file in the folder ) , exit 2 : there are many files. Well, after this, edit the / etc / snmp / snmpd.conf file and add an snmp judgment and invoking the script execution. Then put the nconf nagios alarms and my particular case I use a snmp_check . Well, my problem is that always snmp_check returns the OK message is generated or not files inside the folder. My question is how I can using a nagios plugin , run my script and monitor the status of that folder in real time. For more information the script check the size of the folder where the video capture generated by the daemon motion are kept. Thanks for your help .