<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Nagios check_log help</TITLE>
<META content=Word.Document name=ProgId>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR>
<META content="Microsoft Word 10" name=Originator><LINK
href="cid:filelist.xml@01C32B38.423EF110" rel=File-List><!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<STYLE>@font-face {
font-family: Tahoma;
}
P.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; mso-style-parent: ""; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
P {
FONT-FAMILY: "Times New Roman"; FONT-SIZE: 12pt; MARGIN-LEFT: 0cm; MARGIN-RIGHT: 0cm; mso-pagination: widow-orphan; mso-fareast-font-family: "Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply; mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial
}
SPAN.SpellE {
mso-style-name: ""; mso-spl-e: yes
}
DIV.Section1 {
page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=EN-US link=blue style="tab-interval: 36.0pt" vLink=purple>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=054081812-05062003>Thanks
for the extra info, i see how it should work now,</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=054081812-05062003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=054081812-05062003>but
when i try</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=054081812-05062003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=054081812-05062003>./check_log -F test -O test_log_tmp -q
WARNING</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=054081812-05062003>I get
the same error</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2>./check_log: test: argument
expected</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=054081812-05062003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=054081812-05062003>I have
also tried with full path names.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=054081812-05062003>the
test log file, just contains random lines, with one line reading
WARNING</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=054081812-05062003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=054081812-05062003>does
anyone know what im doing wrong?</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=054081812-05062003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=054081812-05062003>Thanks</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=054081812-05062003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=054081812-05062003>Stuart</SPAN></FONT></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Dean Bishop
[mailto:dbishop@ehvert.com]<BR><B>Sent:</B> 05 June 2003 13:59<BR><B>To:</B>
Webster, Stuart SITI-ITDIUR;
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> RE: [Nagios-users]
Nagios check_log help<BR><BR></DIV></FONT>
<DIV class=Section1>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"><!-- Converted from text/rtf format -->Yes
the -O is necessary for the script to keep track of where it left off.<SPAN
style="mso-spacerun: yes"> </SPAN>The <SPAN class=SpellE>plugin</SPAN>
is a <SPAN class=SpellE>perl</SPAN> script.<SPAN
style="mso-spacerun: yes"> </SPAN>From the in-script
comments:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#
Description:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># This <SPAN
class=SpellE>plugin</SPAN> will scan a log file (specified by the <<SPAN
class=SpellE>log_file</SPAN>> option)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># for a specific
pattern (specified by the <pattern> option).<SPAN
style="mso-spacerun: yes">
</SPAN>Successive<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># calls to the <SPAN
class=SpellE>plugin</SPAN> script will only report *new* pattern matches in
the<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># log file, since an
copy of the log file from the previous run is
saved<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># to <<SPAN
class=SpellE>old_log_file</SPAN>>.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#
Output:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># On the first run of
the <SPAN class=SpellE>plugin</SPAN>, it will return an OK state with a
message<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># of "Log check data
initialized".<SPAN style="mso-spacerun: yes"> </SPAN>On successive runs,
it will return an OK<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># state if *no*
pattern matches have been found in the *difference* between
the<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># log file and the
older copy of the log file.<SPAN style="mso-spacerun: yes"> </SPAN>If
the <SPAN class=SpellE>plugin</SPAN> detects any<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># pattern matches in
the log diff, it will return a CRITICAL state and
print<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># out a message is
the following format: "(x) <SPAN class=SpellE>last_match</SPAN>", where "x" is
the<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># total number of
pattern matches found in the file and "<SPAN class=SpellE>last_match</SPAN>"
is the<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># last entry in the
log file which matches the pattern.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#
Notes:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"># If you use this
<SPAN class=SpellE>plugin</SPAN> make sure to keep the following in
mind:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes"> </SPAN>1.<SPAN
style="mso-spacerun: yes"> </SPAN>The "<SPAN
class=SpellE>max_attempts</SPAN>" value for the service should be 1, as
this<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes">
</SPAN>will prevent <SPAN class=SpellE>Nagios</SPAN> from retrying the service
check (the<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes">
</SPAN>next time the check is run it will not produce the same
results).<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes"> </SPAN>2.<SPAN
style="mso-spacerun: yes"> </SPAN>The "<SPAN
class=SpellE>notify_recovery</SPAN>" value for the service should be 0, so
that<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes">
</SPAN><SPAN class=SpellE>Nagios</SPAN> does not notify you of "recoveries"
for the check.<SPAN style="mso-spacerun: yes">
</SPAN>Since<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes">
</SPAN>pattern matches in the log file will only be reported once and
not<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes">
</SPAN>the next time, there will always be "recoveries" for the service,
even<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes">
</SPAN>though recoveries really don't apply to this type of
check.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes"> </SPAN>3.<SPAN
style="mso-spacerun: yes"> </SPAN>You *must* supply a different
<<SPAN class=SpellE>old_file_log</SPAN>> for each service
that<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes">
</SPAN>you define to use this <SPAN class=SpellE>plugin</SPAN> script - even
if the different services<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes">
</SPAN>check the same <<SPAN class=SpellE>log_file</SPAN>> for pattern
matches.<SPAN style="mso-spacerun: yes"> </SPAN>This is
necessary<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt">#<SPAN
style="mso-spacerun: yes">
</SPAN>because of the way the script operates.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT color=navy face=Arial size=2><SPAN
style="COLOR: navy; FONT-FAMILY: Arial; FONT-SIZE: 10pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face=Tahoma size=2><SPAN
style="FONT-FAMILY: Tahoma; FONT-SIZE: 10pt">-----Original
Message-----<BR><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Webster,
Stuart SITI-ITDIUR [mailto:Stuart.Webster@shell.com] <BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> June 5, 2003 7:19 AM<BR><B><SPAN
style="FONT-WEIGHT: bold">To:</SPAN></B>
nagios-users@lists.sourceforge.net<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [Nagios-users] Nagios check_log
help</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN-LEFT: 36pt"><FONT face="Times New Roman"
size=3><SPAN style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P style="MARGIN-LEFT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Hello</SPAN></FONT>
<o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Could some body please help me
with this plugin, and explain what the proper command line arguments
should be.</SPAN></FONT> <o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">The documentations
says:</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">
</SPAN></FONT><BR><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Usage: check_log -F logfile -O
oldlog -q query</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Usage: check_log
--help</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Usage: check_log
--version</SPAN></FONT> <o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">i presume -F is the log file I
want to check, and -q is the string I am searching the log for.</SPAN></FONT>
<o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">I have tried
</SPAN></FONT><BR><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">#./check_log -F test_log -q
WARNING</SPAN></FONT> <BR><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">this just goves the following
error
</SPAN></FONT><BR><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">./check_log: test: argument
expected.</SPAN></FONT> <o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">what is the -O for old log?? I
only have 1 log file, is the -O necessary?</SPAN></FONT> <BR><FONT face=Arial
size=2><SPAN style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">the documentation for
this plugin is very brief.</SPAN></FONT> <o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Help Apreciated</SPAN></FONT>
<o:p></o:p></P>
<P style="MARGIN-LEFT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-FAMILY: Arial; FONT-SIZE: 10pt">Stuart</SPAN></FONT>
<o:p></o:p></P></DIV></BLOCKQUOTE></BODY></HTML>