Re: question about check_log2.pl

lists <[email protected]>
Newsgroups gmane.network.nagios.plugins.devel
Message-ID <CAFWLKdczd+h0vmwwjj0x1Y88fPDUcAeaTEXz2OQLqr9itsRa3A@mail.gmail.com>
On 27 February 2013 02:36, Willis Ralph <[email protected]> wrote:

> ** **
>
> Hi,****
>
> ** **
>
> I have been making use of check_log2.pl. It works fine. When I ran it
> from the command line on my Nagios server the output is correct.****
>
> ** **
>
> ** **
>
> /usr/local/nagios/libexec/check_nrpe -H server111   -c check_logfiles****
>
> ** **
>
> This brings back ****
>
> ** **
>
> ** **
>
> WARNING: (3): [LOG|ERROR|27 Feb 2013
> 10:52:36,683|com.example.Bean|Worker-2|-]****
>
> ** **
>
> ** **
>
> 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  ****
>
> ** **
>
> [LOG|****
>
> ** **
>
> Is there a way to make Nagios display the complete line ?****
>
> **
>


This will be becouse Nagios treats anything after a | in the output of a
check as performance data.
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.


e.g. In the version of check_log2.pl.i have the output line looks like this:

        print "($pattern_count): $pattern_line";

you could try

        print "($pattern_count): \"$pattern_line\"";

--
Regards,
Ritchie

 **
>
> Regards,****
>
> Willis****
>
> ** **
>
> *Willis Ralph* | Systems Administrator
> ASX Limited | 20 Bridge Street | Sydney  NSW  2000
> *t:*  +61 2 9227 0661 |* **m:* 0417 652755 |* **e: *
> *w:*  www.asx.com.au ****
>
> *P** **Please consider the environment before printing this email* ****
>
>
>
>
>
>
>
>
> ****
>
> ** **
>
> 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.
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________________
> Nagios Plugin Development Mailing List
> Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> Unsubscribe at
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb

_______________________________________________________
Nagios Plugin Development Mailing List Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.