akp geek wrote: > Dear all - > > We are using nagios. I would like to know if there is a > way notification can be sent if there is a new file created in a > directory? Can you please help?
It's incredibly easy to write a Nagios plugin. The only major requirement is that it return a valid error code so that Nagios can interpret the results. Something like this would work: -- start check_file.sh -- #!/bin/sh # $1 = Full path of filename to watch for $ERRORCODE=0 if [ -e $1 ]; then $ERRORCODE=1 fi exit $ERRORCODE -- end check_file.sh -- ------------------------------------------------------------------------------ _______________________________________________ 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