<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C32B38.423EF110">
<title>Nagios check_log help</title>
<!--[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 Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:553679495 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
mso-style-noshow:yes;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:Arial;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:navy;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
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 vlink=purple style='tab-interval:36.0pt'>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><!-- 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># Description:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># to <<span class=SpellE>old_log_file</span>>.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># Output:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># state if *no* pattern matches have been
found in the *difference* between the<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># last entry in the log file which matches
the pattern.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># Notes:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'># 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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<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 size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>#<span style='mso-spacerun:yes'>
</span>because of the way the script operates.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----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:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></p>
<p style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>Hello</span></font> <o:p></o:p></p>
<p style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>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:36.0pt'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>The documentations says:</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>
</span></font><br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Usage:
check_log -F logfile -O oldlog -q query</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Usage:
check_log --help</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Usage:
check_log --version</span></font> <o:p></o:p></p>
<p style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>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:36.0pt'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>I have tried </span></font><br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>#./check_log
-F test_log -q WARNING</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>this
just goves the following
error
</span></font><br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>./check_log:
test: argument expected.</span></font> <o:p></o:p></p>
<p style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>what is the -O for old log?? I only have 1 log file,
is the -O necessary?</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>the
documentation for this plugin is very brief.</span></font> <o:p></o:p></p>
<p style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>Help Apreciated</span></font> <o:p></o:p></p>
<p style='margin-left:36.0pt'><font size=2 face=Arial><span style='font-size:
10.0pt;font-family:Arial'>Stuart</span></font> <o:p></o:p></p>
</div>
</body>
</html>