Problem with oid_index_parse, F5 BigIP v9 snmp query

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

Moderators: Developers, Moderators

Post Reply
sharpone
Posts: 12
Joined: Fri May 06, 2005 6:15 pm

Problem with oid_index_parse, F5 BigIP v9 snmp query

Post by sharpone »

Hi fellow Cactites :)


I've come across issues with snmp queries that I just can't seem to get a handle on, I've seen plenty of examples that seem to work perhaps someone can point me in the right direction.

Here are the xml queries i've tried and the results of each:

method:walk source:value

Code: Select all

<interface>
        <name>Get F5 Big-IP Load Balancer Virtual Server Statistics</name>
        <oid_index>1.3.6.1.4.1.3375.2.2.10.1.2.1.1</oid_index>
        <oid_index_parse>OID/REGEXP:.*\.3375\.2\.2\.10\.1\.2\.1\.1\.([0-9\.]*)$</oid_index_parse>
        <oid_num_indexes>1.3.6.1.4.1.3375.2.2.10.1.1</oid_num_indexes>
        <index_order>vsIndex</index_order>
        <index_order_type>alphabetic</index_order_type>

        <fields>
                <vsIndex>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
                </vsIndex>
                <vsName>
                        <name>Virtual Server Name</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.1.2.1.1</oid>
                </vsName>
                <vsPortNumber>
                        <name>Virtual Server Port</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.1.2.1.6</oid>
                </vsPortNumber>
                <vsBytesIn>
                        <name>Bytes In</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.2.3.1.7</oid>
                </vsBytesIn>
                <vsBytesOut>
                        <name>Bytes Out</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.2.3.1.9</oid>
                </vsBytesOut>
                <vsConnectionRate>
                        <name>Connection Rate</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.2.3.1.11</oid>
                </vsConnectionRate>
                <vsConcurrentConnections>
                        <name>Concurrent Connections</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.2.3.1.12</oid>
                </vsConcurrentConnections>
        </fields>
