Smalyshev has uploaded a new change for review. https://gerrit.wikimedia.org/r/287131
Change subject: Don't start Jolokia each time, let Updater start it ...................................................................... Don't start Jolokia each time, let Updater start it Bug: T134523 Change-Id: I114bd8c59c56dacbce4e11781d3c42e1b8f631f6 --- M modules/wdqs/files/monitor/wdqs_updater.py 1 file changed, 7 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/31/287131/1 diff --git a/modules/wdqs/files/monitor/wdqs_updater.py b/modules/wdqs/files/monitor/wdqs_updater.py index 6834679..c58851f 100644 --- a/modules/wdqs/files/monitor/wdqs_updater.py +++ b/modules/wdqs/files/monitor/wdqs_updater.py @@ -19,6 +19,7 @@ 'runner': 'Path to Jolokia runner', 'counters': 'List of counters to collect', 'sudo_user': 'The user to use if using sudo', + 'port': 'Jolokia port', }) return chelp @@ -31,6 +32,7 @@ 'runner': '/srv/wdqs/blazegraph/jolokia.sh', 'counters': ["updates/MeanRate", "batch-progress/MeanRate"], 'sudo_user': 'blazegraph', + 'port': 8778, }) return config @@ -57,12 +59,8 @@ self.log.error("No value found in data") def collect(self): - self.start_jolokia() - try: - for counter in self.config['counters']: - data = self.get_data(counter) - if data: - self.publish(self.query_to_metric(counter), - data) - finally: - self.stop_jolokia() + self.url = "http://localhost:%d/jolokia/" % self.config['port'] + for counter in self.config['counters']: + data = self.get_data(counter) + if data: + self.publish(self.query_to_metric(counter), data) -- To view, visit https://gerrit.wikimedia.org/r/287131 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I114bd8c59c56dacbce4e11781d3c42e1b8f631f6 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Smalyshev <smalys...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits