Re: Missing character in plugin output
Bret Cason <Bret_Cason-okLH5SSHHyRWk0Htik3J/[email protected]>
| Newsgroups | gmane.network.nagios.plugins.devel |
|---|---|
| Message-ID | <B2A66A3EC4241D448CE79CFBEFA638EE026768E22F@TUS1XCHEVSPIN39.SYMC.SYMANTEC.COM> |
What does 'View Config' say for that service?
After selecting the 'Check Command' for that service, you will see how the command is constructed.
Maybe you need an additional $ARG2$ or something. The output is acting like ${HDTEMP} is (null).
Best Regards.
From: Mark Clayton [mailto:[email protected]]
Sent: Monday, January 16, 2012 2:39 PM
To: nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [Nagiosplug-devel] Missing character in plugin output
I put together a bash script to use as a plugin. It is to monitor a hard drive temperature via hddtemp on a linux box. I based the script on check_log. The interesting bits are:
<snip>
HDTEMP=$(/user/sbin/hddtemp $DRIVE | awk '{ print $4}' | awk -F '°' '{ print $1}')
<snip>
/bin/echo "($DRIVE)=${HDTEMP} C."
<snip>
The command line output looks fine:
root@little-harbor:/home/mark# /usr/lib/nagios/plugins/check_hddtemp -d /dev/sda
(/dev/sda)=36 C.
But Firefox and Safari show:
Disk Temperature<http://little-harbor.local/cgi-bin/nagios3/extinfo.cgi?type=2&host=localhost&service=Disk+Temperature>
OK
2012-01-16 13<tel:2012-01-16%2013>:14:55
0d 4h 8m 22s
1/4
(/dev/sda)= C.
The machine details are:
Ubuntu 11.10
Nagios core 3.2.3
Nagios plugins 1.4.15
Apache 2.2.20
Does anyone have any thoughts?
Thanks,
Mark
--
claytoncapers.blogspot.com<http://claytoncapers.blogspot.com>
www.mark-clayton.com<http://www.mark-clayton.com>
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________________
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