system-config/modules/logstash/templates/kibana.vhost.erb
Clark Boylan ff9e6449c4 Increase connection timeout to ES servers.
* modules/logstash/templates/kibana.vhost.erb: Increase the connection
timeout to ElasticSearch when proxying to the limited ES API. This
prevents errors when ElasticSearch is slow due to cold caches.

Change-Id: I066a7c7822a0ae75bda52b9b37ad27bc07bd7e0a
2013-09-13 16:17:04 -07: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|_cluster/health)$">
ProxyPassMatch http://<%= scope.lookupvar("::logstash::web::discover_nodes")[0] %>/$1 connectiontimeout=15 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>