Mark Brooks | 30 May 2012 14:50
Favicon

[PATCH] IPVS plugin not handling firewall marks

Hi all,
This was detected in 5.1.0, when using the ipvs plugin to collect
stats from ipvs with firewall marks. (I am quite new to using collectd
so if Ive missed something please shout)

The observed normal folder naming convention is -
ipvs-<virtual IP>_{UDP,TCP}<port>

which is fine until you use a firewall mark as you get
ipvs-0.0.0.0_TCP0/

Which is usable unless you have more than one firewall mark pointing
to the same real servers, as everything ends up in the same directory.

The patch detects if the Virtual IP is a firewall mark and uses that
to form the folder name instead. So if your using a firewall mark you
would get

ipvs-<firewall_mark>_FWM0

Mark
-----------------------------------------------------------------------------------------------------------------

diff -pur collectd-5.1.0/src/ipvs.c collectd-5.1.0-mine/src/ipvs.c
--- collectd-5.1.0/src/ipvs.c   2012-04-02 09:04:58.000000000 +0100
+++ collectd-5.1.0-mine/src/ipvs.c      2012-05-30 13:05:58.239637001 +0100
 <at>  <at>  -188,14 +188,20  <at>  <at>  static int get_pi (struct ip_vs_service_

        if ((NULL == se) || (NULL == pi))
                return 0;
(Continue reading)

Sebastian Harl | 1 Jun 2012 11:59
Gravatar

Re: [PATCH] IPVS plugin not handling firewall marks

On Wed, May 30, 2012 at 01:50:51PM +0100, Mark Brooks wrote:
> Hi all,
> This was detected in 5.1.0, when using the ipvs plugin to collect
> stats from ipvs with firewall marks. (I am quite new to using collectd
> so if Ive missed something please shout)
> 
> The observed normal folder naming convention is -
> ipvs-<virtual IP>_{UDP,TCP}<port>
> 
> which is fine until you use a firewall mark as you get
> ipvs-0.0.0.0_TCP0/
> 
> Which is usable unless you have more than one firewall mark pointing
> to the same real servers, as everything ends up in the same directory.
> 
> The patch detects if the Virtual IP is a firewall mark and uses that
> to form the folder name instead. So if your using a firewall mark you
> would get
> 
> ipvs-<firewall_mark>_FWM0

Signed-off-by: Sebastian Harl <sh@...>

;-)

> Mark
> -----------------------------------------------------------------------------------------------------------------
> 
> diff -pur collectd-5.1.0/src/ipvs.c collectd-5.1.0-mine/src/ipvs.c
> --- collectd-5.1.0/src/ipvs.c   2012-04-02 09:04:58.000000000 +0100
(Continue reading)


Gmane