Ottomata has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/92325


Change subject: Making elasticsearch ganglia plugin query $ipaddress instead of 
localhost for ES stats.
......................................................................

Making elasticsearch ganglia plugin query $ipaddress instead of localhost for 
ES stats.

For some reason, elasticsearch is not responding to HTTP requests on localhost.

Change-Id: I293d269c7b81e228a5fe16c8a5866743bf0f93bb
---
R modules/elasticsearch/templates/ganglia/.pep8
R modules/elasticsearch/templates/ganglia/elasticsearch.pyconf.erb
R modules/elasticsearch/templates/ganglia/elasticsearch_monitoring.py.erb
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/25/92325/1

diff --git a/modules/elasticsearch/files/ganglia/.pep8 
b/modules/elasticsearch/templates/ganglia/.pep8
similarity index 100%
rename from modules/elasticsearch/files/ganglia/.pep8
rename to modules/elasticsearch/templates/ganglia/.pep8
diff --git a/modules/elasticsearch/files/ganglia/elasticsearch.pyconf 
b/modules/elasticsearch/templates/ganglia/elasticsearch.pyconf.erb
similarity index 90%
rename from modules/elasticsearch/files/ganglia/elasticsearch.pyconf
rename to modules/elasticsearch/templates/ganglia/elasticsearch.pyconf.erb
index 076bd01..fe728e6 100644
--- a/modules/elasticsearch/files/ganglia/elasticsearch.pyconf
+++ b/modules/elasticsearch/templates/ganglia/elasticsearch.pyconf.erb
@@ -8,10 +8,10 @@
     }
 
     param host {
-        value = "http://localhost:9200/";
+        value = "http://<%= @ipaddress %>:9200/"
     }
 
-    # In order to get index specific stats specify each index seperated by
+    # In order to get index specific stats specify each index separated by
     # whitespace.
     #
     # indices can be grouped by using comma,
diff --git a/modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py 
b/modules/elasticsearch/templates/ganglia/elasticsearch_monitoring.py.erb
similarity index 98%
rename from modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py
rename to 
modules/elasticsearch/templates/ganglia/elasticsearch_monitoring.py.erb
index 4a22e15..9cdf791 100644
--- a/modules/elasticsearch/files/ganglia/elasticsearch_monitoring.py
+++ b/modules/elasticsearch/templates/ganglia/elasticsearch_monitoring.py.erb
@@ -730,7 +730,7 @@
 
 #This code is for debugging and unit testing
 if __name__ == '__main__':
-    descriptors = metric_init({})
+    descriptors = metric_init({'host': 'http://<%= @ipaddress %>:9200/'})
     for d in descriptors:
         v = d['call_back'](d['name'])
         print 'value for %s is %s' % (d['name'], str(v))

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I293d269c7b81e228a5fe16c8a5866743bf0f93bb
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to