openstack-ansible-os_monasca/extras/os_horizon/templates/monasca-ui/local_settings.py.j2

87 lines
3.2 KiB
Django/Jinja

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
# Service group names (global across all projects):
MONITORING_SERVICES_GROUPS = [
{'name': _('OpenStack Services'), 'groupBy': 'service'},
{'name': _('Servers'), 'groupBy': 'hostname'}
]
# Services being monitored
MONITORING_SERVICES = getattr(
settings,
'MONITORING_SERVICES_GROUPS',
MONITORING_SERVICES_GROUPS
)
#
# Per project service groups. If in this form,
# '*' will be applied to all projects not explicitly listed.
#
# Note the above form (flat) is supported for backward compatibility.
#
# MONITORING_SERVICES_GROUPS = [
# {'admin': [
# {'name': _('OpenStack Services'), 'groupBy': 'service'},
# {'name': _('Servers'), 'groupBy': 'hostname'}]},
# {'*': [
# {'name': _('Services'), 'groupBy': 'service'},
# {'name': _('Instances'), 'groupBy': 'hostname'}]},
# ]
MONITORING_SERVICE_TYPE = getattr(
settings, 'MONITORING_SERVICE_TYPE', 'monitoring'
)
# Grafana button titles/file names (global across all projects):
GRAFANA_LINKS = [
{% if (groups['ceph_all'] is defined) and (groups['ceph_all'] | length > 0) %}
{'title': 'Ceph Dashboard', 'path': 'ceph-dashboard'},
{'title': 'Ceph OSDs Dashboard', 'path': 'ceph-osds-dashboard'},
{'title': 'Ceph Pools Dashboard', 'path': 'ceph-pools-dashboard'},
{% endif %}
{'title': 'Containers Dashboard', 'path': 'containers-dashboard'},
{'title': 'Hosts Dashboard', 'path': 'hosts-dashboard'},
{'title': 'Infra Dashboard', 'path': 'infra-dashboard'},
{'title': 'Instances Dashboard', 'path': 'instances-dashboard'}
]
DASHBOARDS = getattr(settings, 'GRAFANA_LINKS', GRAFANA_LINKS)
#
# Horizon will link to the grafana home page when using Grafana2.
# For any Grafana version additional links to specific dashboards can be
# created in two formats.
# Flat:
# GRAFANA_LINKS = [ {'title': _('Dashboard'), 'path': 'openstack'} ]
#
# Per project: '*' will be applied to all projects not explicitly listed.
# GRAFANA_LINKS = [
# {'admin': [
# {'title': _('Dashboard'), 'path': 'openstack'}]},
# {'*': [
# {'title': _('OpenStack Dashboard'), 'path': 'project'}]}
# ]
GRAFANA_URL = { '{{ horizon_service_region }}': '{{ horizon_grafana_url }}', }
ENABLE_KIBANA_BUTTON = getattr(settings, 'ENABLE_KIBANA_BUTTON', False)
KIBANA_POLICY_RULE = getattr(settings, 'KIBANA_POLICY_RULE', 'admin_required')
KIBANA_POLICY_SCOPE = getattr(settings, 'KIBANA_POLICY_SCOPE', 'identity')
KIBANA_HOST = getattr(settings, 'KIBANA_HOST', 'http://192.168.10.4:5601/')
OPENSTACK_SSL_NO_VERIFY = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
OPENSTACK_SSL_CACERT = getattr(settings, 'OPENSTACK_SSL_CACERT', None)