Monitoring a 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
Arnau
Posts: 1
Joined: Mon May 12, 2014 4:24 pm

Monitoring a script

Post by Arnau »

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 .
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Monitoring a script

Post by slansing »

You are going to need to put some more detail into the question.

What do you mean by:
edit the / etc / snmp / snmpd.conf file and add an snmp judgment and invoking the script execution.
What are you putting there?
Then put the nconf nagios alarms and my particular case I use a snmp_check
What are you using to trigger this? What is the command you are using, and the plugin you are using? Are you wrapping your plugin in another?

The below is, again, confusing, what do you mean by this? Are you looking for an alternative to do this that is already created?:
My question is how I can using a nagios plugin
If looking for an alternative I'd recommend searching the exchange:

http://exchange.nagios.org/
Locked