This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1205231 - RFE: provide IPVS/LVS metrics
RFE: provide IPVS/LVS metrics
Status: NEW
Product: Fedora
Classification: Fedora
Component: pcp (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: pcp-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-03-24 09:30 EDT by Marko Myllynen
Modified: 2017-08-23 11:11 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ip_vs_stats (306 bytes, text/plain)
2015-03-24 09:30 EDT, Marko Myllynen
no flags Details

  None (edit)
Description Marko Myllynen 2015-03-24 09:30:53 EDT
Created attachment 1005859 [details]
ip_vs_stats

Description of problem:
It would be nice if PCP could provide some IPVS/LVS metrics/statistics. Although the most often used user space component has changed (from Piranha/pulse to keepalived) the kernel proc interface has remained stable for a number of years. The files are /proc/net/ip_vs* and it'd be easy to setup a test environment (e.g. one director and one real server) as described at http://www.linuxvirtualserver.org/docs/ha/keepalived.html.

For convenience I'm attaching ip_vs_stats which might be all what would need to be covered.
Comment 1 Nathan Scott 2015-03-26 01:41:22 EDT
Hi Marko,

From a look through the kernel code, we're talking about stats exporting from net/netfilter/ipvs/ip_vs_ctl.c::ip_vs_stats_show (amongst others).  There is a netfilter PMDA someone began awhile back which could be extended to handle this, perhaps.  Or they could live in pmdalinux.  Or they might be suited to the specialist networking PMDA Michele has been working on.  

Quickest will probably be to add it to the perl netfilter PMDA I guess... anyone have any preferences here?

The stats output you've given there is very helpful, thanks Marko - interesting that these counters are exported in hex (!) - first time I've ever seen that - and for PCP's needs we really just need that first row of values.  The second row contains constantly updating 2-second timer-based rate converted values - which we can do more effectively in userspace, without loss of information.  Comment toward the head of ip_vs_est.c (which houses ip_vs_read_estimator(), from whence the second line is calculated) is spot on - "it is easy to implement a user level daemon which periodically reads those statistical counters and measure rate."  :)

cheers.
Comment 2 Marko Myllynen 2015-03-27 04:18:22 EDT
Thanks for looking into this. I think any of those PMDAs would do just fine but perhaps the netfilter PMDA would be my least preferred choice as it's a different subsystem. Also, the other related proc files (ip_vs, ip_vs_app, ip_vs_conn, ip_vs_conn_sync) contain information about current rules and current connections but I'm not sure are those worth to add.

Thanks.
Comment 3 Nathan Scott 2015-03-29 22:31:52 EDT
(In reply to Marko Myllynen from comment #2)
> Thanks for looking into this. I think any of those PMDAs would do just fine
> but perhaps the netfilter PMDA would be my least preferred choice as it's a
> different subsystem.

Hmm, the location of the kernel code
net/netfilter/ipvs/ip_vs_ctl.c::ip_vs_stats_show
^^^^^^^^^^^^^'
suggested otherwise - no big deal though, those other options are fine too.

 Also, the other related proc files (ip_vs, ip_vs_app,
> ip_vs_conn, ip_vs_conn_sync) contain information about current rules and
> current connections but I'm not sure are those worth to add.

Not sure - could you add sample output from a working setup just in case?

thanks Marko.
Comment 4 Marko Myllynen 2015-04-01 07:58:12 EDT
(In reply to Nathan Scott from comment #3)
> (In reply to Marko Myllynen from comment #2)
> > Thanks for looking into this. I think any of those PMDAs would do just fine
> > but perhaps the netfilter PMDA would be my least preferred choice as it's a
> > different subsystem.
> 
> Hmm, the location of the kernel code
> net/netfilter/ipvs/ip_vs_ctl.c::ip_vs_stats_show
> ^^^^^^^^^^^^^'
> suggested otherwise - no big deal though, those other options are fine too.

Ah, I stand corrected. In that case the netfilter PMDA might be a good candidate also. I think we could follow the good olde "doer decides" principle :)
Comment 9 Nathan Scott 2015-04-06 23:02:31 EDT
> I think we could follow the good olde "doer decides" principle :)

Yep, agreed.
Comment 10 Marko Myllynen 2016-03-11 06:49:21 EST
See also https://bugzilla.redhat.com/show_bug.cgi?id=1316880.

Note You need to log in before you can comment on or make changes to this bug.