[MediaWiki-commits] [Gerrit] operations/puppet[production]: varnish cachestats.py: make key_prefix configurable

2016-12-15 Thread Ema (Code Review)
Ema has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/327504 )

Change subject: varnish cachestats.py: make key_prefix configurable
..


varnish cachestats.py: make key_prefix configurable

Bug: T151643
Change-Id: I2edffc6c766fc30075c7a6848fd5347b78b24e38
---
M modules/varnish/files/cachestats.py
M modules/varnish/files/varnishxcps
2 files changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Ema: Verified; Looks good to me, approved
  Volans: Looks good to me, but someone else must approve



diff --git a/modules/varnish/files/cachestats.py 
b/modules/varnish/files/cachestats.py
index fa3ee28..3650765 100644
--- a/modules/varnish/files/cachestats.py
+++ b/modules/varnish/files/cachestats.py
@@ -52,6 +52,7 @@
 
 cmd = []
 description = ''
+key_prefix = ''
 
 def __init__(self, argument_list):
 """Parse CLI arguments, initialize self.stats and statsd socket.
@@ -65,7 +66,7 @@
 ap.add_argument('--statsd-server', help='statsd server',
 type=parse_statsd_server_string, default=None)
 ap.add_argument('--key-prefix', help='metric key prefix',
-type=parse_prefix_string, default='varnish.clients')
+type=parse_prefix_string, default=self.key_prefix)
 ap.add_argument('--interval', help='send interval',
 type=int, default=30)
 self.args = ap.parse_args(argument_list)
diff --git a/modules/varnish/files/varnishxcps 
b/modules/varnish/files/varnishxcps
index c24feed..9ec94a5 100755
--- a/modules/varnish/files/varnishxcps
+++ b/modules/varnish/files/varnishxcps
@@ -42,6 +42,8 @@
 
 description = 'X-Connection-Properties StatsD reporter'
 
+key_prefix = 'varnish.clients'
+
 def __init__(self, argument_list):
 super(XcpsCacheStatsSender, self).__init__(argument_list)
 self.key_value_pairs = re.compile('([A-Z][A-Z0-9]*)=([^;]+)')

-- 
To view, visit https://gerrit.wikimedia.org/r/327504
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2edffc6c766fc30075c7a6848fd5347b78b24e38
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Elukey 
Gerrit-Reviewer: Ema 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] operations/puppet[production]: varnish cachestats.py: make key_prefix configurable

2016-12-15 Thread Ema (Code Review)
Ema has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/327504 )

Change subject: varnish cachestats.py: make key_prefix configurable
..

varnish cachestats.py: make key_prefix configurable

Bug: T151643
Change-Id: I2edffc6c766fc30075c7a6848fd5347b78b24e38
---
M modules/varnish/files/cachestats.py
M modules/varnish/files/varnishxcps
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/327504/1

diff --git a/modules/varnish/files/cachestats.py 
b/modules/varnish/files/cachestats.py
index fa3ee28..3650765 100644
--- a/modules/varnish/files/cachestats.py
+++ b/modules/varnish/files/cachestats.py
@@ -52,6 +52,7 @@
 
 cmd = []
 description = ''
+key_prefix = ''
 
 def __init__(self, argument_list):
 """Parse CLI arguments, initialize self.stats and statsd socket.
@@ -65,7 +66,7 @@
 ap.add_argument('--statsd-server', help='statsd server',
 type=parse_statsd_server_string, default=None)
 ap.add_argument('--key-prefix', help='metric key prefix',
-type=parse_prefix_string, default='varnish.clients')
+type=parse_prefix_string, default=self.key_prefix)
 ap.add_argument('--interval', help='send interval',
 type=int, default=30)
 self.args = ap.parse_args(argument_list)
diff --git a/modules/varnish/files/varnishxcps 
b/modules/varnish/files/varnishxcps
index c24feed..9ec94a5 100755
--- a/modules/varnish/files/varnishxcps
+++ b/modules/varnish/files/varnishxcps
@@ -42,6 +42,8 @@
 
 description = 'X-Connection-Properties StatsD reporter'
 
+key_prefix = 'varnish.clients'
+
 def __init__(self, argument_list):
 super(XcpsCacheStatsSender, self).__init__(argument_list)
 self.key_value_pairs = re.compile('([A-Z][A-Z0-9]*)=([^;]+)')

-- 
To view, visit https://gerrit.wikimedia.org/r/327504
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2edffc6c766fc30075c7a6848fd5347b78b24e38
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits