835368524e
Vitrage has already supported Prometheus as datasource. Kolla can config it automatically, just need a little changes, for example in wsgi config file [1]. Co-Authored-By: Hieu LE <hieulq2@viettel.com.vn> [1] https://review.openstack.org/#/c/584649/8/devstack/apache-vitrage.template Change-Id: I64028a0dfd9887813b980a31c30c2c1b1046da61
33 lines
1.2 KiB
Django/Jinja
33 lines
1.2 KiB
Django/Jinja
{% set python_path = '/usr/lib/python2.7/site-packages' if kolla_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %}
|
|
Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ vitrage_api_port }}
|
|
|
|
ServerSignature Off
|
|
ServerTokens Prod
|
|
TraceEnable off
|
|
|
|
<VirtualHost *:{{ vitrage_api_port }}>
|
|
|
|
## Vhost docroot
|
|
DocumentRoot "/var/www/cgi-bin/vitrage"
|
|
|
|
## Directories, there should at least be a declaration for /var/www/cgi-bin/vitrage
|
|
|
|
<Directory "/var/www/cgi-bin/vitrage">
|
|
Options Indexes FollowSymLinks MultiViews
|
|
AllowOverride None
|
|
Require all granted
|
|
</Directory>
|
|
|
|
## Logging
|
|
ErrorLog "/var/log/kolla/vitrage/vitrage_wsgi_error.log"
|
|
ServerSignature Off
|
|
CustomLog "/var/log/kolla/vitrage/vitrage_wsgi_access.log" combined
|
|
WSGIApplicationGroup %{GLOBAL}
|
|
WSGIDaemonProcess vitrage group=vitrage processes={{ openstack_service_workers }} threads=1 user=vitrage python-path={{ python_path }}
|
|
WSGIProcessGroup vitrage
|
|
WSGIScriptAlias / "/var/www/cgi-bin/vitrage/app.wsgi"
|
|
{% if enable_vitrage_prometheus_datasource | bool %}
|
|
WSGIPassAuthorization On
|
|
{% endif %}
|
|
</VirtualHost>
|