On 2010-12-02 10:03, Gerd Müller wrote:
On 01.12.2010 21:55, Krzysztof Olędzki wrote:
On 2010-11-11 12:59, Gerd Müller wrote:
Hi Krzystof,

thank you for your the net-snmp plugin for haproxy. It's a great help.
Since I am using OpenNMS I had to make small patch. OIDs for frontends
and backends end with .0 wheres the actual instance is the last but one.
OpenNMS and other snmp tools expects the instance as last. So here is my
minimal patch. Would be cool if you could apply it to your code.

101a102

131a133
                  $nextid =~ s/\.0$// if($type<2);

Hi Gerd,

Thank you for the patch and raising this issue. Please note however,
that we are not able to alter the OIDs format without breaking current
installations, so we should avoid such change. So, the only option is
to build v2 OIDs and provide both versions.

Also, while the current mainline version always puts "0" here, I have
a patch adding subinstances for backends providing separate stats for
each call (use_backend, default_backend) from a different
frontend/socket. In such case, the last fields is also significant.
Currently, I have virtually no time for such activities, but I'm going
to push this patch to Willy one day.

At the end, coud you explain why you need this? Why is it not possible
to address backends and frontends using two fields, like it is
required for servers? Yes, the last one will be "0" but it should not
make a problem.

Best regards,

             Krzysztof Olędzki

Hi Krzysztof,

Underneath You will find my OpenNMS configuration for collecting and
graphing haproxy stats with OpenNMS. With OpenNMS it's very easy to use
your plugin. OpenNMS can "walk" the mibtree to fetch autmaticly *all*
instances of frontends, backends and servers. As you can see the problem
with the trailing 0 is, that OpenNMS expects the instance to be the very
last byte for each oid. Maybe you but could add this mail or a comment
about this as README.OpenNMS to your plugin and forward this to Willy. I
will describe your plugin and the patch in the OpenNMS wiki, so
everybody using haproxy, your plugin and OpenNMS should be able to
monitor haproxy with opennms very easyily.

Of course I can live with the manual patching of your plugin but maybe
for others it would be helpful if you could make this oid change
depending on a script parameter like "haproxy.pl --opennms". :-)


Hello Gerd,

I didn't say that introducing a new format is not possible. We only have to avoid changing the current one, but there should be no problem with two formats living together.

However, I still don't understand why OpenNMS is not able to work with what we provide currently? Please excuse me for asking this question again, I haven't find time to become familiar with this program yet, but is OpenNMS able to access statistics of servers, where the last two fields are significant? If so, accessing stats of backands & frontends should also be possible in exactly the same way.

Best regards,

                        Krzysztof Olędzki

Reply via email to