</interface>
Results of method:walk source:value
(notice how it blows away the regex'd index after the vsName walk)

Code: Select all

+ Running data query [12].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '1.3.6.1.4.1.3375.2.2.10.1.2.1.1'
+ Inserting index data [value='10.82.101.100.70.111.114.119.97.114.100']
+ Inserting index data [value='10.82.101.100.78.101.116.119.111.114.107']
+ Inserting index data [value='17.112.112.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109']
+ Inserting index data [value='18.97.112.105.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109']
+ Inserting index data [value='19.98.101.116.97.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109']
+ Located input field 'vsName' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.3375.2.2.10.1.2.1.1'
+ Found item [vsName='RedForward'] index: 10.82.101.100.70.111.114.119.97.114.100 [from value]
+ Found item [vsName='RedNetwork'] index: 10.82.101.100.78.101.116.119.111.114.107 [from value]
+ Found item [vsName='pp.advancedmd.com'] index: 17.112.112.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109 [from value]
+ Found item [vsName='api.advancedmd.com'] index: 18.97.112.105.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109 [from value]
+ Found item [vsName='beta.advancedmd.com'] index: 19.98.101.116.97.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109 [from value]
+ Located input field 'vsPortNumber' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.3375.2.2.10.1.2.1.6'
+ Found item [vsPortNumber='0'] index: SNMPv2-SMI::enterprises.3375.2.2.10.1.2.1.6.10.82.101.100.70.111.114.119.97.114.100 [from value]
+ Found item [vsPortNumber='0'] index: SNMPv2-SMI::enterprises.3375.2.2.10.1.2.1.6.10.82.101.100.78.101.116.119.111.114.107 [from value]
+ Found item [vsPortNumber='80'] index: SNMPv2-SMI::enterprises.3375.2.2.10.1.2.1.6.17.112.112.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109 [from value]
+ Found item [vsPortNumber='443'] index: SNMPv2-SMI::enterprises.3375.2.2.10.1.2.1.6.18.97.112.105.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109 [from value]
+ Found item [vsPortNumber='443'] index: SNMPv2-SMI::enterprises.3375.2.2.10.1.2.1.6.19.98.101.116.97.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109 [from value]
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
This should return 15 items and 5 rows.. 5 virtual servers, index, name and port.
What it actually gives me is 15 Items and 10 rows.. so it lumps the port into its own section seperate from the other 5.


Here is the xml for method:walk source:index

Code: Select all

<interface>
        <name>Get F5 Big-IP Load Balancer Virtual Server Statistics</name>
        <oid_index>1.3.6.1.4.1.3375.2.2.10.1.2.1.1</oid_index>
        <oid_index_parse>OID/REGEXP:.*\.3375\.2\.2\.10\.1\.2\.1\.1\.([0-9\.]*)$</oid_index_parse>
        <oid_num_indexes>1.3.6.1.4.1.3375.2.2.10.1.1</oid_num_indexes>
        <index_order>vsIndex</index_order>
        <index_order_type>alphabetic</index_order_type>

        <fields>
                <vsIndex>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
                </vsIndex>
                <vsName>
                        <name>Virtual Server Name</name>
                        <method>walk</method>
                        <source>index</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.1.2.1.1</oid>
                </vsName>
                <vsPortNumber>
                        <name>Virtual Server Port</name>
                        <method>walk</method>
                        <source>index</source>
                        <direction>input</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.1.2.1.6</oid>
                </vsPortNumber>
                <vsBytesIn>
                        <name>Bytes In</name>
                        <method>walk</method>
                        <source>index</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.2.3.1.7</oid>
                </vsBytesIn>
                <vsBytesOut>
                        <name>Bytes Out</name>
                        <method>walk</method>
                        <source>index</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.2.3.1.9</oid>
                </vsBytesOut>
                <vsConnectionRate>
                        <name>Connection Rate</name>
                        <method>walk</method>
                        <source>index</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.2.3.1.11</oid>
                </vsConnectionRate>
                <vsConcurrentConnections>
                        <name>Concurrent Connections</name>
                        <method>walk</method>
                        <source>index</source>
                        <direction>output</direction>
                        <oid>1.3.6.1.4.1.3375.2.2.10.2.3.1.12</oid>
                </vsConcurrentConnections>
        </fields>
</interface>
And its results:

Code: Select all

+ Running data query [12].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '1.3.6.1.4.1.3375.2.2.10.1.2.1.1'
+ Inserting index data [value='10.82.101.100.70.111.114.119.97.114.100']
+ Inserting index data [value='10.82.101.100.78.101.116.119.111.114.107']
+ Inserting index data [value='17.112.112.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109']
+ Inserting index data [value='18.97.112.105.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109']
+ Inserting index data [value='19.98.101.116.97.46.97.100.118.97.110.99.101.100.109.100.46.99.111.109']
+ Located input field 'vsName' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.3375.2.2.10.1.2.1.1'
+ Located input field 'vsPortNumber' [walk]
+ Executing SNMP walk for data @ '1.3.6.1.4.1.3375.2.2.10.1.2.1.6'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/snmp_queries/F5-VirtualServer.xml'
This result succesfully gets the correct indexes, but when it performs the walks by index it returns nothing. The results 5 items, 5 rows, basically only the index.


I read in another post that using walk with regex'd index destroys the indexes (the behavior i'm seeing with the first xml) but if i try method:get with source:index I see the exact same results as the second xml, it says located input field X [get] and then does nothing about it.


I realise this is a long post, I've been pulling my hair out all day trying to get this working so any help is greatly appreciated, and I will gladly post the numerous templates I have in mind for these F5's when done getting these queries working.

--Justin
sharpone
Posts: 12
Joined: Fri May 06, 2005 6:15 pm

fixed

Post by sharpone »

