system-config/modules/logstash/templates/kibana.vhost.erb
Clark Boylan 3d2d1772fe Better elasticsearch proxy settings.
* modules/logstash/templates/kibana.vhost.erb: Set proxy timeouts and
allow /_status and /_search.

Change-Id: I67f6152bcda5999a27fef07c8428ac12d3a0201c
Reviewed-on: https://review.openstack.org/34252
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-07-01 17:49:25 +00:00

22 lines
1.1 KiB
Plaintext

<VirtualHost <%= scope.lookupvar("::logstash::web::vhost_name") %>:80>
ServerName <%= scope.lookupvar("::logstash::web::vhost_name") %>
ServerAdmin <%= scope.lookupvar("::logstash::web::serveradmin") %>
ErrorLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::logstash::web::vhost_name") %>-error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/<%= scope.lookupvar("::logstash::web::vhost_name") %>-access.log combined
<% if proxy_elasticsearch == true %>
# Proxy for elasticsearch _aliases, .*/_status, and .*/_search.
<LocationMatch "^/elasticsearch/(_aliases|(.*/)?_status|(.*/)?_search)$">
ProxyPassMatch http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 connectiontimeout=5 timeout=120
</LocationMatch>
ProxyPassReverse /elasticsearch/ http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/
<% end %>
ProxyPass / http://127.0.0.1:5601/ retry=0
ProxyPassReverse / http://127.0.0.1:5601/
</VirtualHost>