<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Arial Narrow";
        panose-1:2 11 6 6 2 2 2 3 2 4;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:EN-AU;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-AU link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Thanks for the help.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>The extra quotes didn’t help , Nagios still removes the string at the first “|”<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Your post made me think and I ended up changing the  $pattern_line before it is sent to Nagios.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>my $x = '\|';<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>        $pattern_line =~ s/$x/*/g;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>        print "($pattern_count): $pattern_line";<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>This code changed the | to a * which solved my problem<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Thanks for the help<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'>Willis<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> lists [mailto:lists@catsnest.co.uk] <br><b>Sent:</b> Wednesday, 27 February 2013 11:07 PM<br><b>To:</b> Nagios Plugin Development Mailing List<br><b>Subject:</b> Re: [Nagiosplug-devel] question about check_log2.pl<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-family:"Courier New"'><br clear=all></span><o:p></o:p></p><div><p class=MsoNormal>On 27 February 2013 02:36, Willis Ralph <<a href="mailto:Willis.Ralph@asx.com.au" target="_blank">Willis.Ralph@asx.com.au</a>> wrote:<o:p></o:p></p><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Hi,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>I have been making use of <a href="http://check_log2.pl" target="_blank">check_log2.pl</a>. It works fine. When I ran it from the command line on my Nagios server the output is correct.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>/usr/local/nagios/libexec/check_nrpe -H server111   -c check_logfiles</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>This brings back </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>WARNING: (3): [LOG|ERROR|27 Feb 2013 10:52:36,683|com.example.Bean|Worker-2|-]</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>The trouble is that the Nagios monitoring screen output in the Status Information field treats the first “| “ as a delimiter and truncates the output  to  </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>[LOG|</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Is there a way to make Nagios display the complete line ?</span><o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br><br>This will be becouse Nagios treats anything after a | in the output of a check as performance data.<br>You will need to etit the script to work with your data, I think if the output is quoted the | will be ignored, if that does not work try urlencoding it instead.<br><br><br>e.g. In the version of <span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><a href="http://check_log2.pl" target="_blank">check_log2.pl</a>.i have the output line looks like this:<br><br></span>        print "($pattern_count): $pattern_line";<br><br>you could try <br><br>        print "($pattern_count): \"$pattern_line\"";<br><br>--<br>Regards,<br>Ritchie<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Regards,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Willis</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif"'>Willis Ralph</span></b> <span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif"'>| Systems Administrator</span> <br><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif"'>ASX Limited | 20 Bridge Street | Sydney  NSW  2000 </span><br><b><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";color:gray'>t:</span></b> <span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif"'> +61 2 9227 0661 |</span><b> </b><b><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";color:gray'>m:</span></b><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif"'> 0417 652755 |</span><b> </b><b><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";color:gray'>e: </span></b><br><b><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";color:gray'>w:</span></b><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif"'>  <a href="http://www.asx.com.au" target="_blank">www.asx.com.au</a></span> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span lang=EN-US style='font-size:18.0pt;font-family:Webdings;color:green'>P</span></b><b><i><span lang=EN-US> </span></i></b><b><i><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";color:green'>Please consider the environment before printing this email</span></i></b> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><br><br><br><br><br><br><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div><pre>PRIVACY COLLECTION STATEMENT<o:p></o:p></pre><pre>ASX uses and discloses your personal information only for the purpose for<o:p></o:p></pre><pre>which you provided it. Your personal information will not be disclosed or used<o:p></o:p></pre><pre>for any other purpose unless you consent or ASX is otherwise permitted to do<o:p></o:p></pre><pre>so under the Privacy Act 1988 (Cth).<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>CONFIDENTIAL EMAIL<o:p></o:p></pre><pre>The information in this email is confidential and may be privileged or subject<o:p></o:p></pre><pre>to copyright. It is intended for the exclusive use of the addressee(s). If you <o:p></o:p></pre><pre>are not an addressee, do not copy, distribute or otherwise act on the email. <o:p></o:p></pre><pre>If you have received the email in error, please contact the sender immediately <o:p></o:p></pre><pre>and delete the email.  The unauthorised use of this email may result in <o:p></o:p></pre><pre>liability for breach of confidentiality, privilege or copyright. E-mail <o:p></o:p></pre><pre>transmissions cannot be guaranteed to be secure or error-free as information <o:p></o:p></pre><pre>could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, <o:p></o:p></pre><pre>or contain viruses. The sender therefore does not accept liability for errors <o:p></o:p></pre><pre>or omissions in the contents of this message which arise as a result of e-mail<o:p></o:p></pre><pre>transmission.<o:p></o:p></pre></div><p class=MsoNormal><br>------------------------------------------------------------------------------<br>Everyone hates slow websites. So do we.<br>Make your web apps faster with AppDynamics<br>Download AppDynamics Lite for free today:<br><a href="http://p.sf.net/sfu/appdyn_d2d_feb" target="_blank">http://p.sf.net/sfu/appdyn_d2d_feb</a><br>_______________________________________________________<br>Nagios Plugin Development Mailing List <a href="mailto:Nagiosplug-devel@lists.sourceforge.net">Nagiosplug-devel@lists.sourceforge.net</a><br>Unsubscribe at <a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel</a><br>::: Please include plugins version (-v) and OS when reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<o:p></o:p></p></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div><PRE>

PRIVACY COLLECTION STATEMENT
ASX uses and discloses your personal information only for the purpose for
which you provided it. Your personal information will not be disclosed or used
for any other purpose unless you consent or ASX is otherwise permitted to do
so under the Privacy Act 1988 (Cth).

CONFIDENTIAL EMAIL
The information in this email is confidential and may be privileged or subject
to copyright. It is intended for the exclusive use of the addressee(s). If you 
are not an addressee, do not copy, distribute or otherwise act on the email. 
If you have received the email in error, please contact the sender immediately 
and delete the email.  The unauthorised use of this email may result in 
liability for breach of confidentiality, privilege or copyright. E-mail 
transmissions cannot be guaranteed to be secure or error-free as information 
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, 
or contain viruses. The sender therefore does not accept liability for errors 
or omissions in the contents of this message which arise as a result of e-mail
transmission.
</PRE></body></html>