Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monit issues (template file name, internal issues) #8

Closed
ryan-roemer opened this issue Mar 9, 2012 · 7 comments
Closed

Monit issues (template file name, internal issues) #8

ryan-roemer opened this issue Mar 9, 2012 · 7 comments

Comments

@ryan-roemer
Copy link

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 too 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.

@karmi
Copy link
Contributor

karmi commented Mar 9, 2012

Argh, you're right -- this has slipped me, because we have a customized Monit cookbook which uses *.monitrc (we think it's a better naming). I think we should bend to monit cookbook's will here, though :/

The http_auth issue is again related to our particular setup, where we have a HTTP authentication setup for the Monit web frontend -- this is clearly bad. I'll fix the cookbok to work with the stock Monit recipe!

Glad that the cookbook is useful, thanks! :)

@karmi karmi closed this as completed in 38d2007 Mar 9, 2012
@karmi
Copy link
Contributor

karmi commented Mar 9, 2012

Ryan, check the fix, please -- works locally with Vagrant and stock Monit cookbook.

@karmi
Copy link
Contributor

karmi commented Mar 9, 2012

Also, could you please check the setup with 90ed2a1? It contains a fix for proper installation of the cloud-aws plugin on ES 0.19.

@ryan-roemer
Copy link
Author

Hi Karel,

Thanks for the rapid turnaround! I won't be able to check things in code until this weekend or Monday, but it looks correct on inspection. I also separately ran into the cloud-aws plugin issue and your fix looks analogous to what I did (sorry, I didn't have a chance to wrap it up in an issue yet). I'll report back for sure when I run it through my staging system.

Thanks again,
Ryan

@karmi
Copy link
Contributor

karmi commented Mar 9, 2012

Hi Ryan, no rush, and thanks!

@ryan-roemer
Copy link
Author

Updated and deployed. Everything looks good. Thanks Karel!

karmi added a commit that referenced this issue Oct 20, 2013
@karmi
Copy link
Contributor

karmi commented Oct 20, 2013

While investigating Monit issues, pushed 42db58c -- the Monit integration actually has been relying on default template location/filename. Should work now -- added a test to Vagrant as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants