Data query : Unable to get index from table
Moderators: Developers, Moderators
Data query : Unable to get index from table
Hello,
I'm trying to make a SNMP indexed data query using the xml file fot the followinf table :
#snmptable -Cb -v 1 -c public myhost LIEBERT-GP-PDU-MIB::lgpPduPsLineTable
SNMP table: LIEBERT-GP-PDU-MIB::lgpPduPsLineTable
Id Line EpLNTenths EpLN Ec EcHundredths EcThrshldUndrAlarm EcThrshldOvrWarn EcThrshldOvrAlarm EcAvailBeforeAlarm EcUsedBeforeAlarm EpLL EpLLTenths EcAvailBeforeAlarmHundredths
1 phase1 2293 0.1 Volts-AC-RMS 229 Volts-AC-RMS 1 0.1 Amps-AC-RMS 18 0.01 Amps-AC-RMS 0 Percent 75 Percent 80 Percent 126 0.1 Amps-AC-RMS 11 0.1 Percent ? ? 1262 0.01 Amps-AC-RMS
1 phase1 2286 0.1 Volts-AC-RMS 228 Volts-AC-RMS 0 0.1 Amps-AC-RMS 0 0.01 Amps-AC-RMS 0 Percent 75 Percent 80 Percent 128 0.1 Amps-AC-RMS 0 0.1 Percent ? ? 1280 0.01 Amps-AC-RMS
I can't see any index for this table as described in many examples on the wikis .... So I can't
populate the <oid_index></oid_index> within the xml file
Do I miss something ?
If not, what would be the way to retrieve fields from the table ? Script query ? Ask the vendor to be compliant ....
Because I could see indexes on its MIB but they are "not-accessible".
Thanks,
Aristide
I'm trying to make a SNMP indexed data query using the xml file fot the followinf table :
#snmptable -Cb -v 1 -c public myhost LIEBERT-GP-PDU-MIB::lgpPduPsLineTable
SNMP table: LIEBERT-GP-PDU-MIB::lgpPduPsLineTable
Id Line EpLNTenths EpLN Ec EcHundredths EcThrshldUndrAlarm EcThrshldOvrWarn EcThrshldOvrAlarm EcAvailBeforeAlarm EcUsedBeforeAlarm EpLL EpLLTenths EcAvailBeforeAlarmHundredths
1 phase1 2293 0.1 Volts-AC-RMS 229 Volts-AC-RMS 1 0.1 Amps-AC-RMS 18 0.01 Amps-AC-RMS 0 Percent 75 Percent 80 Percent 126 0.1 Amps-AC-RMS 11 0.1 Percent ? ? 1262 0.01 Amps-AC-RMS
1 phase1 2286 0.1 Volts-AC-RMS 228 Volts-AC-RMS 0 0.1 Amps-AC-RMS 0 0.01 Amps-AC-RMS 0 Percent 75 Percent 80 Percent 128 0.1 Amps-AC-RMS 0 0.1 Percent ? ? 1280 0.01 Amps-AC-RMS
I can't see any index for this table as described in many examples on the wikis .... So I can't
populate the <oid_index></oid_index> within the xml file
Do I miss something ?
If not, what would be the way to retrieve fields from the table ? Script query ? Ask the vendor to be compliant ....
Because I could see indexes on its MIB but they are "not-accessible".
Thanks,
Aristide
Re: Data query : Unable to get index from table
What about 1.3.6.1.4.1.476.1.42.3.8.20.1.5 ?
Description is "This is an internal index representing a unique identifier for
each PDU represented by this agent. The value is assigned
by the agent."
As a note, providing the numerical OID is easier to trouble shoot then the descriptive OID.
Description is "This is an internal index representing a unique identifier for
each PDU represented by this agent. The value is assigned
by the agent."
As a note, providing the numerical OID is easier to trouble shoot then the descriptive OID.
--
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Re: Data query : Unable to get index from table
Hi Linegod,
Here is the xml output for a snmpwalk for the oid asked :
1.3.6.1.4.1.476.1.42.3.8.20.1.5
I used the OID as an index for the query
<query>
<name>Sensors</name>
<description> Query host for power usage</description>
<oid_index>.1.3.6.1.4.1.476.1.42.3.8.20.1.5</oid_index>
<oid_order_type>numeric</oid_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<tempCIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70</oid>
</tempCIndex>
</fields>
</query>
And here is the output :
+ Running data query [11].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/liebert-pdu-power.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.476.1.42.3.8.20.1.5' Index Count: 2
+ Index found at OID: '1.3.6.1.4.1.476.1.42.3.8.20.1.5.1' value: '1'
+ Index found at OID: '1.3.6.1.4.1.476.1.42.3.8.20.1.5.2' value: '2'
+ Located input field 'tempCIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70'
As a result/status in Cacti there is no items and no rows found.
I'm expecting those results:
# snmpwalk -v 1 -c public myhost 1.3.6.1.4.1.476.1.42.3.8.60.15.1.70
LIEBERT-GP-PDU-MIB::lgpPduAuxMeasTempDegC.1.1.1 = INTEGER: 285 0.1 degrees Celsius
LIEBERT-GP-PDU-MIB::lgpPduAuxMeasTempDegC.1.3.1 = INTEGER: 256 0.1 degrees Celsius
LIEBERT-GP-PDU-MIB::lgpPduAuxMeasTempDegC.1.4.1 = INTEGER: 255 0.1 degrees Celsius
Cheers
Here is the xml output for a snmpwalk for the oid asked :
1.3.6.1.4.1.476.1.42.3.8.20.1.5
I used the OID as an index for the query
<query>
<name>Sensors</name>
<description> Query host for power usage</description>
<oid_index>.1.3.6.1.4.1.476.1.42.3.8.20.1.5</oid_index>
<oid_order_type>numeric</oid_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<tempCIndex>
<name>Index</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70</oid>
</tempCIndex>
</fields>
</query>
And here is the output :
+ Running data query [11].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/liebert-pdu-power.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.476.1.42.3.8.20.1.5' Index Count: 2
+ Index found at OID: '1.3.6.1.4.1.476.1.42.3.8.20.1.5.1' value: '1'
+ Index found at OID: '1.3.6.1.4.1.476.1.42.3.8.20.1.5.2' value: '2'
+ Located input field 'tempCIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70'
As a result/status in Cacti there is no items and no rows found.
I'm expecting those results:
# snmpwalk -v 1 -c public myhost 1.3.6.1.4.1.476.1.42.3.8.60.15.1.70
LIEBERT-GP-PDU-MIB::lgpPduAuxMeasTempDegC.1.1.1 = INTEGER: 285 0.1 degrees Celsius
LIEBERT-GP-PDU-MIB::lgpPduAuxMeasTempDegC.1.3.1 = INTEGER: 256 0.1 degrees Celsius
LIEBERT-GP-PDU-MIB::lgpPduAuxMeasTempDegC.1.4.1 = INTEGER: 255 0.1 degrees Celsius
Cheers
- Attachments
-
- mpx.xml.gz
- mpx.xml is the output of a snmpwalk for
the oid 1.3.6.1.4.1.476.1.42.3.8.20.1.5 - (25.16 KiB) Downloaded 93 times
Re: Data query : Unable to get index from table
Give the output for:
(Turn off the resolution, it makes things unclear).
Code: Select all
snmpwalk -v 1 -c public myhost 1.3.6.1.4.1.476.1.42.3.8.60.15.1.70 -On
--
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Re: Data query : Unable to get index from table
Here we go :
.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.1.1 = INTEGER: 287 0.1 degrees Celsius
.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.3.1 = INTEGER: 258 0.1 degrees Celsius
.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.4.1 = INTEGER: 255 0.1 degrees Celsius
.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.1.1 = INTEGER: 287 0.1 degrees Celsius
.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.3.1 = INTEGER: 258 0.1 degrees Celsius
.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.4.1 = INTEGER: 255 0.1 degrees Celsius
Re: Data query : Unable to get index from table
LineToGod is broken
Happy New Year
Happy New Year
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Data query : Unable to get index from table
Lately, we had some issues parsing mixed "number/strings" results. So you are requested to use latest code (aka 087i for cacti+spine).
To verify, if that is the issue, it would help to
- first change the XML for the field in question from <direction>output to <direction>input
- then perform a verbose query that should show the results
Do not forget to revert that change afterwards.
You may find some more hints at 2nd link of my sig. This will show you, what cmd.php/spine sees, when polling
R.
To verify, if that is the issue, it would help to
- first change the XML for the field in question from <direction>output to <direction>input
- then perform a verbose query that should show the results
Do not forget to revert that change afterwards.
You may find some more hints at 2nd link of my sig. This will show you, what cmd.php/spine sees, when polling
R.
Re: Data query : Unable to get index from table
.1.3.6.1.4.1.476.1.42.3.8.20.1.5 should be defined as your input as well, and 1.3.6.1.4.1.476.1.42.3.8.60.15.1.70 should be defined as an output.
What is the model of this unit? I may have one to test against.
What is the model of this unit? I may have one to test against.
--
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Re: Data query : Unable to get index from table
Hi,
The model is a Liebert MPX PDU, the latest MIB is available there :
http://www.emersonnetworkpower.com/en-U ... loads.aspx
I don't think I could use a data query based on indexes as there are not accessible damned.
I guess I should run a script instead.
Best
Aristide
The model is a Liebert MPX PDU, the latest MIB is available there :
http://www.emersonnetworkpower.com/en-U ... loads.aspx
I don't think I could use a data query based on indexes as there are not accessible damned.
I guess I should run a script instead.
Best
Aristide
Re: Data query : Unable to get index from table
For example:
Verbose Query:
- Data Query Templates : SNMP Index does not exist
- SNMP Data Query Walkthrough : VALUE/REGEXP in Action
Code: Select all
<query>
<name>LIEBERT-GP-PDU-MIB - lgpPduAuxMeasTempDegC</name>
<description>LIEBERT-GP-PDU-MIB - lgpPduAuxMeasTempDegC</description>
<oid_index>.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70</oid_index>
<oid_index_parse>OID/REGEXP:.*\.([0-9]+\.[0-9]+\.[0-9]+)$</oid_index_parse>
<index_order>TempIndex</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<TempIndex>
<name>TempIndex</name>
<source>index</source>
<direction>input</direction>
</TempIndex>
<debug_lgpPduAuxMeasTempDegC>
<name>lgpPduAuxMeasTempDegC (for debugging)</name>
<method>walk</method>
<source>VALUE/REGEXP:([0-9]+) 0.1 degrees Celsius</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70</oid>
</debug_lgpPduAuxMeasTempDegC>
<lgpPduAuxMeasTempDegC>
<name>lgpPduAuxMeasTempDegC</name>
<method>walk</method>
<source>VALUE/REGEXP:([0-9]+) 0.1 degrees Celsius</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70</oid>
</lgpPduAuxMeasTempDegC>
</fields>
</query>
See also:XML file parsed ok.
Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70'
Index found at OID: '.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.1.1' value: '287 0.1 degrees Celsius'
Index found at OID: '.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.3.1' value: '258 0.1 degrees Celsius'
Index found at OID: '.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.4.1' value: '255 0.1 degrees Celsius'
index_parse at OID: '.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.1.1' results: '1.1.1'
index_parse at OID: '.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.3.1' results: '1.3.1'
index_parse at OID: '.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70.1.4.1' results: '1.4.1'
Inserting index data for field 'TempIndex' [value='1.1.1']
Inserting index data for field 'TempIndex' [value='1.3.1']
Inserting index data for field 'TempIndex' [value='1.4.1']
Located input field 'debug_lgpPduAuxMeasTempDegC' [walk]
Executing SNMP walk for data @ '.1.3.6.1.4.1.476.1.42.3.8.60.15.1.70'
Found item [debug_lgpPduAuxMeasTempDegC='287'] index: 1.1.1 [from regexp value parse]
Found item [debug_lgpPduAuxMeasTempDegC='258'] index: 1.3.1 [from regexp value parse]
Found item [debug_lgpPduAuxMeasTempDegC='255'] index: 1.4.1 [from regexp value parse]
- Data Query Templates : SNMP Index does not exist
- SNMP Data Query Walkthrough : VALUE/REGEXP in Action
Who is online
Users browsing this forum: No registered users and 1 guest