Ok I finally went and read the source for the code that does the polling and came up with the correct syntax, and everything is working now. This is something that to me was ambigious in the documentation (maybe I'm just a retard).

A couple of things.

When you define the index (eg: <ifIndex> ) you use the method walk and the source index

After you've defined the indexes, and they are correctly parsed, if you do another walk you will destroy your indexes. You have to do a get for each variable you want (be it input or output), and the source of that get is value not index.

Example:

Code: Select all

<ifIndex>
  <name>Index</name>
  <source>index</source>
  <method>walk</method>
</ifindex>
<ifName>
  <name>name</name>
  <source>value</source>
  <method>get</source>
  <oid>1.2.3.4.5.6</oid>
  <direction>input</direction>
</ifBytesIn>

<ifBytesIn>
  <name>bytesIn</name>
  <source>value</source>
  <method>get</source>
  <oid>1.2.3.4.5.7</oid>
  <direction>output</direction>
</ifBytesIn>
Using method get and source index does nothing. And using method walk and source value destroys your regex'd indexes. After storing your walking your indexes, always use get and value and you will be safe :)

I will post some F5 templates soon for those of you who care.
nanner2
Posts: 8
Joined: Wed Oct 26, 2005 3:55 pm

templates

Post by nanner2 »

Sharpone,

Did you figure out the templates for BigIP V9 boxes?
dgamble
Cacti User
Posts: 68
Joined: Tue Mar 08, 2005 4:50 pm
Location: Calgary, AB, CA

Re: fixed

Post by dgamble »

sharpone wrote: Using method get and source index does nothing. And using method walk and source value destroys your regex'd indexes. After storing your walking your indexes, always use get and value and you will be safe :)
I actually wasn't aware you could put the Index into a value like that. That's handy to know!

Even though you have this working in some form, I should note that I am able to walk values just fine after getting an index in this way.

The issue is that the OID/REGEXP is applied to EACH input and output OID, not the "index" oid. As in, the indexes for each field is computed independently (I presume this is intentional). So, the problem is that the regex does not match at all due to the last octet being different in the OID.

To handle this, all you have to do is replace the last octet in the regex with something like "[0-9]+\. ".

FYI!
jlim0930
Posts: 40
Joined: Thu Oct 27, 2005 12:07 am

Post by jlim0930 »

is there any way you can post your sucess ?

I am also trying to setup the F5 for v9 and having some problems

Thanks
dgamble
Cacti User
Posts: 68
Joined: Tue Mar 08, 2005 4:50 pm
Location: Calgary, AB, CA

Post by dgamble »

jlim0930 wrote:is there any way you can post your sucess ?

I am also trying to setup the F5 for v9 and having some problems

Thanks
The queries are for other devices. Sorry! I'll be posting those, at least, when they are done.
jlim0930
Posts: 40
Joined: Thu Oct 27, 2005 12:07 am

Post by jlim0930 »

any updates on this ? *Sigh* i am still having problems with the v9...

I am just trying to graph

enterprises.3375.2.2.10.11.3.1.4.1.4 vs enterprises.3375.2.2.10.11.3.1.4.1.6
dgamble
Cacti User
Posts: 68
Joined: Tue Mar 08, 2005 4:50 pm
Location: Calgary, AB, CA

Post by dgamble »

jlim0930 wrote:any updates on this ? *Sigh* i am still having problems with the v9...

I am just trying to graph

enterprises.3375.2.2.10.11.3.1.4.1.4 vs enterprises.3375.2.2.10.11.3.1.4.1.6
I gave you instructions on how to do this. Have you tried it or not? Here they are again:
dgamble wrote: The issue is that the OID/REGEXP is applied to EACH input and output OID, not the "index" oid. As in, the indexes for each field is computed independently (I presume this is intentional). So, the problem is that the regex does not match at all due to the last octet being different in the OID.

To handle this, all you have to do is replace the last octet in the regex with something like "[0-9]+\. "
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest