Bug 208738 - net-mgmt/collectd5 enabling write_tsdb output plugin
Summary: net-mgmt/collectd5 enabling write_tsdb output plugin
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Li-Wen Hsu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-12 07:39 UTC by Davide D'Amico
Modified: 2016-04-22 08:38 UTC (History)
3 users (show)

See Also:
lwhsu: maintainer-feedback?


Attachments
net-mgmt/collectd5 write_tsdb output plugin patch (1.82 KB, patch)
2016-04-12 07:39 UTC, Davide D'Amico
no flags Details | Diff
collectd5 add tsdb patch (75.57 KB, patch)
2016-04-21 05:29 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff
net-mgmt/collectd5 write_tsdb patch to 5.5.1_3 (1.96 KB, patch)
2016-04-21 11:07 UTC, dave
no flags Details | Diff
net-mgmt/collectd5 write_tsdb patch to 5.5.1_3 [updated] (1.82 KB, patch)
2016-04-21 11:18 UTC, dave
no flags Details | Diff
net-mgmt/collectd5 write_tsdb patch [revisited] [updated] (1.89 KB, patch)
2016-04-21 15:16 UTC, dave
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Davide D'Amico 2016-04-12 07:39:56 UTC
Created attachment 169233 [details]
net-mgmt/collectd5 write_tsdb output plugin patch

Enabling write_tsdb output plugin, it does not require any external dependency.
Comment 1 Krzysztof 2016-04-12 09:53:19 UTC
Comment on attachment 169233 [details]
net-mgmt/collectd5 write_tsdb output plugin patch

OK. Thank you for adding another plugin to collectd. Have you tested it with poudriere? Could yoa add log from poudriere testport?
Comment 2 Krzysztof 2016-04-12 09:55:00 UTC
I set flag to +
Comment 3 dave 2016-04-12 22:25:37 UTC
Here it is:
root@srv1:/usr/local/etc/poudriere.d # poudriere bulk -j 10amd64 -p local -z workstation -f 10amd64-local-workstation-pkglist
[00:00:01] ====>> Creating the reference jail... done
[00:00:53] ====>> Mounting system devices for 10amd64-local-workstation
[00:00:53] ====>> Mounting ports/packages/distfiles
[00:00:53] ====>> Converting package repository to new format
[00:00:54] ====>> Stashing existing package repository
[00:00:54] ====>> Mounting packages from: /usr/local/poudriere/data/packages/10amd64-local-workstation
[00:00:54] ====>> Copying /var/db/ports from: /usr/local/etc/poudriere.d/10amd64-workstation-options
/etc/resolv.conf -> /usr/local/poudriere/data/.m/10amd64-local-workstation/ref/etc/resolv.conf
[00:00:54] ====>> Starting jail 10amd64-local-workstation
[00:00:54] ====>> Logs: /usr/local/poudriere/data/logs/bulk/10amd64-local-workstation/2016-04-12_22h56m01s
[00:00:54] ====>> Loading MOVED
[00:00:55] ====>> Calculating ports order and dependencies
[00:00:56] ====>> pkg package missing, skipping sanity
[00:00:56] ====>> Skipping incremental rebuild and repository sanity checks
[00:00:56] ====>> Cleaning the build queue
[00:00:57] ====>> Recording filesystem state for prepkg... done
[00:00:57] ====>> Building 25 packages using 1 builders
[00:00:57] ====>> Starting/Cloning builders
[00:01:07] ====>> Hit CTRL+t at any time to see build progress and stats
[00:01:07] ====>> [01][00:00:00] Starting build of ports-mgmt/pkg
[00:02:32] ====>> [01][00:01:25] Finished build of ports-mgmt/pkg: Success
[00:02:33] ====>> [01][00:00:00] Starting build of print/indexinfo
[00:02:35] ====>> [01][00:00:02] Finished build of print/indexinfo: Success
[00:02:35] ====>> [01][00:00:00] Starting build of devel/gettext-runtime
[00:02:53] ====>> [01][00:00:18] Finished build of devel/gettext-runtime: Success
[00:02:54] ====>> [01][00:00:00] Starting build of lang/perl5.20
[00:06:50] ====>> [01][00:03:56] Finished build of lang/perl5.20: Success
[00:06:50] ====>> [01][00:00:00] Starting build of devel/gettext-tools
[00:09:02] ====>> [01][00:02:12] Finished build of devel/gettext-tools: Success
[00:09:03] ====>> [01][00:00:00] Starting build of devel/gmake-lite
[00:09:12] ====>> [01][00:00:09] Finished build of devel/gmake-lite: Success
[00:09:12] ====>> [01][00:00:00] Starting build of devel/p5-Locale-gettext
[00:09:19] ====>> [01][00:00:07] Finished build of devel/p5-Locale-gettext: Success
[00:09:20] ====>> [01][00:00:00] Starting build of devel/autoconf-wrapper
[00:09:22] ====>> [01][00:00:02] Finished build of devel/autoconf-wrapper: Success
[00:09:22] ====>> [01][00:00:00] Starting build of devel/pkgconf
[00:09:25] ====>> [01][00:00:03] Finished build of devel/pkgconf: Success
[00:09:25] ====>> [01][00:00:00] Starting build of devel/libffi
[00:09:32] ====>> [01][00:00:07] Finished build of devel/libffi: Success
[00:09:32] ====>> [01][00:00:00] Starting build of devel/m4
[00:09:53] ====>> [01][00:00:21] Finished build of devel/m4: Success
[00:09:53] ====>> [01][00:00:00] Starting build of devel/gmake
[00:10:01] ====>> [01][00:00:08] Finished build of devel/gmake: Success
[00:10:01] ====>> [01][00:00:00] Starting build of misc/help2man
[00:10:10] ====>> [01][00:00:09] Finished build of misc/help2man: Success
[00:10:10] ====>> [01][00:00:00] Starting build of devel/automake-wrapper
[00:10:11] ====>> [01][00:00:01] Finished build of devel/automake-wrapper: Success
[00:10:12] ====>> [01][00:00:00] Starting build of converters/libiconv
[00:10:28] ====>> [01][00:00:16] Finished build of converters/libiconv: Success
[00:10:28] ====>> [01][00:00:00] Starting build of devel/pcre
[00:11:29] ====>> [01][00:01:01] Finished build of devel/pcre: Success
[00:11:29] ====>> [01][00:00:00] Starting build of security/ca_root_nss
[00:11:38] ====>> [01][00:00:09] Finished build of security/ca_root_nss: Success
[00:11:38] ====>> [01][00:00:00] Starting build of lang/python27
[00:13:02] ====>> [01][00:01:24] Finished build of lang/python27: Success
[00:13:02] ====>> [01][00:00:00] Starting build of devel/autoconf
[00:13:13] ====>> [01][00:00:11] Finished build of devel/autoconf: Success
[00:13:13] ====>> [01][00:00:00] Starting build of devel/libltdl
[00:13:19] ====>> [01][00:00:06] Finished build of devel/libltdl: Success
[00:13:19] ====>> [01][00:00:00] Starting build of devel/libtool
[00:13:25] ====>> [01][00:00:06] Finished build of devel/libtool: Success
[00:13:26] ====>> [01][00:00:00] Starting build of ftp/curl
[00:14:29] ====>> [01][00:01:03] Finished build of ftp/curl: Success
[00:14:29] ====>> [01][00:00:00] Starting build of devel/glib20
[00:16:39] ====>> [01][00:02:10] Finished build of devel/glib20: Success
[00:16:40] ====>> [01][00:00:00] Starting build of devel/automake
[00:16:50] ====>> [01][00:00:10] Finished build of devel/automake: Success
[00:16:50] ====>> [01][00:00:00] Starting build of net-mgmt/collectd5
[00:17:59] ====>> [01][00:01:09] Finished build of net-mgmt/collectd5: Success
[00:17:59] ====>> Stopping 1 builders
[00:18:01] ====>> Creating pkgng repository
Creating repository in /tmp/packages: 100%
Packing files for repository: 100%
[00:18:01] ====>> Committing packages to repository
[00:18:02] ====>> Removing old packages
[00:18:02] ====>> Built ports: ports-mgmt/pkg print/indexinfo devel/gettext-runtime lang/perl5.20 devel/gettext-tools devel/gmake-lite devel/p5-Lo
cale-gettext devel/autoconf-wrapper devel/pkgconf devel/libffi devel/m4 devel/gmake misc/help2man devel/automake-wrapper converters/libiconv devel
/pcre security/ca_root_nss lang/python27 devel/autoconf devel/libltdl devel/libtool ftp/curl devel/glib20 devel/automake net-mgmt/collectd5
[10amd64-local-workstation] [2016-04-12_22h56m01s] [committing:] Queued: 25 Built: 25 Failed: 0  Skipped: 0  Ignored: 0  Tobuild: 0   Time: 00:17:
08
[00:18:02] ====>> Logs: /usr/local/poudriere/data/logs/bulk/10amd64-local-workstation/2016-04-12_22h56m01s
[00:18:02] ====>> Cleaning up
[00:18:02] ====>> Umounting file systems
root@srv1:/usr/local/etc/poudriere.d # grep -i TSDB 10amd64-workstation-options/net-mgmt_collectd5/options
_FILE_COMPLETE_OPTIONS_LIST=CGI DEBUG GCRYPT LOGSTASH VIRT CURL CURL_JSON CURL_XML DBI IPMI JSON MEMCACHEC  MODBUS MYSQL NUTUPS OLSRD ONEWIRE OPENLDAP  PERL PGSQL PINBA PING PYTHON RABBITMQ REDIS ROUTEROS  SIGROK SNMP STATSD TOKYOTYRANT VARNISH XML  XMMS ZOOKEEPER KAFKA MONGODB NOTIFYDESKTOP NOTIFYEMAIL RIEMANN RRDTOOL  TSDB
OPTIONS_FILE_SET+=TSDB
root@srv1:/usr/local/poudriere/data/packages/10amd64-local-workstation/.real_1460495643/All # tar jtf collectd5-5.5.1_2.txz | grep write_tsdb
/usr/local/lib/collectd/write_tsdb.so
Comment 4 Krzysztof 2016-04-21 05:29:09 UTC
Created attachment 169508 [details]
collectd5 add tsdb patch

Hello,

I've checked your patch once again. Unfortunatelly it made some "rejects". So I've added your chnages manually and made a patch once again. Please make your patch obsolete.

Also I've check it with poudriere. As you can see:
https://rtm.bsdserwis.com/poudriere/data/a1amd64-testing/2016-04-21_07h18m15s/logs/collectd5-5.5.1_3.log

And when this option was not selected:
https://rtm.bsdserwis.com/poudriere/data/a1amd64-testing/2016-04-21_07h04m55s/logs/collectd5-5.5.1_3.log
Comment 5 Li-Wen Hsu freebsd_committer freebsd_triage 2016-04-21 06:15:52 UTC
Krzysztof, could you update your patch to against the latest version of this port, in r412348, ${PORTSDIR} is dropped.  Thanks.
Comment 6 dave 2016-04-21 09:49:31 UTC
Sorry, but I think you had many rejects because of PORTSDIR and not because of TSDB: to create the patch I attached I used the latest version of this port, where PORTSDIR has been already removed so I think my patch is the correct one to use here (well, I forgot to bump PORTREVISION :)).

The poudriere output seems ok with and without TSDB enabled.
Comment 7 Li-Wen Hsu freebsd_committer freebsd_triage 2016-04-21 10:01:25 UTC
PORTREVISION is not really needed as it is not default on. :)
Comment 8 Krzysztof 2016-04-21 10:32:47 UTC
(In reply to Li-Wen Hsu from comment #7)
OK, I agree. But on another side it bump portrevision will monitor some people that new option is added...
Comment 9 Li-Wen Hsu freebsd_committer freebsd_triage 2016-04-21 10:57:46 UTC
(In reply to Krzysztof from comment #8)
Right, so it's up to the decision of submitter/maintainer.
Comment 10 dave 2016-04-21 11:07:06 UTC
Created attachment 169517 [details]
net-mgmt/collectd5 write_tsdb patch to 5.5.1_3
Comment 11 dave 2016-04-21 11:09:50 UTC
Created a new version of the initial patch with bumped PORTREVISION
Comment 12 dave 2016-04-21 11:13:50 UTC
Comment on attachment 169517 [details]
net-mgmt/collectd5 write_tsdb patch to 5.5.1_3

>diff -ruh collectd5.orig/Makefile collectd5/Makefile
>--- collectd5.orig/Makefile.orig	2016-04-21 13:03:28.645582000 +0200
>+++ collectd5/Makefile	2016-04-21 13:04:31.858551000 +0200
>@@ -3,7 +3,7 @@
>
> PORTNAME=	collectd
> PORTVERSION=	5.5.1
>-PORTREVISION=	2
>+PORTREVISION=	3
> CATEGORIES=	net-mgmt
> MASTER_SITES=	https://collectd.org/files/ \
> 		http://collectd.org/files/
>@@ -24,7 +24,8 @@
>
> OPTIONS_DEFINE=                CGI DEBUG GCRYPT LOGSTASH VIRT
> OPTIONS_GROUP=         INPUT OUTPUT
>-OPTIONS_GROUP_OUTPUT=  KAFKA MONGODB NOTIFYDESKTOP NOTIFYEMAIL RIEMANN RRDTOOL
>+OPTIONS_GROUP_OUTPUT=  KAFKA MONGODB NOTIFYDESKTOP NOTIFYEMAIL RIEMANN RRDTOOL \
>+                       TSDB
> OPTIONS_GROUP_INPUT=   CURL CURL_JSON CURL_XML DBI IPMI JSON MEMCACHEC \
>                        MODBUS MYSQL NUTUPS OLSRD ONEWIRE OPENLDAP \
>                        PERL PGSQL PINBA PING PYTHON RABBITMQ REDIS ROUTEROS \
>@@ -66,6 +67,7 @@
> SNMP_DESC=             Enable SNMP plugin
> STATSD_DESC=           Enable statsd plugin
> TOKYOTYRANT_DESC=      Enable tokyotyrant plugin
>+TSDB_DESC=             Enable write_tsdb plugin
> VARNISH_DESC=          Enable varnish 4.x cache statistics
> VIRT_DESC=             Enable libvirt plugin (requires XML)
> XML_DESC=              Enable XML plugins
>@@ -241,6 +243,8 @@
> TOKYOTYRANT_CONFIGURE_ENABLE=  tokyotyrant
> TOKYOTYRANT_CONFIGURE_WITH=    libtokyotyrant=${LOCALBASE}
>
>+TSDB_CONFIGURE_ENABLE=         write_tsdb
>+
> VARNISH_LIB_DEPENDS=           libvarnishapi.so:www/varnish4
> VARNISH_CONFIGURE_ENABLE=      varnish
> VARNISH_CONFIGURE_WITH=                libvarnish=${LOCALBASE}
>diff -ruh collectd5.orig/pkg-plist collectd5/pkg-plist
>--- collectd5.orig/pkg-plist    2016-03-14 23:55:48.000000000 +0100
>+++ collectd5/pkg-plist 2016-04-12 09:35:09.494477000 +0200
>@@ -100,6 +100,7 @@
> %%MONGODB%%lib/collectd/write_mongodb.so
> %%REDIS%%lib/collectd/write_redis.so
> %%RIEMANN%%lib/collectd/write_riemann.so
>+%%TSDB%%lib/collectd/write_tsdb.so
> %%XMMS%%lib/collectd/xmms.so
> lib/collectd/zfs_arc.so
> %%ZOOKEEPER%%lib/collectd/zookeeper.so
Comment 13 dave 2016-04-21 11:18:45 UTC
Created attachment 169518 [details]
net-mgmt/collectd5 write_tsdb patch to 5.5.1_3 [updated]
Comment 14 Krzysztof 2016-04-21 15:07:23 UTC
Comment on attachment 169518 [details]
net-mgmt/collectd5 write_tsdb patch to 5.5.1_3 [updated]

OK, it is much better :-)))

But you should make:
cd /usr/ports (or another ports basedir)
diff -ruN net-mgmt/collectd5.orig/ net-mgmt/collectd5/

And such patch should be added here. Then I will be able to approve such patch.
Comment 15 dave 2016-04-21 15:16:16 UTC
Created attachment 169527 [details]
net-mgmt/collectd5 write_tsdb patch [revisited] [updated]

Here it is.
Comment 16 Krzysztof 2016-04-22 08:05:07 UTC
Comment on attachment 169508 [details]
collectd5 add tsdb patch

there are newer patches
Comment 17 Krzysztof 2016-04-22 08:06:26 UTC
Comment on attachment 169527 [details]
net-mgmt/collectd5 write_tsdb patch [revisited] [updated]

OK, this is final patch :-))) Please obsolete your first one.
Comment 18 commit-hook freebsd_committer freebsd_triage 2016-04-22 08:38:54 UTC
A commit references this bug:

Author: lwhsu
Date: Fri Apr 22 08:38:28 UTC 2016
New revision: 413766
URL: https://svnweb.freebsd.org/changeset/ports/413766

Log:
  - Enable write_tsdb output plugin

  PR:		208738
  Submitted by:	Davide D'Amico <davide.damico@gmail.com>
  Approved by:	Krzysztof <ports@bsdserwis.com> (maintainer)

Changes:
  head/net-mgmt/collectd5/Makefile
  head/net-mgmt/collectd5/pkg-plist