F5 PoolMemberName can't retrieve it

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

F5 PoolMemberName can't retrieve it

Post by Rno »

Hello,
I try to upgrade a little bit the F5 template, and for the 'Get F5 Big-IP ltmPoolMemberStatTable stats' (f5_bigip_ltmPoolMemberStatTable.xml) I try to add the field 28 who is the ltmPoolMemberStatNodeName
Insteaed of having a wierd Ip adress and a port name.

The added XML look like this:
<ltmPoolMemberStatNodeName>
<name>Member Node name</name>
<method>walk</method>
<source>value</source>
<direction>input</direction>
<oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.28</oid>
</ltmPoolMemberStatNodeName>

It's correct since if I do a debug I can get all Nodename.

But when I check on my F5 device in Cacti instead of hadding a column to the current
Data Query [F5 BigIP - Pool Member Statistics (ltmPoolMemberStatTable)]

It create a new entry with just the Pool member name on it, but no index what so ever

Sorry to add a PDF but I can't add a link to the image.

I can't find a solution to resolve that and have the Nodename inside the table, so I can get it back as query_ltmPoolMemberStatNodeName to name the graph.

The full XML file look like this:

Code: Select all

<ltmPoolMemberStatTable>
        <name>Get F5 Big-IP ltmPoolMemberStatTable stats</name>
        <index_order_type>numeric</index_order_type>
        <oid_index>.1.3.6.1.4.1.3375.2.2.5.4.3.1.1</oid_index>
        <oid_index_parse>OID/REGEXP:^.*\.3375\..{14}(.*)$</oid_index_parse>
        <oid_num_indexes>.1.3.6.1.4.1.3375.2.2.5.4.2</oid_num_indexes>
        <index_order>index</index_order>
        <index_order_type>alphabetic</index_order_type>
        <fields>
                <index>
                        <name>Index</name>
                        <source>index</source>
                        <direction>input</direction>
                </index>
                <ltmPoolMemberStatPoolName>
                        <name>Pool Name</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.1</oid>
                </ltmPoolMemberStatPoolName>
                <ltmPoolMemberStatAddrType>
                        <name>Address Type</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.2</oid>
                </ltmPoolMemberStatAddrType>
                <ltmPoolMemberStatAddr>
                        <name>IP Address</name>
                        <method>walk</method>
                        <source>OID/REGEXP:^.*\.([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*)\.[0-9]*$</sour
ce>
                                          <direction>input</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.3</oid>
                </ltmPoolMemberStatAddr>
                <ltmPoolMemberStatPort>
                        <name>Port</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.4</oid>
                </ltmPoolMemberStatPort>
                <ltmPoolMemberStatServerPktsIn>
                        <name>Server Packets In</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.5</oid>
                </ltmPoolMemberStatServerPktsIn>
                <ltmPoolMemberStatServerBytesIn>
                        <name>Server Bytes In</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.6</oid>
                </ltmPoolMemberStatServerBytesIn>
                <ltmPoolMemberStatServerPktsOut>
                        <name>Server Packets Out</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.7</oid>
                </ltmPoolMemberStatServerPktsOut>
                <ltmPoolMemberStatServerBytesOut>
                        <name>Server Bytes Out</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.8</oid>
                </ltmPoolMemberStatServerBytesOut>
                <ltmPoolMemberStatServerMaxConns>
                        <name>Server Max Connections</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.9</oid>
                </ltmPoolMemberStatServerMaxConns>
                <ltmPoolMemberStatServerTotConns>
                        <name>Server Total Connections</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.10</oid>
                </ltmPoolMemberStatServerTotConns>
                <ltmPoolMemberStatServerCurConns>
                        <name>Server Current Connections</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.11</oid>
                </ltmPoolMemberStatServerCurConns>

                <ltmPoolMemberStatPvaPktsIn>
                        <name>Pva Packets In</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.12</oid>
                </ltmPoolMemberStatPvaPktsIn>
                <ltmPoolMemberStatPvaBytesIn>
                        <name>Pva Bytes In</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.13</oid>
                </ltmPoolMemberStatPvaBytesIn>
                <ltmPoolMemberStatPvaPktsOut>
                        <name>Pva Packets Out</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.14</oid>
                </ltmPoolMemberStatPvaPktsOut>
                <ltmPoolMemberStatPvaBytesOut>
                        <name>Pva Bytes Out</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.15</oid>
                </ltmPoolMemberStatPvaBytesOut>
                <ltmPoolMemberStatPvaMaxConns>
                        <name>Pva Max Connections</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.16</oid>
                </ltmPoolMemberStatPvaMaxConns>
                <ltmPoolMemberStatPvaTotConns>
                        <name>Pva Total Connections</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.17</oid>
                </ltmPoolMemberStatPvaTotConns>
                <ltmPoolMemberStatPvaCurConns>
                        <name>Pva Current Connections</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.18</oid>
                </ltmPoolMemberStatPvaCurConns>                                                
 
                <ltmPoolMemberStatTotRequests>
                        <name>Total Requests</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.19</oid>
                </ltmPoolMemberStatTotRequests>                 
                <ltmPoolMemberStatTotPvaAssistConn>
                        <name>Total Pva Assist Connections</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.20</oid>
                </ltmPoolMemberStatTotPvaAssistConn>                 
                <ltmPoolMemberStatCurrPvaAssistConn>
                        <name>Current Pva Assist Connections</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.21</oid>
                </ltmPoolMemberStatCurrPvaAssistConn>
                <ltmPoolMemberStatNodeName>
                        <name>Member Node name</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.3375.2.2.5.4.3.1.28</oid>
                </ltmPoolMemberStatNodeName>
        </fields>
</ltmPoolMemberStatTable>

Cacti debug function on snmp_queries give me this result (Click to show Data Query output for field 'ltmPoolMemberStatPoolName' )
Found item [ltmPoolMemberStatPoolName='/PROD/pool-prod-owa'] index: 19.47.80.82.79.68.47.112.111.111.108.45.112.114.111.100.45.111.119.97.15.47.80.82.79.68.47.108.115.119.120.99.104.112.48.52.443 [from value]

Then On the query for the NodeName (Click to show Data Query output for field 'ltmPoolMemberStatNodeName')
I got this for the same index
Found item [ltmPoolMemberStatNodeName='/PROD/lswxchp04'] index: .19.47.80.82.79.68.47.112.111.111.108.45.112.114.111.100.45.111.119.97.15.47.80.82.79.68.47.108.115.119.120.99.104.112.48.52.443 [from value]

So why in Hell I have the presentation of my attachement, and not a new colum on the same row?
Any help welcome
Attachments
Cacti PoolMemberNodeName.pdf
(203.17 KiB) Downloaded 37 times
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: F5 PoolMemberName can't retrieve it

Post by Rno »

So here is the problem:
The REGEXP for the index is to strict:
<oid_index_parse>OID/REGEXP:^.*\.3375\..{14}(.*)$</oid_index_parse>
with that you take the 14 char after the 3375, so for a value between 1 and 9 it's ok, the 14 char will be the point, so doing that you will get this: (no point before the 19at index value)
Found item [ltmPoolMemberStatPoolName='/PROD/pool-prod-owa'] index: 19.47.80.82.79.68.47.112.111.111.108.45.112.114.111.100.45.111.119.97.15.47.80.82.79.68.47.108.115.119.120.99.104.112.48.52.443 [from value]



But since I'm looking for a valu for the .28 instead of .[1-9], the last char of the 14 is the 8, so the query look like this:
Found item [ltmPoolMemberStatNodeName='/PROD/lswxchp04'] index: .19.47.80.82.79.68.47.112.111.111.108.45.112.114.111.100.45.111.119.97.15.47.80.82.79.68.47.108.115.119.120.99.104.112.48.52.443 [from value]

See the . before the 19, and that give a new index for this field.

So anyone good to snmp_queries syntax and/or RegEx that can solve this issue ?
I try to do {14,15} instead of {14} inside the query, but it give the wrong value this time for smal number ([1-9]
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: F5 PoolMemberName can't retrieve it

Post by Rno »

So the regex of the index should be this:
^.*\.3375\.(?:[0-9]{1,2}\.){7}(.*)$

And instead of taking the number of character after the Entreprise number (3375), it just take the number of field separated by a . (dot) 7 in this case.

SNMPv2-SMI::enterprises.3375.2.2.5.4.3.1.28.46.47.86.65.76.73.47.112.111.111.108.45.118.97.108.105.45.112.97.116.114.105.109.111.105.110.101.45.118.97.108.105.100.97.116.105.111.110.46.108.97.110.99.121.46.99.104.15.47.86.65.76.73.47.108.115.119.109.117.115.118.48.49.80 = STRING: "/blob"
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests