[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

SV: Graphing unusual devices with cacti.



Hi.

IMHO, the easiest and kind of q'n'd way is to create a script wherein you
snmpget the oids you like.

$./test.sh
output1:123 output2:12 output3:15

Then you create a script-query wich reads that data.

If you're still interested in snmp indexed-query, check out my brocade
template at the cacti forum.

Christofer

-----Ursprungligt meddelande-----
Från: Andy Davidson [mailto:adavidson@ebuyer.com] 
Skickat: den 19 april 2005 16:27
Till: debian-isp@lists.debian.org
Ämne: Graphing unusual devices with cacti.



Hi, guys --

A plea for help if I may - I am trying to graph various pieces of data which
can be retrieved from a Redline Networks load balancer with Cacti.

Various nuggets of management information can be obtained from these devices
using SNMP, e.g. :


orwell:~# snmpget -v 2c -c *** rl1.local .1.3.6.1.4.1.6213.2.4.1.1.2.0
REDLINE-STATS-MIB::sessTotal.0 = Counter64: 4569634


I'd like to graph this data using cacti, using the template system (so that
we can graph many of these devices without having to build graphs by hand
for each one.)

If we manage to get this working, I'm happy then to put working configs
online for other folk to find with google and somesuch.

I'm following some advice on the cacti forums, which I'll summarise here.


 1 - create an xml 'control' file explaining where the data lives.

Note that the OID in the example above is the same as the one in the file
below.

There isn't actually an index for this data (this may therefore be the
problem), but cacti dies with an error along the lines of 'oid_index is a
required parameter' if I miss it out.

===
<interface>
        <name>Get Redline Active Sessions</name>
        <oid_index>.1.3.6.1.4.1.6213.2.4.1.1.2.0</oid_index>

        <fields>
                <rlActiveSessions>
                        <name>Sessions</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.6213.2.4.1.1.2.0</oid>
                </rlActiveSessions>
        </fields>
</interface>
===


 2 - Create a data query in Cacti

Pointed the xml path to the correct xml file, selected 'Get SNMP data
(indexed) as the data input method (no 'unindexed' options are made
available)

 3 - Create a data template
 4 - Create a graph template

Nothing remarkable here.

 5 - Create a host template

I already have a host template, and am graphing interface stats, so I'll
simply add this new graph as an 'Associated Data Query'

 6 - Associate graph template to Data Query

Done...


Now, when I click on 'Devices', select the device, and add the new Data
Query I created, and 'None' as the re-index method.



Clicking 'Verbose Query' for this new data query shows this information :

====
+ Running data query [16].
+ Found type = '3' [snmp query].
+ Found data query XML file at
'/usr/share/cacti/resource/snmp_queries/redline_active_sessions.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @
'.1.3.6.1.4.1.6213.2.4.1.1.2.0'
+ No SNMP data returned
+ Found data query XML file at
'/usr/share/cacti/resource/snmp_queries/redline_active_sessions.xml'
+ Found data query XML file at
'/usr/share/cacti/resource/snmp_queries/redline_active_sessions.xml'
+ Found data query XML file at
'/usr/share/cacti/resource/snmp_queries/redline_active_sessions.xml'
====

I think the key line is the 'No SMNP data returned' line.

I'm guessing the problem is that the data which is returned at
'.1.3.6.1.4.1.6213.2.4.1.1.2.0' is not an index - it's the result that I
really want to graph.  

I can't use the generic SNMP OID graphing template as suggested at :
   http://www.cacti.net/downloads/docs/html/how_to.html#GRAPH_SNMP_OID

.. since you only seem to be able to use the SNMP - Generic OID Template
once per host, and I want to graph lots of this data (the debugging options
also seem a lot better if you make a data query, as you get the 'Verbose
Query' option.

Running the snmpget command at the top of this email as the user 'nobody'
works fine, so it suggests that it's not a user-specific environment setting
(in fact, the mib location and names are specified as environment variables
in the system-wide /etc/profile)


Any ideas ?


-- 

Andy Davidson
Systems Administrator
Ebuyer UK Ltd., 201 Woodbourn Road, Sheffield, S9 3LR


-- 
To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org





Reply to: