Changing index, combining two OID:s for index

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

Moderators: Developers, Moderators

Post Reply
uno
Posts: 32
Joined: Mon Aug 27, 2007 7:22 am

Changing index, combining two OID:s for index

Post by uno »

Hi.

We have a template for graphing LVS statistics. I noticed that there is a problem with this template. When virtual servers are added or deleted, the graphs get messed up because the indexes of the virtual servers change. The problem is that there is not one unique field that can be used for indexing. The virtual server index is not very useful since it is not always associated with the same virtual server, and the virtual server IP cannot be used since there may be several virtual servers with the same IP but different ports. What I would like is to use a combination of IP and port for indexing. I am trying to find out if this is possible to do in cacti. I found the <index_order> tag in the documentation, but I don't know if that can be used to accomplish what I want.
Here is how the snmp query looks at the moment:

Code: Select all

<interface>
        <name>Get IPVS Statistics</name>
        <oid_index>.1.3.6.1.4.1.8225.4711.17.1.1</oid_index>
        <fields>
                <srvIndex>
                        <name>Index</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.8225.4711.17.1.1</oid>
                </srvIndex>
                <srvIP>
                        <name>Service IP</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.8225.4711.17.1.4</oid>
                </srvIP>
                <srvSched>
                        <name>Scheduler</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.8225.4711.17.1.2</oid>
                </srvSched>
                <srvPort>
                        <name>Service port</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>input</direction>
                        <oid>.1.3.6.1.4.1.8225.4711.17.1.5</oid>
                </srvPort>
                <srvBytesOut>
                        <name>Bytes out</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.8225.4711.17.1.14</oid>
                </srvBytesOut>
                <srvBytesIn>
                        <name>Bytes in</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.8225.4711.17.1.13</oid>
                </srvBytesIn>
                <srvPktsOut>
                        <name>Packets Out</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.8225.4711.17.1.12</oid>
                </srvPktsOut>
                <srvPktsIn>
                        <name>Packets In</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.8225.4711.17.1.11</oid>
                </srvPktsIn>
                <srvConnects>
                        <name>Connections</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.8225.4711.17.1.10</oid>
                </srvConnects>
                <srvRealServers>
                        <name>Real Servers</name>
                        <method>walk</method>
                        <source>value</source>
                        <direction>output</direction>
                        <oid>.1.3.6.1.4.1.8225.4711.17.1.9</oid>
                </srvRealServers>
        </fields>
</interface>
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Changing index, combining two OID:s for index

Post by gandalf »

Our minimal requirement is, that the index must be a part of _some_ oid. E.g. <oid_prefix>.<index part 1>.<something>.<index part2> would qualify. But if index part 1 and part 2 are part of different OIDs, this approach failes.
Then, the last resort is to write a Script Data Query. Then it's up to you to get everything joined together ...
See docs at 1st link of my sig for more ...
R.
uno
Posts: 32
Joined: Mon Aug 27, 2007 7:22 am

Re: Changing index, combining two OID:s for index

Post by uno »

Hi.

Thanks for the reply.
Just to check if I understand correctly... There is a numerical index "srvIndex" which is unique for each virtual server. The problem is that this index changes when you add or remove virtual servers. Is there some way to detect and "follow" that index change so that data goes to the correct rrd even after an index change, maybe some of the Reindex methods?
The problem we experience now is that data goes to the wrong graph when indexes have changed.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests