f51d974205
It has been requested that we provide programmatic access to the elasticsearch API in addition to the Kibana web UI. Do this by reverse proxying http://logstash.openstack.org/elasticearch/$API_REQUEST to http://elasticsearch.openstack.org:9200/$API_REQUEST. The only values for $API_REQUEST that will be passed through are _aliases, _status, and _search. Change-Id: Ib41f6d91e2e59d493218074a67155af450ec8c93 Reviewed-on: https://review.openstack.org/33316 Reviewed-by: James E. Blair <corvus@inaugust.com> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
22 lines
1.1 KiB
Plaintext
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::elasticsearch_host") %>:9200/$1
|
|
</LocationMatch>
|
|
ProxyPassReverse /elasticsearch/ http://<%= scope.lookupvar("::logstash::web::elasticsearch_host") %>:9200/
|
|
<% end %>
|
|
|
|
ProxyPass / http://127.0.0.1:5601/ retry=0
|
|
ProxyPassReverse / http://127.0.0.1:5601/
|
|
</VirtualHost>
|