Ema has submitted this change and it was merged.
Change subject: Add 0009-tcp-collector-specify-gauges.patch
......................................................................
Add 0009-tcp-collector-specify-gauges.patch
- TCP collector: add a new 'gauges' config option to specify which
metrics should be published as gauges
- Add upstream-{branch,tree} to gbp.conf
- Other minor packaging updates
Bug: T138758
Change-Id: If4512c66569984f44cfc3b724c31d2da52744380
---
M debian/changelog
M debian/control
M debian/gbp.conf
A debian/patches/0009-tcp-collector-specify-gauges.patch
M debian/patches/series
5 files changed, 73 insertions(+), 1 deletion(-)
Approvals:
Filippo Giunchedi: Looks good to me, but someone else must approve
Ema: Verified; Looks good to me, approved
diff --git a/debian/changelog b/debian/changelog
index 40f2bbc..5f5485a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+diamond (3.5-6) jessie; urgency=medium
+
+ * TCP collector: add config option to specify metrics published as gauges
+ debian/patches/0009-tcp-collector-specify-gauges.patch
+ * Add upstream-{branch,tree} to debian/gbp.conf
+ * Bump Standards-Version
+ * Add myself to Uploaders
+
+ -- Emanuele Rocca <[email protected]> Tue, 28 Jun 2016 11:37:00 +0200
+
diamond (3.5-5) jessie; urgency=medium
* Stop forcing logging to stdout which also forces DEBUG logging level, use
diff --git a/debian/control b/debian/control
index af665b0..9c07ebd 100644
--- a/debian/control
+++ b/debian/control
@@ -2,8 +2,9 @@
Section: python
Priority: optional
Maintainer: Filippo Giunchedi <[email protected]>
+Uploaders: Emanuele Rocca <[email protected]>
Build-Depends: debhelper (>= 9), python-all (>= 2.7), python-mock,
python-configobj, dh-python, dh-systemd
-Standards-Version: 3.9.6
+Standards-Version: 3.9.8
X-Python-Version: >= 2.7
Package: diamond
diff --git a/debian/gbp.conf b/debian/gbp.conf
index 7437c39..ed58312 100644
--- a/debian/gbp.conf
+++ b/debian/gbp.conf
@@ -2,3 +2,7 @@
[import-orig]
filter = debian/*
filter = */debian/*
+
+[DEFAULT]
+upstream-branch=upstream
+upstream-tree=branch
diff --git a/debian/patches/0009-tcp-collector-specify-gauges.patch
b/debian/patches/0009-tcp-collector-specify-gauges.patch
new file mode 100644
index 0000000..e5a6f91
--- /dev/null
+++ b/debian/patches/0009-tcp-collector-specify-gauges.patch
@@ -0,0 +1,56 @@
+From: Emanuele Rocca <[email protected]>
+Date: Tue, 28 Jun 2016 11:38:35 +0200
+Subject: TCP collector: allow to specify metrics to be published as gauges
+
+Add a new 'gauges' config option to specify which metrics should be published
+as gauges.
+---
+ tcp.py | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/collectors/tcp/tcp.py b/src/collectors/tcp/tcp.py
+index 76859fb..4048088 100644
+--- a/src/collectors/tcp/tcp.py
++++ b/src/collectors/tcp/tcp.py
+@@ -187,20 +187,19 @@ class TCPCollector(diamond.collector.Collector):
+ '/proc/net/snmp'
+ ]
+
+- GAUGES = [
+- 'CurrEstab',
+- 'MaxConn',
+- ]
+-
+ def __init__(self, config, handlers):
+ super(TCPCollector, self).__init__(config, handlers)
+ if self.config['allowed_names'] is None:
+ self.config['allowed_names'] = []
+
++ if self.config['gauges'] is None:
++ self.config['gauges'] = []
++
+ def get_default_config_help(self):
+ config_help = super(TCPCollector, self).get_default_config_help()
+ config_help.update({
+ 'allowed_names': 'list of entries to collect, empty to collect
all',
++ 'gauges': 'list of metrics to be published as gauges',
+ })
+ return config_help
+
+@@ -216,6 +215,7 @@ class TCPCollector(diamond.collector.Collector):
+ + 'TCPForwardRetrans, TCPSlowStartRetrans, CurrEstab, '
+ + 'TCPAbortOnMemory, TCPBacklogDrop, AttemptFails, '
+ + 'EstabResets, InErrs, ActiveOpens, PassiveOpens',
++ 'gauges': 'CurrEstab, MaxConn',
+ })
+ return config
+
+@@ -270,7 +270,7 @@ class TCPCollector(diamond.collector.Collector):
+ value = long(metrics[metric_name])
+
+ # Publish the metric
+- if metric_name in self.GAUGES:
++ if metric_name in self.config['gauges']:
+ self.publish_gauge(metric_name, value, 0)
+ else:
+ self.publish_counter(metric_name, value, 0)
diff --git a/debian/patches/series b/debian/patches/series
index 1abbed3..4d73520 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
0006-remove-distro-detection-from-setup.py.patch
0007-add-transitional-dastatsd.patch
0008-statsd-use-pystatsd-pipeline-to-send-batches.patch
+0009-tcp-collector-specify-gauges.patch
--
To view, visit https://gerrit.wikimedia.org/r/296380
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If4512c66569984f44cfc3b724c31d2da52744380
Gerrit-PatchSet: 2
Gerrit-Project: operations/debs/python-diamond
Gerrit-Branch: master
Gerrit-Owner: Ema <[email protected]>
Gerrit-Reviewer: Ema <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits