karmi/cookbook-elasticsearch — Issue #8: Monit issues (template file name, internal issues)
Author: ryan-roemer
Created: 2012-03-09 21:34:01+00:00
State: open

First of all, I wanted to say: **great cookbook**! I've been hacking around with various other ElasticSearch cookbooks, and this was the only one that was current, works with AWS, and doesn't drag in a whole mess of other dependencies.

One thing I found on initially running the recipe is that the Monit conf template is "elasticsearch.monitrc.erb", but the `monitrc` recipe (v0.6) has a hard-coded assumption of `"#{name}.conf.erb"`. I ended up renaming "elasticsearch.monitrc.erb" to "elasticsearch.conf.erb" to get past it, but I don't particularly like my solution as "elasticsearch.conf.erb" sounds to general.

Here's my exception:

[Fri, 09 Mar 2012 20:25:41 +0000] ERROR: template[/etc/monit/conf.d/elasticsearch.conf] (/var/cache/chef/cookbooks/monit/libraries/monitrc.rb:8:in `monitrc') had an error:
template[/etc/monit/conf.d/elasticsearch.conf] (elasticsearch::default line 8) had an error: Chef::Exceptions::FileNotFound: Cookbook 'elasticsearch' (0.0.1) does not contain a file at any of these locations:
templates/ubuntu-11.10/elasticsearch.conf.erb
templates/ubuntu/elasticsearch.conf.erb
templates/default/elasticsearch.conf.erb

Also, I get an error for this line in the monit conf:

http://<%= node.monit[:http_auth]['username'] %>:<%= node.monit[:http_auth]['password_encoded'] %>@<%= node.cloud.public_hostname %>:2812/elasticsearch_cluster_health

Skimming the monit recipe, I don't see an `http_auth` attribute anywhere.