Custom SNMP_queries

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Jp

Custom SNMP_queries

Post by Jp »

Hello all,

I have a question, I want to write a snmp_query which will create a current user count datasource for each member server in a farm on a radware WSD.

I have all the OID's but what I am not sure about is, how to work with OID's which are formed like SO

BASEOID.<FARMIP>.<SERVERIP>

So say we have a farm which is 10.1.1.1 which has two servers 10.1.1.2 and 10.1.1.3 you send up with

BASEOID.10.1.1.1
BASEOID.10.1.1.1.10.1.1.2
BASEOID.10.1.1.1.10.1.1.3

and to get the counts for each server then its

BASEOID.<10.1.1.1>.<10.1.1.2>.<USERCOUNTOID> and
BASEOID.<10.1.1.1>.<10.1.1.3>.<USERCOUNTOID>

(bracketing to help show the format)

which I can then graph the per server and sum for the total farm stats.

So I could just hard code all the OIDS in many datasources, but I would rather do it properly and query a farm on the device and dynamically build the server list (like the interfaces do)

ideas?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

I am not quite sure if this is possible with SNMP queries in Cacti currently, even though I am leaning a bit towards no. I would start with something like this:

Code: Select all

<interface>
	<name>blah</name>
	<oid_index>BASEOID</oid_index>
	
	<fields>
		<farm>
			<name>Farm IP</name>
			<method>walk</method>
			<source>OID/REGEXP:.*\.([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$</source>
			<direction>input</direction>
			<oid>BASEOID</oid>
		</farm>
		<server>
			<name>Server IP</name>
			<method>walk</method>
			<source>OID/REGEXP:.*\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})$</source>
			<direction>input</direction>
			<oid>BASEOID</oid>
		</server>
The problem is trying to actually derive the final value (the count). Much of this problem comes from the fact that Cacti expects the "index" to be formed from a single octet.

I really would like to make data queries more useful in general, I do not have cool equipment like this to test on though. Contact me via e-mail sometime if you would want to work something out to get this coded.

-Ian[/code]
User avatar
deneken01
Posts: 20
Joined: Tue Nov 26, 2002 4:07 am
Location: Netherlands
Contact:

Post by deneken01 »

Dear JP,

You are talking about an BASEOID.
But what is the BASEOID?
I just installed a WSD Pro+ with a Windows 2003 Terminal Server Farm behind it.
Maybe you can get me futher on the road to pull some usefull info out of this device..

Thanks...

Lucas
wagon_za
Posts: 1
Joined: Fri Jun 14, 2002 2:11 pm
Location: South Africa
Contact:

Post by wagon_za »

I have 3 different Radware devices (WSD, CID and the DefensePro) and the relevant MIBS for the WSD and CID downloaded from Radware.
The DefensePro is different from the WSD and CID (in terms of farms) but is SNMP enabled.
So raX im willing to help out with the relevant testing if you need me to get this functionality built into cacti?


Thx,
Warren
jcaesar
Posts: 32
Joined: Mon Nov 01, 2004 5:07 pm
Location: Atlanta, GA

Post by jcaesar »

The feature that will let you create this type of query was implemented in 0.8.6c, which was release a week or two ago. I just haven't had the time to play with it yet, but hopefully can set it up for our F5 load balancers today.
hardtarget
Posts: 9
Joined: Wed Jan 26, 2005 11:22 pm
Location: Seattle, WA
Contact:

Post by hardtarget »

Is there any more information on this topic? We have 2 Radware WSD Pro+ units that I would like to start graphing. Can someone post an xml (if one exists)?
hardtarget
Posts: 9
Joined: Wed Jan 26, 2005 11:22 pm
Location: Seattle, WA
Contact:

Post by hardtarget »

Bump.
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Take a look at the following thread as the user was having a very similar problem to yours.

http://forums.cacti.net/viewtopic.php?t=6779

As crazy as his MIB was, he ended up getting the data query to work using the regex OID parsing features added in 0.8.6c. If you need any additional help on this, let me know.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests