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:
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…
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.
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.
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>