Bug 207564 - net-mgmt/collectd5: please enable interface plugin by default
Summary: net-mgmt/collectd5: please enable interface plugin by default
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mark Felder
Depends on:
Reported: 2016-02-28 16:08 UTC by Ruben Kerkhof
Modified: 2016-03-14 22:57 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (ports)

Enable interface plugin by default (2.05 KB, patch)
2016-03-07 11:15 UTC, Ruben Kerkhof
no flags Details | Diff
patch collectd 5.5.1 - revision 2 (2.62 KB, patch)
2016-03-10 14:12 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ruben Kerkhof 2016-02-28 16:08:29 UTC
At the moment the interface plugin is only enabled when you select the "Enable statgrab-based plugins" option. However, since upstream commit 645dadb, which is in Collectd 5.5, the interface plugin works fine without needing to link with libstatgrab.

It would be great if the interface plugin was enabled by default, so I don't have to build a custom collectd from ports.
Comment 1 Krzysztof 2016-02-29 08:26:15 UTC
OK, No problem for me :-))) Did you make a patch? Or I should do?
Comment 2 Ruben Kerkhof 2016-02-29 09:29:07 UTC
If you could do it that would be great. Thanks!
Comment 3 Krzysztof 2016-03-07 10:25:32 UTC
I need some time to make a patch. As I understand I should add INTERFACE which will activate interface plugin. I have to check current patches to exclude libstatgrab. So please give me some time.
Comment 4 Ruben Kerkhof 2016-03-07 10:34:27 UTC
Statgrab is still needed for some other plugins I think, so no need to exclude it.
Comment 5 Ruben Kerkhof 2016-03-07 11:11:12 UTC
I double checked and I was wrong, the interface plugin was indeed the only one still using libstatgrab. Patch coming up.
Comment 6 Ruben Kerkhof 2016-03-07 11:15:38 UTC
Created attachment 167799 [details]
Enable interface plugin by default
Comment 7 Krzysztof 2016-03-07 11:19:43 UTC
I've checked this commit: https://github.com/collectd/collectd/commit/645dadb3fcc466e8880fda4eb23b21ad433631fc

As I understand libstatgrab is not needed any more for interface plugin (although https://www.collectd.org/wiki/index.php/Plugin:Interface says that libstatgrab is needed).

So I've started working on patch to add INTERFACE option. After testing this patch with poudriere you can test it on production server(s).
Comment 8 Krzysztof 2016-03-07 11:21:56 UTC
(In reply to Ruben Kerkhof from comment #6)

We are working together with this problem :-)))
Comment 9 Krzysztof 2016-03-07 11:23:38 UTC
(In reply to Ruben Kerkhof from comment #6)
OK. I checked you patch. It seems good. So I think it could be applied. But first please check it and confirm that interface stats are collected correctly. Could you?
Comment 10 Ruben Kerkhof 2016-03-07 11:26:16 UTC
Thank you.

I just tested it, and it looks good:

# /usr/local/sbin/collectd -f
[2016-03-07 11:11:15] write_log values:
localhost.interface-igb1.if_octets.rx 4855851911 1457349075
localhost.interface-igb1.if_octets.tx 260446947 1457349075

[2016-03-07 11:11:15] write_log values:
localhost.interface-igb0.if_octets.rx 5096214974 1457349075
localhost.interface-igb0.if_octets.tx 319590425 1457349075

I'll see if I can correct the entry on the Collectd wiki.
Comment 11 Krzysztof 2016-03-10 09:39:42 UTC
Comment on attachment 167799 [details]
Enable interface plugin by default

OK, Because it seems that after this patch collected interfaces statistics are OK, I can approve this patch
Comment 12 Ruben Kerkhof 2016-03-10 09:46:36 UTC
What happens next? Can you apply it?
Comment 13 Krzysztof 2016-03-10 09:52:49 UTC
No, I'm not committer :-))) Now, I have to test it with poudriere. Also this patch should be done correctly (from ports root dir - /usr/ports as default).

I will ask you to depracate you patch after I will put correct one.
Comment 14 Krzysztof 2016-03-10 14:12:49 UTC
Created attachment 167966 [details]
patch collectd 5.5.1 - revision 2

So, I've made a patch (correct one). Also this was tested with poudriere - you can check log at https://rtm.bsdserwis.com/poudriere/data/a1amd64-testing/2016-03-10_14h27m53s/logs/collectd5-5.5.1_2.log

Ruben, please deprecate your patch so only this one will be applied to ports tree
Comment 15 commit-hook freebsd_committer 2016-03-14 22:56:08 UTC
A commit references this bug:

Author: feld
Date: Mon Mar 14 22:55:49 UTC 2016
New revision: 411129
URL: https://svnweb.freebsd.org/changeset/ports/411129

  net-mgmt/collectd5: enable interface plugin by default

  The interface plugin no longer requires libstatgrab.

  PR:		207564
  Approved by:	maintainer

Comment 16 Mark Felder freebsd_committer 2016-03-14 22:57:03 UTC
committed, thanks!