[mrtg] Monitor octets in a sting

BitnByte daniel.olsson at plastal.com
Fri Jul 30 12:11:59 CEST 2010


Hi

I am having problems with an octet string. I am trying to monitor the
ambient on an IBM RSA II card with the OID: .1.3.6.1.4.1.2.3.51.1.2.1.5.1
The return answer is an string with this definition from IBM MIB for this
RSA II card
System's ambient temperature in degrees centigrade(C).
 This is surrounding temperature where the system is installed.
 An octet string expressed as 'sddd.dd Centigrade' where:
 s is the sign ('-' for negative or blank space for positive)
 d is a decimal digit or blank space for a leading zero..
 The string 'Not Readable!' indicates that the given monitor
 is not supported on this system.

so I get the result "  20.00 Centigrade" right now but MRTG don't seem to
handle it ?
(Nagios handles the return string perfect that is running om the same host
as MRTG (Linux).)

My cfg looks like
# rsa-esx-shamn01 - temp - io
YLegend[rsa-esx-shamn01-temp-io]: temperature in Celsius
Options[rsa-esx-shamn01-temp-io]: growright,gauge,nopercent,absolute
Target[rsa-esx-shamn01-temp-io]:
.1.3.6.1.4.1.2.3.51.1.2.1.5.1&.1.3.6.1.4.1.2.3.51.1.2.1.5.1:public at rsa-esx-shamn01
MaxBytes[rsa-esx-shamn01-temp-io]: 45
Unscaled[rsa-esx-shamn01-temp-io]: dwmy
Title[rsa-esx-shamn01-temp-io]: rsa-esx-shamn01 - ioBoard Temp
ShortLegend[rsa-esx-shamn01-temp-io]: C
Legend1[rsa-esx-shamn01-temp-io]: in next minute
Legend2[rsa-esx-shamn01-temp-io]: in next minute
Legend3[rsa-esx-shamn01-temp-io]: Maximal 5 Minute
Legend4[rsa-esx-shamn01-temp-io]: Maximal 5 Minute
LegendI[rsa-esx-shamn01-temp-io]:  
LegendO[rsa-esx-shamn01-temp-io]:  
PageTop[rsa-esx-shamn01-temp-io]: <H1>rsa-esx-shamn01 - ioBoard temp</H1>

The log says:
2010-07-30 12:05:02 -- SNMPGET Problem for .1.3.6.1.4.1.2.3.51.1.2.1.5.1
.1.3.6.1.4.1.2.3.51.1.2.1.5.1 sysUptime sysName on
public at rsa-esx-shamn01::::::v4only
 at /usr/local/mrtg-2/bin/mrtg line 2202
2010-07-30 12:05:28 -- 2010-07-30 12:05:28: ERROR:
Target[rsa-esx-shamn01-temp-io][_IN_] ' $target->[0]{$mode} ' did not eval
into defined data
2010-07-30 12:05:28 -- 2010-07-30 12:05:28: ERROR:
Target[rsa-esx-shamn01-temp-io][_OUT_] ' $target->[0]{$mode} ' did not eval
into defined data

I am using MRTG version 2.16.2

Can this be handlen within mrtg scripts or do I need an perl script to
handle this string ?.
Does anyone have an solution for my issue ?

Any help is appreciated

// Daniel
-- 
View this message in context: http://mrtg-mailinglists.795376.n2.nabble.com/Monitor-octets-in-a-sting-tp5354431p5354431.html
Sent from the MRTG Users Mailinglist mailing list archive at Nabble.com.



More information about the mrtg mailing list