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.
Can anyone help me
kind regards
kaouther
--
Stay on top of
On Fri, Apr 17, 2009 at 10:35 PM, kaouther mechri kmec...@gmail.com 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.
Can anyone help me
kind regards
kaouther
#!/bin/bashLOGFILE=/tmp/logfile
WORD=word_to_find
GREP=/bin/grep
found=`$GREP -i $WORD $LOGFILE`
if [ -z $found ] ## $found is zero bytes
then
ok=1
RETSTRING=0 ## To be used for the exit code
LINE=No instances found
else
ok=0
RETSTRING=1
LINE=$found
fi
echo $LINE
exit $RETSTRING
##
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
...@gmail.com]
Envoyé : vendredi 17 avril 2009 17:00
À : kaouther mechri
Cc : Nagios-users@lists.sourceforge.net
Objet : Re: [Nagios-users] parsing log files on remote hosts
#!/bin/bash
LOGFILE=/tmp/logfile
WORD=word_to_find
GREP=/bin/grep
found=`$GREP -i $WORD $LOGFILE`
if [ -z $found
On Friday 17 April 2009 16:35:08 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.
Can anyone help me
kind regards
kaouther
check_logfiles is really nice.
You can