I would like to create a data query for cisco switches that identifies free and used memory. The appropiate oid for this table is below.
snmpwalk -v 2c -c xxxx x.x.x.x 1.3.6.1.4.1.9.9.48
SNMPv2-SMI::enterprises.9.9.48.1.1.1.2.1 = STRING: "Processor"
SNMPv2-SMI::enterprises.9.9.48.1.1.1.2.2 = STRING: "I/O"
SNMPv2-SMI::enterprises.9.9.48.1.1.1.3.1 = INTEGER: 2
SNMPv2-SMI::enterprises.9.9.48.1.1.1.3.2 = INTEGER: 0
SNMPv2-SMI::enterprises.9.9.48.1.1.1.4.1 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.48.1.1.1.4.2 = INTEGER: 1
SNMPv2-SMI::enterprises.9.9.48.1.1.1.5.1 = Gauge32: 3446124
SNMPv2-SMI::enterprises.9.9.48.1.1.1.5.2 = Gauge32: 746148
SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.1 = Gauge32: 1509044
SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.2 = Gauge32: 2075772
SNMPv2-SMI::enterprises.9.9.48.1.1.1.7.1 = Gauge32: 1477864
SNMPv2-SMI::enterprises.9.9.48.1.1.1.7.2 = Gauge32: 2067540
There are 2 pools Processor and I/O
free memory
SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.1 = Gauge32: 1509044 Processor
SNMPv2-SMI::enterprises.9.9.48.1.1.1.6.2 = Gauge32: 2075772 I/0
used memory
SNMPv2-SMI::enterprises.9.9.48.1.1.1.5.1 = Gauge32:3446124 Processor
SNMPv2-SMI::enterprises.9.9.48.1.1.1.5.2 = Gauge32: 746148 I/0
What is the proper way create the query. I do not think I can create an indexed query, and I would like not to create something with individual oids.
Thanks,
Snmp Data Query for multiple values
Moderators: Developers, Moderators
I apologize in advance
Gandalf,
I have read the info in your link but I am having trouble understanding.
I am want to use
SNMPv2-SMI::enterprises.9.9.48.1.1.1.2.1 = STRING: "Processor"
SNMPv2-SMI::enterprises.9.9.48.1.1.1.2.2 = STRING: "I/O"
to build the index and use the trailing .1 and .2 in the rest of the oids to build the table. I know I am missing something here but I don't know what it is. I am attaching my xml and a verbose query.
Thanks
-xml-
<interface>
<name>Get Memory Information</name>
<oid_index>1.3.6.1.4.1.9.9.48.1.1</oid_index>
<index_order>CiscoMemoryPoolName: ciscoMemoryPoolUsed: ciscoMemoryPoolFree:</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<ciscoMemoryPoolIndex>
<name>aaIndex</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9.9.48.1.1.1.2</oid>
</ciscoMemoryPoolIndex>
<ciscoMemoryPoolName>
<name>Pool Name</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9.9.48.1.1.1.2</oid>
</ciscoMemoryPoolName>
<ciscoMemoryPoolUsed>
<name>Memory Used</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9.9.48.1.1.1.5</oid>
</ciscoMemoryPoolUsed>
<ciscoMemoryPoolFree>
<name>Memory Free</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9.9.48.1.1.1.6</oid>
</ciscoMemoryPoolFree>
<ciscoMemoryPoolLargestFree>
<name>Memory PoolLargest Free</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9.9.48.1.1.1.7</oid>
</ciscoMemoryPoolLargestFree>
</fields>
</interface>
-verbose query-
+ Running data query [13].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/CiscoMemory.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '1.3.6.1.4.1.9.9.48.1.1'
+ Located input field 'ciscoMemoryPoolIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9.9.48.1.1.1.2'
+ Found item [ciscoMemoryPoolIndex='Processor'] index: 1 [from value]
+ Found item [ciscoMemoryPoolIndex='I/O'] index: 2 [from value]
+ Located input field 'ciscoMemoryPoolName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9.9.48.1.1.1.2'
+ Found item [ciscoMemoryPoolName='Processor'] index: 1 [from value]
+ Found item [ciscoMemoryPoolName='I/O'] index: 2 [from value]
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/CiscoMemory.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/CiscoMemory.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/CiscoMemory.xml'
I have read the info in your link but I am having trouble understanding.
I am want to use
SNMPv2-SMI::enterprises.9.9.48.1.1.1.2.1 = STRING: "Processor"
SNMPv2-SMI::enterprises.9.9.48.1.1.1.2.2 = STRING: "I/O"
to build the index and use the trailing .1 and .2 in the rest of the oids to build the table. I know I am missing something here but I don't know what it is. I am attaching my xml and a verbose query.
Thanks
-xml-
<interface>
<name>Get Memory Information</name>
<oid_index>1.3.6.1.4.1.9.9.48.1.1</oid_index>
<index_order>CiscoMemoryPoolName: ciscoMemoryPoolUsed: ciscoMemoryPoolFree:</index_order>
<index_order_type>numeric</index_order_type>
<index_title_format>|chosen_order_field|</index_title_format>
<fields>
<ciscoMemoryPoolIndex>
<name>aaIndex</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9.9.48.1.1.1.2</oid>
</ciscoMemoryPoolIndex>
<ciscoMemoryPoolName>
<name>Pool Name</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.9.9.48.1.1.1.2</oid>
</ciscoMemoryPoolName>
<ciscoMemoryPoolUsed>
<name>Memory Used</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9.9.48.1.1.1.5</oid>
</ciscoMemoryPoolUsed>
<ciscoMemoryPoolFree>
<name>Memory Free</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9.9.48.1.1.1.6</oid>
</ciscoMemoryPoolFree>
<ciscoMemoryPoolLargestFree>
<name>Memory PoolLargest Free</name>
<method>walk</method>
<source>value</source>
<direction>output</direction>
<oid>.1.3.6.1.4.1.9.9.48.1.1.1.7</oid>
</ciscoMemoryPoolLargestFree>
</fields>
</interface>
-verbose query-
+ Running data query [13].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/CiscoMemory.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '1.3.6.1.4.1.9.9.48.1.1'
+ Located input field 'ciscoMemoryPoolIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9.9.48.1.1.1.2'
+ Found item [ciscoMemoryPoolIndex='Processor'] index: 1 [from value]
+ Found item [ciscoMemoryPoolIndex='I/O'] index: 2 [from value]
+ Located input field 'ciscoMemoryPoolName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.9.9.48.1.1.1.2'
+ Found item [ciscoMemoryPoolName='Processor'] index: 1 [from value]
+ Found item [ciscoMemoryPoolName='I/O'] index: 2 [from value]
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/CiscoMemory.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/CiscoMemory.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/CiscoMemory.xml'
figured it out by accident
Ok, I guess I figured it out by accident
I needed to use an oid_index_parse for the last number in the oid
as well as not put an oid for the index under fields.
<fields>
<Index>
<name>Index</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
</Index>
I thought it was required to have an oid index but I was wrong.
understanding the xml sytax can be difficult to get your head around I appreciate the help
I needed to use an oid_index_parse for the last number in the oid
as well as not put an oid for the index under fields.
<fields>
<Index>
<name>Index</name>
<method>walk</method>
<source>index</source>
<direction>input</direction>
</Index>
I thought it was required to have an oid index but I was wrong.
understanding the xml sytax can be difficult to get your head around I appreciate the help
Who is online
Users browsing this forum: No registered users and 0 guests