Merge lp:~michael.nelson/charms/trusty/elasticsearch/optional-expected-health into lp:~onlineservices-charmers/charms/trusty/elasticsearch/elasticsearch2

Proposed by Michael Nelson
Status: Merged
Approved by: Michael Nelson
Approved revision: 44
Merged at revision: 44
Proposed branch: lp:~michael.nelson/charms/trusty/elasticsearch/optional-expected-health
Merge into: lp:~onlineservices-charmers/charms/trusty/elasticsearch/elasticsearch2
Diff against target: 27 lines (+8/-1)
2 files modified
config.yaml (+7/-0)
playbook.yaml (+1/-1)
To merge this branch: bzr merge lp:~michael.nelson/charms/trusty/elasticsearch/optional-expected-health
Reviewer Review Type Date Requested Status
Shawn Wang (community) Approve
Michael Nelson (community) Approve
Review via email:

Commit message

Add an option for expected cluster health color.

Description of the change

In development, the recent change to mlock the required java memory causes a second ES unit to not start on the lxc provider (which makes sense).

So I tried to instead use just one ES unit in my devel setup, but this then means that the health status is yellow (meaning everything is fine, the primary shard is allocated but there are no replicas). I'm OK with that, and so need to be able to specify that we expect a yellow health in this case.

To post a comment you must log in.
Revision history for this message
Michael Nelson (michael.nelson) wrote :

I've tested this with a local deployment and it indeed fixes the issue - enabling me to deploy just one ES unit locally, and expect yellow health. Self-approving to move on.

review: Approve
Revision history for this message
Shawn Wang (shawn111) wrote :


review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2015-11-18 03:05:16 +0000
3+++ config.yaml 2015-11-27 03:01:59 +0000
4@@ -34,3 +34,10 @@
5 By default, the heap size will be set to the maximum of half of the
6 available memory and 30.5G. A number in gigabytes for the Elasticsearch
7 heap size.
8+ nagios_health_color:
9+ type: string
10+ default: green
11+ description: |
12+ By default we expect the cluster health to be green, but in some cases,
13+ such as deploying a dev setup with a single instance, we can only expect
14+ yellow as there is a primary shard but no replicas.
16=== modified file 'playbook.yaml'
17--- playbook.yaml 2015-11-20 03:06:23 +0000
18+++ playbook.yaml 2015-11-27 03:01:59 +0000
19@@ -2,7 +2,7 @@
20 roles:
21 - role: nrpe
22 check_name: check_http
23- check_params: -H localhost -u /_cluster/health -p 9200 -w 2 -c 3 -s green
24+ check_params: -H localhost -u /_cluster/health -p 9200 -w 2 -c 3 -s {{ nagios_health_color }}
25 service_description: "Verify the cluster health is green."
27 handlers:


People subscribed via source and target branches