Ema has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/366564 )
Change subject: varnish cachestats.py: cache statsd server IP
......................................................................
varnish cachestats.py: cache statsd server IP
Resolve statsd's server IP once at startup instead of doing it every
time a metric is sent.
Bug: T151643
Change-Id: I44765095dfd54be5796c33877256ee94de004844
---
M modules/varnish/files/cachestats.py
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/64/366564/1
diff --git a/modules/varnish/files/cachestats.py
b/modules/varnish/files/cachestats.py
index cf3a0f4..97c9c20 100644
--- a/modules/varnish/files/cachestats.py
+++ b/modules/varnish/files/cachestats.py
@@ -79,6 +79,12 @@
# Initialize stats to default values
self.stats = self.default_stats
+ # Resolve statsd's server IP once at startup instead of doing it every
+ # time a metric is sent. T151643
+ if self.args.statsd_server:
+ statsd_ip = socket.gethostbyname(self.args.statsd_server[0])
+ self.args.statsd_server = statsd_ip, self.args.statsd_server[1]
+
@property
def default_stats(self):
"""Return default stats"""
--
To view, visit https://gerrit.wikimedia.org/r/366564
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I44765095dfd54be5796c33877256ee94de004844
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits