garbage characters being returned in scripts

Yueh-Hung Liu yuehung.liu at gmail.com
Thu Jul 21 03:09:31 CEST 2011


run this script on the HP machine manually as the user as nrpe will be.
check what will happen.

On Thu, Jul 21, 2011 at 7:05 AM, Rick Garland <Rick.Garland at quantum.com> wrote:
> Hi all:
>
>
>
> Got a Nagios 3.2.3 server running on RHEL 5.5.
>
> Installed plugins include pnp4nagios 0.6.13 & rrdtools 1.4.5
>
>
>
> I  made some custom scripts that include the use of sar. A snippet;
>
>
>
> WAITIO=`sar -u 1 3 | grep Average | awk '{print $4}'`
>
> CRIT=50
>
>
>
> echo "%waitio = $WAITIO | /=$WAITIO%;;$CRIT;0;100\r"
>
> exit 0
>
>
>
> When executing this script via nrpe to a Linux client, all is OK. When the
> same check is performed against HPUX 11v2 or HPUX 11v3,
>
> there is garbage in the output and it gets placed into the XML file in the
> <NAGIOS_LONGSERVICEOUTPUT>, this results in the parsing error
>
> when trying to display the graph. Edit the XML file and take out the garbage
> then the graph displays fine, until next update.
>
>
>
> Here is the output after piped to cat –etv.
>
> [nagios at nagserver ~]$ check_nrpe -H hostname -c 'check_HPwait' | cat -etv
>
> %waitio = 2 | /=2%;;50;0;100^M$
>
> $
>
> M-(wM-}M-3M-^XwM-}M-3M-^X@^AM-_M-l@$
>
> [nagios at nagserver ~]$
>
>
>
> Anybody know where that garbage is coming from on HPUX? Anybody know how to
> fix it?
>
>
>
> Many thanks
>
>
>
> ________________________________
> The information contained in this transmission may be confidential. Any
> disclosure, copying, or further distribution of confidential information is
> not permitted unless such privilege is explicitly granted in writing by
> Quantum. Quantum reserves the right to have electronic communications,
> including email and attachments, sent across its networks filtered through
> anti virus and spam software programs and retain such messages in order to
> comply with applicable data security and retention requirements. Quantum is
> not responsible for the proper and complete transmission of the substance of
> this communication or for any delay in its receipt.
>
> ------------------------------------------------------------------------------
> 10 Tips for Better Web Security
> Learn 10 ways to better secure your business today. Topics covered include:
> Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
> security Microsoft Exchange, secure Instant Messaging, and much more.
> http://www.accelacomm.com/jaw/sfnl/114/51426210/
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting
> any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>

------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list