Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

default['logstash']['instance_default']['elasticsearch_port'] is never used #396

Closed
kevindickerson opened this issue Feb 25, 2015 · 3 comments · Fixed by #469
Closed

default['logstash']['instance_default']['elasticsearch_port'] is never used #396

kevindickerson opened this issue Feb 25, 2015 · 3 comments · Fixed by #469

Comments

@kevindickerson
Copy link

It appears as though default['logstash']['instance_default']['elasticsearch_port'] is never used, but is only set to '' in attributes/default.rb.

Is this value ever used?

@spuder
Copy link
Contributor

spuder commented Mar 11, 2015

I'm not sure, but I'm guessing that this value is intended to be used inside your templates.

https://github.com/lusis/chef-logstash/blob/master/templates/default/config/output_elasticsearch.conf.erb

@ralphm
Copy link
Contributor

ralphm commented Apr 30, 2015

The only problem with this is that this doesn't work as expected. As far as I can see, all these variables should be in default['logstash']['instance_default']['config_templates_variables']. I see that this test also uses the old way, and doesn't actually check the output having elasticsearch_ip or enable_embedded_es rendered properly.

It would be nice if there were examples of the proper use of these template variables, including one where you set them in the logstash_config resource.

@spuder
Copy link
Contributor

spuder commented Jul 8, 2015

I don't quite understand how elasticsearch_port is used, but I do see that elasticsearch_ip is used by the curator lwrp.

If you use chef-solo, and you forget to set elasticsearch_ip, then your curator cron will have a blank host value.

https://github.com/lusis/chef-logstash/blob/master/providers/curator.rb#L43
https://github.com/lusis/chef-logstash/blob/master/.kitchen.yml#L45
https://github.com/lusis/chef-logstash/blob/master/libraries/logstash_util.rb#L6-L15

martinb3 pushed a commit that referenced this issue Jun 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants