OID with suffix as value of Index counter increasing 15 min?

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

Post Reply
kryomorph
Posts: 1
Joined: Wed Mar 07, 2012 2:20 am

OID with suffix as value of Index counter increasing 15 min?

Post by kryomorph »

I'm struggling for weeks to graph the traffic for an equipment.
I’m using Cacti version 0.8.7i with Spine

I don't have access to the index table, but instead I have the ethPerformLastQHourChangeIndex
(This is the index number of the last entry in the ethPerformQHourTable. This index number refers to the ethPerformQHourPeriod index of the table.---This is the unique row number for the 15 minute period during
which this block of performance data was collected. ---No Access to this one )

The ethPerformLastQHourChangeIndex have this OID: .1.3.6.1.4.1.2509.8.42.2.1

When I do a snmpwalk : snmpwalk -v2c -c xxxx x.x.x.x .1.3.6.1.4.1.2509.8.42.2.1
I get this: .1.3.6.1.4.1.2509.8.42.2.1.0 = INTEGER: 24682

That represents the value of the counter that keeps increasing every 15 minutes. (the next will be: 24683)

In the ethPerformQHourTable, mentioned above, (This is an entry in the table containing the accumulation of the Ethernet performance counters during 15 minute period.) I have these parameters :

ethPerformQHourInUtilization which have the OID: .1.3.6.1.4.1.2509.8.42.2.20.1.22
(The average reception rate of packets on this port in the unit of 100 Kbps
for 15 minute period.)

ethPerformQHourOutUtilization which have the OID: .1.3.6.1.4.1.2509.8.42.2.20.1.23
(The average transmission rate of packets on this port in the unit of 100 Kbps
for 15 minute period.)

When I do a snmpwalk I get about 620 values, so I'll post the last ones.

snmpwalk -On -v2c -c xxxx x.x.x.x .1.3.6.1.4.1.2509.8.42.2.20.1.22.7
...
.1.3.6.1.4.1.2509.8.42.2.20.1.22.7.24677 = INTEGER: 1
.1.3.6.1.4.1.2509.8.42.2.20.1.22.7.24678 = INTEGER: 0
.1.3.6.1.4.1.2509.8.42.2.20.1.22.7.24679 = INTEGER: 0
.1.3.6.1.4.1.2509.8.42.2.20.1.22.7.24680 = INTEGER: 0
.1.3.6.1.4.1.2509.8.42.2.20.1.22.7.24681 = INTEGER: 0
.1.3.6.1.4.1.2509.8.42.2.20.1.22.7.24682 = INTEGER: 1

snmpwalk -On -v2c -c xxxx x.x.x.x .1.3.6.1.4.1.2509.8.42.2.20.1.23.7
...
.1.3.6.1.4.1.2509.8.42.2.20.1.23.7.24677 = INTEGER: 2
.1.3.6.1.4.1.2509.8.42.2.20.1.23.7.24678 = INTEGER: 0
.1.3.6.1.4.1.2509.8.42.2.20.1.23.7.24679 = INTEGER: 1
.1.3.6.1.4.1.2509.8.42.2.20.1.23.7.24680 = INTEGER: 1
.1.3.6.1.4.1.2509.8.42.2.20.1.23.7.24681 = INTEGER: 3
.1.3.6.1.4.1.2509.8.42.2.20.1.23.7.24682 = INTEGER: 4

The values I need to put on the graph as traffic In and Out are the last ones, in this example

.1.3.6.1.4.1.2509.8.42.2.20.1.22.7.24682 = INTEGER: 1
and
.1.3.6.1.4.1.2509.8.42.2.20.1.23.7.24682 = INTEGER: 4

these values correspond to the index that changes once in 15 minutes. Last value was: 24682

The XML looks like this:

Code: Select all

<interface>
	<name>Get SNMP Interfaces</name>
	<description>Queries a host for a list of monitorable interfaces</description>
	<oid_index>.1.3.6.1.4.1.2509.8.42.2.1</oid_index>
	<index_order>ethPerformLastQHourChangeIndex</index_order>
	<index_order_type>numeric</index_order_type>

	<fields>
		<ethPerformLastQHourChangeIndex>
			<name>Index</name>
			<method>get</method>
			<source>index</source>
			<direction>input</direction>
		<oid>.1.3.6.1.4.1.2509.8.42.2.1</oid>   
		</ethPerformLastQHourChangeIndex>
		<ethPerformQHourContextName>
			<name>Name</name>
			<method>get</method>
			<source>value</source>	    
			<direction>input</direction>
			<oid>.1.3.6.1.4.1.2509.8.42.2.20.1.3.7</oid>  
		</ethPerformQHourContextName> 
		<ethPerformQHourInUcastPkts>
			<name>Name</name>
			<method>get</method>
			<source>value</source>	    
			<direction>input</direction>
			<oid>.1.3.6.1.4.1.2509.8.42.2.20.1.6.7</oid>  
		</ethPerformQHourInUcastPkts>		
		<ethPerformQHourInUtilization>
			<name>100kbits In</name>
			<method>get</method>
			<source>value</source>   
			<direction>output</direction>
			<oid>.1.3.6.1.4.1.2509.8.42.2.20.1.22.7</oid>
			</ethPerformQHourInUtilization>
		<ethPerformQHourOutUtilization>
			<name>100kbits Out</name>
			<method>get</method>
			<source>value</source>   
			<direction>output</direction>
			<oid>.1.3.6.1.4.1.2509.8.42.2.20.1.23.7</oid>
			</ethPerformQHourOutUtilization>
	</fields>
</interface>
The Verbose Query:
+ Running data query [13].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/eth_performance.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.2509.8.42.2.1' Index Count: 1
+ Index found at OID: '1.3.6.1.4.1.2509.8.42.2.1.0' value: '24682'
+ Located input field 'ethPerformLastQHourChangeIndex' [get]
+ Located input field 'ethPerformQHourContextName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.2509.8.42.2.20.1.3.7.24682' [value='xxxx']
+ Located input field 'ethPerformQHourInUcastPkts' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.2509.8.42.2.20.1.6.7.24682' [value='35582']
I've also attached the Data Template settings, the New Graph and the result

The problem is that, the graph is not rendered.

I also tried to change the XML to check if the output values were returned. So just for debugging purpose I’ve changed the direction from output to input.

The Verbose Query looks like this:
+ Running data query [13].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/eth_performance.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.2509.8.42.2.1' Index Count: 1
+ Index found at OID: '1.3.6.1.4.1.2509.8.42.2.1.0' value: '24682'
+ Located input field 'ethPerformLastQHourChangeIndex' [get]
+ Located input field 'ethPerformQHourContextName' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.2509.8.42.2.20.1.3.7.24682' [value='xxxx']
+ Located input field 'ethPerformQHourInUcastPkts' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.2509.8.42.2.20.1.6.7.24682' [value='35582'] --this is not mandatory
+ Located input field 'ethPerformQHourInUtilization' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.2509.8.42.2.20.1.22.7.24682' [value='1']
+ Located input field 'ethPerformQHourOutUtilization' [get]
+ Executing SNMP get for data @ '.1.3.6.1.4.1.2509.8.42.2.20.1.23.7.24682' [value='4']
So…the values are returned, but I’m afraid I’m missing something.
Attachments
The result
The result
The result.jpg (73.02 KiB) Viewed 2237 times
New Graph
New Graph
New Graph.jpg (46.96 KiB) Viewed 2237 times
Data Template Settings
Data Template Settings
Data Template Settings.jpg (60.9 KiB) Viewed 2237 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests