I was wondering if anyone could help me with a issue I have with a snmp data query.
I attempted to make my own graphs for a qnap device, using this (somewhat dated) tutorial: https://docs.cacti.net/manual:100:3a_ad ... alkthrough
I did manage to make another graph template for the fans, but for the hdd temps I kind of hit an wall... I get strange data back and I can't figure out why.
I pasted here snmptable output:
Code: Select all
user@host:~$ snmptable -m ALL -v2c -c public 10.1.0.10 .1.3.6.1.4.1.24681.1.2.11
Bad operator (INTEGER): At line 73 in /usr/share/snmp/mibs/ietf/SNMPv2-PDU
SNMP table: NAS-MIB::systemHdTable
hdIndex hdDescr hdTemperature hdStatus hdModel hdCapacity hdSmartInfo
1 "HDD1" "-- C/-- F" noDisk "--" "--" "--"
2 "HDD2" "-- C/-- F" noDisk "--" "--" "--"
3 "HDD3" "-- C/-- F" noDisk "--" "--" "--"
4 "HDD4" "-- C/-- F" noDisk "--" "--" "--"
5 "HDD5" "29 C/84 F" ready "WD2002FFSX-68PF8N0" "1.82 TB" "GOOD"
6 "HDD6" "29 C/84 F" ready "WD2002FFSX-68PF8N0" "1.82 TB" "GOOD"
7 "HDD7" "29 C/84 F" ready "WD2002FFSX-68PF8N0" "1.82 TB" "GOOD"
8 "HDD8" "28 C/82 F" ready "WD2002FFSX-68PF8N0" "1.82 TB" "GOOD"
This is my snmp data query xml
Code: Select all
<interface>
<name>Get NAS-MIB::systemHdTable Information</name>
<description>Get SNMP based Fan Information out of NAS-MIB::systemHdTable</description>
<index_order>hdDescr:hdIndex</index_order>
<index_order_type>numeric</index_order_type>
<oid_index>.1.3.6.1.4.1.24681.1.2.11.1.1</oid_index>
<oid_num_indexes>.1.3.6.1.4.1.24681.1.2.10.0</oid_num_indexes>
<fields>
<hdIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.24681.1.2.11.1.1</oid>
</hdIndex>
<hdDescr>
<name>Description</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.24681.1.2.11.1.2</oid>
</hdDescr>
<hdTemperature>
<!-- Sample value: "27 C/80 F" -->
<name>Temperature</name>
<method>walk</method>
<source>value</source>
<direction>input-output</direction>
<oid>.1.3.6.1.4.1.24681.1.2.11.1.3</oid>
</hdTemperature>
<hdTemperatureC>
<!-- Sample value: "27 C/80 F" -->
<name>Temperature in Celsius</name>
<method>walk</method>
<source>VALUE/REGEX:((?:\+|-)?\s*\d+(?:\.\d+)?)\s*C\/(?:\+|-)?\s*(?:\+|-)?\s*\d+(?:\.\d+)?\s*F</source>
<direction>input-output</direction>
<oid>.1.3.6.1.4.1.24681.1.2.11.1.3</oid>
</hdTemperatureC>
<hdTemperatureF>
<!-- Sample value: "27 C/80 F" -->
<name>Temperature in Fahrenheit</name>
<method>walk</method>
<source>VALUE/REGEX:(?:\+|-)?\s*\d+(?:\.\d+)?\s*C\/((?:\+|-)?\s*(?:\+|-)?\s*\d+(?:\.\d+)?)\s*F</source>
<direction>input-output</direction>
<oid>.1.3.6.1.4.1.24681.1.2.11.1.3</oid>
</hdTemperatureF>
<hdStatus>
<name>Status</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.24681.1.2.11.1.4</oid>
</hdStatus>
<hdModel>
<name>Model</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.24681.1.2.11.1.5</oid>
</hdModel>
<hdCapacity>
<name>Capacity</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.24681.1.2.11.1.6</oid>
</hdCapacity>
<hdSmartInfo>
<name>Smart Info</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.24681.1.2.11.1.7</oid>
</hdSmartInfo>
</fields>
</interface>
Any help or suggestions would be greatly appreciated.