> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:nagios-users- > [EMAIL PROTECTED] On Behalf Of Fabio Iovine > Sent: Monday, October 08, 2007 9:09 AM > To: [email protected] > Subject: [Nagios-users] Monitoring unix (SUN) logfiles... > > hi folks, > I read on the website among the features Nagios can monitor log files but > I was unable to find more precise informations on how it does the > monitoring.
Two scripts are distributed with the plugins -- check_log.sh and contrib/check_log2.pl. Both can search for the presence, or absence in the case of log2.pl, of strings within specified log files. Run them with -h for usage information. > can someone please tell me where I can find these informations? Google's always a good source if the usual suspects aren't helpful. > more, I'd like to understand whether Nagios can monitor file existence? > can someone help on this? If you can determine status from the command line then nagios can do it. Your question really is, has someone created a plugin to do so. I don't see any obvious hits on http://nagiosexchange.org but you should search yourself. A quick search of google for 'nagios check file exists' shows some talk about such a test but no actual plugin, but you should search for yourself. Alternately, this should be a very simple and straightforward plugin to write and would be a great exercise in understanding nagios plugins. A very very basic, one-line plugin might look something like -- #!/bin/sh if [ -f /path/to/file ]; then echo "OK: File exists and is a regular file"; exit 0; else echo "CRITICAL: File not found or is irregular (galactic collision occurred)"; exit 2; fi http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN78 has more information on writing plugins. For the simplest of plugins you really only need to exit with one line of text and the proper return code. -- Marc ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Nagios-users mailing list [email protected] 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
