sync with previous repo
This commit is contained in:
9
roles/matrix-grafana/templates/dashboards.yaml.j2
Normal file
9
roles/matrix-grafana/templates/dashboards.yaml.j2
Normal file
@ -0,0 +1,9 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: {{ matrix_server_fqn_matrix }} - Dashboards
|
||||
folder: '' # The folder where to place the dashboards
|
||||
type: file
|
||||
allowUiUpdates: true
|
||||
options:
|
||||
path: /etc/grafana/dashboards
|
8
roles/matrix-grafana/templates/datasources.yaml.j2
Normal file
8
roles/matrix-grafana/templates/datasources.yaml.j2
Normal file
@ -0,0 +1,8 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: {{ matrix_server_fqn_matrix }} - Prometheus
|
||||
type: prometheus
|
||||
# Access mode - proxy (server in the UI) or direct (browser in the UI).
|
||||
access: proxy
|
||||
url: http://matrix-prometheus:9090
|
31
roles/matrix-grafana/templates/grafana.ini.j2
Normal file
31
roles/matrix-grafana/templates/grafana.ini.j2
Normal file
@ -0,0 +1,31 @@
|
||||
[server]
|
||||
root_url = "https://{{ matrix_server_fqn_grafana }}"
|
||||
|
||||
[security]
|
||||
# default admin user, created on startup
|
||||
admin_user = "{{ matrix_grafana_default_admin_user }}"
|
||||
|
||||
# default admin password, can be changed before first start of grafana, or in profile settings
|
||||
admin_password = """{{ matrix_grafana_default_admin_password }}"""
|
||||
|
||||
# specify content_security_policy to add the Content-Security-Policy header to your requests
|
||||
content_security_policy = "{{ matrix_grafana_content_security_policy }}"
|
||||
|
||||
# specify content security policy template to customized template
|
||||
{% if matrix_grafana_content_security_policy_customized %}
|
||||
content_security_policy_template = """{{ matrix_grafana_content_security_policy_template }}"""
|
||||
{% endif %}
|
||||
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
enabled = {{ matrix_grafana_anonymous_access }}
|
||||
|
||||
# specify organization name that should be used for unauthenticated users
|
||||
org_name = "{{ matrix_grafana_anonymous_access_org_name }}"
|
||||
|
||||
[dashboards]
|
||||
{% if matrix_synapse_metrics_enabled %}
|
||||
default_home_dashboard_path = /etc/grafana/dashboards/synapse.json
|
||||
{% else %}
|
||||
default_home_dashboard_path = /etc/grafana/dashboards/node-exporter-full.json
|
||||
{% endif %}
|
@ -0,0 +1,43 @@
|
||||
#jinja2: lstrip_blocks: "True"
|
||||
[Unit]
|
||||
Description=matrix-grafana
|
||||
{% for service in matrix_grafana_systemd_required_services_list %}
|
||||
Requires={{ service }}
|
||||
After={{ service }}
|
||||
{% endfor %}
|
||||
{% for service in matrix_grafana_systemd_wanted_services_list %}
|
||||
Wants={{ service }}
|
||||
{% endfor %}
|
||||
DefaultDependencies=no
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment="HOME={{ matrix_systemd_unit_home_path }}"
|
||||
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-grafana 2>/dev/null'
|
||||
ExecStartPre=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-grafana 2>/dev/null'
|
||||
|
||||
|
||||
ExecStart={{ matrix_host_command_docker }} run --rm --name matrix-grafana \
|
||||
--log-driver=none \
|
||||
--user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
|
||||
--cap-drop=ALL \
|
||||
--read-only \
|
||||
--network={{ matrix_docker_network }} \
|
||||
{% if matrix_grafana_container_http_host_bind_port %}
|
||||
-p {{ matrix_grafana_container_http_host_bind_port }}:3000 \
|
||||
{% endif %}
|
||||
-v {{ matrix_grafana_config_path }}:/etc/grafana:z \
|
||||
-v {{ matrix_grafana_data_path }}:/var/lib/grafana:z \
|
||||
{% for arg in matrix_grafana_container_extra_arguments %}
|
||||
{{ arg }} \
|
||||
{% endfor %}
|
||||
{{ matrix_grafana_docker_image }}
|
||||
|
||||
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} kill matrix-grafana 2>/dev/null'
|
||||
ExecStop=-{{ matrix_host_command_sh }} -c '{{ matrix_host_command_docker }} rm matrix-grafana 2>/dev/null'
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
SyslogIdentifier=matrix-grafana
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user