Community discussions

MUM Europe 2020
 
User avatar
smurphy
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Wed Feb 06, 2008 6:48 pm
Location: Clermont / France
Contact:

Unable to extrac temperature using MRTG from Rb493G ...

Wed Feb 02, 2011 12:17 pm

Hi folks,

I wonder if someone could help me out here.
I have setup the monitoring of my routerboard and am unable to extract the temperature or even voltage using MRTG.

here is the setup:
[smurphy@gw-sollan-RB493G] > /system health print oid
             active-fan: .1.3.6.1.4.1.14988.1.1.3.9.0
                voltage: .1.3.6.1.4.1.14988.1.1.3.8.0
            temperature: .1.3.6.1.4.1.14988.1.1.3.10.0
  processor-temperature: .1.3.6.1.4.1.14988.1.1.3.11.0
[smurphy@gw-sollan-RB493G] > /system health print    
      voltage: 25.3V
  temperature: 49C
Checking with SNMPWalk/SNMPGet works fine from the command line:
smurphy@stargate:~$ snmpwalk -Os -c XXXXXXX -v 1 192.168.2.6 .1.3.6.1.4.1.14988.1.1.3
enterprises.14988.1.1.3.8.0 = INTEGER: 253
enterprises.14988.1.1.3.9.0 = STRING: "n/a"
enterprises.14988.1.1.3.10.0 = INTEGER: 490
smurphy@stargate:~$ snmpget -Os -c XXXXXXXX -v 1 192.168.2.6 .1.3.6.1.4.1.14988.1.1.3.10.0
enterprises.14988.1.1.3.10.0 = INTEGER: 490
Setting this up in mrtg - looks like this:
Target[rb493g_temp]: 1.3.6.1.4.1.14988.1.1.3.10.0&1.3.6.1.4.1.14988.1.1.3.11.0:XXXXXXXXX@192.168.2.6 * 0.1
Title[rb493g_temp]: RB 493G System CPU and Board temperatures
MaxBytes[rb493g_temp]: 100
AbsMax[rb493g_temp]: 200
Options[rb493g_temp]: gauge, unknaszero, nopercent
PageTop[rb493g_temp]: <H1>RB493 System CPU and Board temperatures</H1>
The Error message in the mrtg log looks as following:
SNMPGET Problem for 1.3.6.1.4.1.14988.1.1.3.10.0 1.3.6.1.4.1.14988.1.1.3.11.0 on XXXXXXXX@192.168.2.6::::::v4only
 at /usr/bin/mrtg line 1926
ERROR: Target[rb493g_temp][_IN_] ' $target->[38]{$mode}  * 0.1' (warn): Use of uninitialized value in multiplication (*) at (eval 51687) line 1.
ERROR: Target[rb493g_temp][_OUT_] ' $target->[38]{$mode}  * 0.1' (warn): Use of uninitialized value in multiplication (*) at (eval 51688) line 1.
I admit - the 11.0 should not show up - so the error is valid, however the 10.0 should show up - but it does not...

What am I missing here ?
All the other http://stargate.solsys.org/mod.php?mod= ... ist&host=2 monitored OID's are working nicely
 
bburley
Frequent Visitor
Frequent Visitor
Posts: 81
Joined: Thu Nov 18, 2010 7:22 am
Location: Alberta, Canada

Re: Unable to extrac temperature using MRTG from Rb493G ...

Fri Feb 04, 2011 6:17 am

Does this work?
Target[rb493g_temp]: 1.3.6.1.4.1.14988.1.1.3.10.0&1.3.6.1.4.1.14988.1.1.3.11.0:XXXXXXXXX@192.168.2.6 / 10
 
User avatar
smurphy
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Wed Feb 06, 2008 6:48 pm
Location: Clermont / France
Contact:

Re: Unable to extrac temperature using MRTG from Rb493G ...

Mon Feb 07, 2011 2:05 pm

Oh yes it does. I actually used it before - but the error message remains the same.
I'm using it on various data I get. You can actually tell mrtg to perform a a mathematical operation for exactly the case as mentioned/shown here. This tells mrtg to actually divide the result by 10 - having a usable value.

I'm using it for my NAS, and also for the strength in the wireless transmission - which returns a negative value - so the mtrg can write it into the rrd DB file.

However - I still have issues - as the Monitoring of the wireless cards data is as a chance issue, as for the temperature.
However I have it working from time to time.
 
User avatar
smurphy
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Wed Feb 06, 2008 6:48 pm
Location: Clermont / France
Contact:

Re: Unable to extrac temperature using MRTG from Rb493G ...

Tue Feb 08, 2011 6:18 pm

Actually - it's not only the Temperature I'm having issues with. Also the Tx/Rx-rate and strength for the WiFi Cards are not getting through.
Here the Interface OID:
[smurphy@gw-sollan-RB493G] /interface wireless> print oid
 0 ;;; wlan1 - Wireless LAN
   tx-rate=.1.3.6.1.4.1.14988.1.1.1.1.1.2.10 
   rx-rate=.1.3.6.1.4.1.14988.1.1.1.1.1.3.10 
   strength=.1.3.6.1.4.1.14988.1.1.1.1.1.4.10 
   ssid=.1.3.6.1.4.1.14988.1.1.1.1.1.5.10 
   bssid=.1.3.6.1.4.1.14988.1.1.1.1.1.6.10 
   frequency=.1.3.6.1.4.1.14988.1.1.1.1.1.7.10 
