parsing log files on remote hosts
Marc Powell
marc at ena.com
Fri Apr 17 17:15:58 CEST 2009
On Apr 17, 2009, at 9:35 AM, kaouther mechri wrote:
> Hello All,
>
> I am seraching a way to parse some application log files on remote
> hosts and grep for specific words, I need to add this as a nagios
> check.
You've seen answers on how to handle the remote communication. As far
as the log parsing, you're not the first to want to do that. check_log
is included in the standard plugins and there are others I am aware of
that can be found by searching Nagios Exchange or the web.
# Usage: ./check_log <log_file> <old_log_file> <pattern>
#
# Description:
#
# This plugin will scan a log file (specified by the <log_file> option)
# for a specific pattern (specified by the <pattern> option).
Successive
# calls to the plugin script will only report *new* pattern matches in
the
# log file, since an copy of the log file from the previous run is saved
# to <old_log_file>.
--
Marc
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Nagios-users mailing list
Nagios-users at 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
More information about the Users
mailing list