realityforge / chef-kibana

A chef cookbook that installs/configures kibana (the logstash UI)
24 stars 66 forks source link

config: unify kibana3 and kibana4 url #85

Closed wdauchy closed 4 years ago

wdauchy commented 8 years ago

use the same system to templatise the ES url for both kibana3 and kibana4

wdauchy commented 8 years ago

seems like tests are failing because of nginx; I don't think it is related to my changes

wdauchy commented 8 years ago

@realityforge or @cyberflow - any chance to review this?

realityforge commented 8 years ago

Unfortunately atm I am on a deathmarch and then off to holiday so wont be able to take a look :(

cyberflow commented 8 years ago

@wdauchy I'm not sure, but what happened if es_host will be 0.0.0.0? Because for kibana 3 it's configure nginx/apache and if i understand correctly config.js in kibana3 configuring browser part. It's working for you?

wdauchy commented 8 years ago

@cyberflow good point. I was just expecting node['kibana']['elasticsearch']['hosts'] would be set to correct values but indeed the default is 127.0.0.1 which makes it non working as well as 0.0.0.0.

What do you think if I test node['kibana']['elasticsearch']['hosts'].first value?

e.g

if ['127.0.0.1', '0.0.0.0'].include? node['kibana']['elasticsearch']['hosts'].first
  elasticsearch: "http://" + window.location.hostname + ":<%= @es_port %>",
else
  elasticsearch: "http://<%= @es_host %>:<%= @es_port %>",
end
cyberflow commented 8 years ago

@wdauchy I think that it's not make sense do it with only '.first' element of array. If you want to do this will be better make config with all addresses of elasticsearch cluster. Also i prefer to do special attribute for windows.location.hostname option in kibana 3 config. I think it's will be more flexible.

wdauchy commented 8 years ago

@cyberflow I also agree .first is not ideal but that's precisely what is used in kibana4.rb: ./recipes/kibana4.rb: es_host: node['kibana']['elasticsearch']['hosts'].first,

realityforge commented 4 years ago

Closing due to lack of activity and out of date