Hi, I need to acquire data from a log, parse if and, if a particular condition is met, notify the problem, otherwise just have on nagios the condition. I.e. if number of record (parsed from log) exceeds 1000, trigger an email, otherwise just have on nagios web page "Processed 123 records"
I have written a script that extracts and parse the data, so I can do inside it if [ $RESULT = 0 ] then echo "No records processed" exit 0 elif [ $RESULT -gt $THRESOLD ] then echo "CRITICAL: $RESULT records processed" exit 2 else echo "NORMAL: $RESULT records processed" exit 0 fi where RESULT is the result of the computation and $THRESOLD is passed on command line. I have the following questions: 1) How can I see whether the command is run? 2) How can I see which results are passed to nagios? 3) How can I pass both exit values and the string echoed? Thanks for your help ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null