And here what MRTG is telling me.
                  community: "XXXXXX"
                 request ID: 1469690664
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/share/perl5/SNMP_util.pm line 490
SNMPGET Problem for 1.3.6.1.4.1.14988.1.1.1.1.1.4.10 on XXXXXX@192.168.2.6::::::v4only
 at /usr/bin/mrtg line 1923
SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 1 (OID: 1.3.6.1.4.1.14988.1.1.1.1.1.4.10)
SNMPv1_Session (remote host: "192.168.2.6" [192.168.2.6].161)
                  community: "XXXXXX"
                 request ID: 1469690665
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/share/perl5/SNMP_util.pm line 490
SNMPGET Problem for 1.3.6.1.4.1.14988.1.1.1.1.1.4.10 on XXXXXX@192.168.2.6::::::v4only
 at /usr/bin/mrtg line 1923
SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 1 (OID: 1.3.6.1.4.1.14988.1.1.3.11.0)
SNMPv1_Session (remote host: "192.168.2.6" [192.168.2.6].161)
                  community: "XXXXXX"
                 request ID: 1469690673
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/share/perl5/SNMP_util.pm line 490
SNMPGET Problem for 1.3.6.1.4.1.14988.1.1.3.11.0 on XXXXXX@192.168.2.6::::::v4only
 at /usr/bin/mrtg line 1923
ERROR: Target[rb493ah_trans][_IN_] ' $target->[34]{$mode} ' did not eval into defined data
ERROR: Target[rb493ah_trans][_OUT_] ' $target->[34]{$mode} ' did not eval into defined data
ERROR: Target[rb493ah_strength][_IN_] ' $target->[35]{$mode}  * -1' (warn): Use of uninitialize
d value in multiplication (*) at (eval 81) line 1.
ERROR: Target[rb493ah_strength][_OUT_] ' $target->[35]{$mode}  * -1' (warn): Use of uninitializ
ed value in multiplication (*) at (eval 82) line 1.
ERROR: Target[rb493g_temp][_OUT_] ' $target->[39]{$mode}  * 0.1' (warn): Use of uninitialized v
alue in multiplication (*) at (eval 90) line 1.
The mrtg Configuration for the wrong entries are as follow:
Target[rb493ah_strength]: 1.3.6.1.4.1.14988.1.1.1.1.1.4.10&1.3.6.1.4.1.14988.1.1.1.1.1.4.10:XXXXXX@192.168.2.6 * -1
Title[rb493ah_strength]: Singal Strenght
MaxBytes[rb493ah_strength]: 100
AbsMax[rb493ah_strength]: 500
Options[rb493ah_strength]: gauge, integer, unknaszero
PageTop[rb493ah_strength]: <H1>Signal strength</H1>

Target[rb493ah_trans]: 1.3.6.1.4.1.14988.1.1.1.1.1.2.10&1.3.6.1.4.1.14988.1.1.1.1.1.3.10:XXXXXX@192.168.2.6
Title[rb493ah_trans]: tx/rx rates
MaxBytes[rb493ah_trans]: 540000000
AbsMax[rb493ah_trans]: 1080000000
Options[rb493ah_trans]: gauge,integer,unknaszero
PageTop[rb493ah_trans]: <H1>tx/rx rates</H1>

Target[rb493g_temp]: 1.3.6.1.4.1.14988.1.1.3.10.0&1.3.6.1.4.1.14988.1.1.3.10.0:XXXXXX@192.168.2.6 * 0.1
Title[rb493g_temp]: RB 493G System CPU and Board temperatures
MaxBytes[rb493g_temp]: 100
AbsMax[rb493g_temp]: 200
Options[rb493g_temp]: gauge, unknaszero, nopercent
PageTop[rb493g_temp]: <H1>RB493 System CPU and Board temperatures</H1>
Note - that when I perform a snmpwalk on the router (all OID's), I definitle don't get all data available in the snmpwalk output.

Anyone saw that ? A Hint ?
 
User avatar
smurphy
Member Candidate
Member Candidate
Topic Author
Posts: 103
Joined: Wed Feb 06, 2008 6:48 pm
Location: Clermont / France
Contact:

Re: Unable to extrac temperature using MRTG from Rb493G ...

Tue Feb 08, 2011 7:02 pm

Just found the issue for the temperature. Actually - MRTG interpretes the returned Data first, then performs the mathematical operation. hence - data coming in at 540 and my absmax value was set to 200.
Setting it to 2000 fixed the issue. The value is accepted.
However - the tx/rx-tran and strength values still do not come through.
Target[rb493g_temp]: 1.3.6.1.4.1.14988.1.1.3.10.0&1.3.6.1.4.1.14988.1.1.3.10.0:XXXXXX@192.168.2.6 * 0.1
Title[rb493g_temp]: RB 493G System CPU and Board temperatures
MaxBytes[rb493g_temp]: 1000
AbsMax[rb493g_temp]: 2000
Options[rb493g_temp]: gauge, unknaszero, nopercent
PageTop[rb493g_temp]: <H1>RB493 System CPU and Board temperatures</H1>

Who is online

Users browsing this forum: No registered users and 121 guests