diff --git a/README.rst b/README.rst
index 7e25b25d..7f62c8b9 100644
--- a/README.rst
+++ b/README.rst
@@ -199,9 +199,10 @@ You can execute an individual query locally and analyze the search results::
Notes
-----
-The html generation will generate links that work with Kibana3's logstash.json
-dashboard. If you want the links to work properly on these generated files
-you will need to host a Kibana3 with that dashboard.
+* The html generation will generate links that work with Kibana3's
+ logstash.json dashboard. If you want the links to work properly on these
+ generated files you will need to host a Kibana3 with that dashboard.
+* View the OpenStack ElasticSearch `cluster health here`_.
Future Work
-----------
@@ -215,3 +216,6 @@ Future Work
- Move away from polling ElasticSearch to discover if its ready or not
- Add nightly job to propose a patch to remove bug queries that return
no hits -- Bug hasn't been seen in 2 weeks and must be closed
+
+
+.. _cluster health here: http://logstash.openstack.org/elasticsearch/_cluster/health?pretty=true
diff --git a/elastic_recheck/cmd/graph.py b/elastic_recheck/cmd/graph.py
index 9aee62f1..7c03ef45 100755
--- a/elastic_recheck/cmd/graph.py
+++ b/elastic_recheck/cmd/graph.py
@@ -159,6 +159,10 @@ def main():
'buglist': []
}
+ # Get the cluster health for the header
+ es = pyelasticsearch.ElasticSearch(es_url)
+ jsondata['status'] = es.health()['status']
+
for query in classifier.queries:
if args.queue:
query['query'] = query['query'] + (' AND build_queue:%s' %
diff --git a/web/share/elastic-recheck.js b/web/share/elastic-recheck.js
index 7f569423..e43aed59 100644
--- a/web/share/elastic-recheck.js
+++ b/web/share/elastic-recheck.js
@@ -55,6 +55,20 @@ function update_critical_dates(data) {
}
}
+function update_health(data) {
+ var health = $('#health');
+ health.text(data['status']);
+ $('#health').text(data['status']);
+ if (data['status'] == 'red') {
+ // TODO(mriedem): link to the cluster health details
+ // http://logstash.openstack.org/elasticsearch/_cluster/health?pretty=true
+ health.css('font-weight', 'bold');
+ } else {
+ health.css('font-weight', 'normal');
+ }
+ health.css('color', data['status']);
+}
+
function update() {
var source = $("#bug-template").html();
var template = Handlebars.compile(source);
@@ -64,6 +78,7 @@ function update() {
if ('buglist' in data) {
buglist = data['buglist'];
update_critical_dates(data);
+ update_health(data);
}
var main = $('#main-container');
diff --git a/web/share/gate.html b/web/share/gate.html
index 602f5b38..f3a4abbc 100644
--- a/web/share/gate.html
+++ b/web/share/gate.html
@@ -93,6 +93,7 @@
Data Last Updated:
Last Elastic Search Index Update:
Delay in Elastic Search:
+ Cluster Health: