Robert Kaussow
cda1bfa189
All checks were successful
continuous-integration/drone/push Build is passing
163 lines
3.5 KiB
Django/Jinja
163 lines
3.5 KiB
Django/Jinja
{{ ansible_managed | comment }}
|
|
# More informations:
|
|
# http://docs.grafana.org/installation/configuration
|
|
# https://github.com/grafana/grafana/blob/master/conf/sample.ini
|
|
|
|
app_mode = production
|
|
instance_name = {{ grafana_instance_name }}
|
|
|
|
[paths]
|
|
data = {{ grafana_data_dir }}
|
|
logs = {{ grafana_log_dir }}
|
|
plugins = {{ grafana_plugin_dir }}
|
|
|
|
[server]
|
|
protocol = http
|
|
|
|
http_addr = {{ grafana_bind_ip }}
|
|
http_port = {{ grafana_bind_port }}
|
|
|
|
domain = {{ grafana_listen_address | urlsplit('hostname') }}
|
|
enforce_domain = true
|
|
root_url = {{ grafana_listen_address }}
|
|
|
|
serve_from_sub_path = false
|
|
router_logging = false
|
|
static_root_path = public
|
|
enable_gzip = true
|
|
|
|
[database]
|
|
type = {{ grafana_db_type }}
|
|
{% if grafana_db_type == "sqlite3" %}
|
|
path = {{ grafana_data_dir }}/grafana.db
|
|
cache_mode = private
|
|
{% else %}
|
|
host = {{ grafana_db_server }}:{{ grafana_db_port }}
|
|
name = {{ grafana_db_name }}
|
|
user = {{ grafana_db_user }}
|
|
password = """{{ grafana_db_password }}"""
|
|
ssl_mode = {{ grafana_db_ssl_mode }}
|
|
{% endif %}
|
|
|
|
max_idle_conn = 2
|
|
max_open_conn = 0
|
|
|
|
conn_max_lifetime = 14400
|
|
|
|
[datasources]
|
|
datasource_limit = 5000
|
|
|
|
[remote_cache]
|
|
type = {{ grafana_cache_provider }}
|
|
{% if not grafana_cache_provider == "database" %}
|
|
connstr =
|
|
{% endif %}
|
|
|
|
[analytics]
|
|
reporting_enabled = false
|
|
check_for_updates = false
|
|
|
|
[security]
|
|
disable_initial_admin_creation = false
|
|
|
|
admin_user = {{ grafana_admin_user }}
|
|
admin_password = {{ grafana_admin_password }}
|
|
|
|
secret_key = {{ grafana_secret_key }}
|
|
disable_gravatar = true
|
|
|
|
disable_brute_force_login_protection = false
|
|
|
|
[dashboards]
|
|
versions_to_keep = 20
|
|
min_refresh_interval = 5s
|
|
|
|
[users]
|
|
allow_sign_up = false
|
|
allow_org_create = false
|
|
|
|
auto_assign_org = true
|
|
auto_assign_org_id = 1
|
|
auto_assign_org_role = Viewer
|
|
|
|
default_theme = light
|
|
|
|
viewers_can_edit = false
|
|
editors_can_admin = false
|
|
|
|
user_invite_max_lifetime_duration = 24h
|
|
|
|
hidden_users = {{ grafana_admin_user }}
|
|
|
|
[auth]
|
|
login_cookie_name = grafana_session
|
|
|
|
login_maximum_inactive_lifetime_duration = 12h
|
|
login_maximum_lifetime_duration = 30d
|
|
|
|
token_rotation_interval_minutes = 10
|
|
|
|
disable_login_form = false
|
|
disable_signout_menu = false
|
|
|
|
oauth_auto_login = false
|
|
oauth_state_cookie_max_age = 600
|
|
api_key_max_seconds_to_live = -1
|
|
|
|
{% for provider in grafana_auth_providers %}
|
|
[auth.{{ provider.name }}]
|
|
{% if "enabled" not in provider.config %}
|
|
enabled = true
|
|
{% endif %}
|
|
{% for key, value in provider.config.items() %}
|
|
{{ key }} = {{ value }}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
[smtp]
|
|
{% if grafana_smtp_host is defined %}
|
|
enabled = true
|
|
host = {{ grafana_smtp_host }}:{{ grafana_smtp_port }}
|
|
user = {{ grafana_smtp_username }}
|
|
password = """{{ grafana_smtp_password }}"""
|
|
skip_verify = false
|
|
from_address = {{ grafana_smtp_from }}
|
|
from_name = {{ grafana_smtp_from_name }}
|
|
{% else %}
|
|
enabled = false
|
|
{% endif %}
|
|
|
|
[emails]
|
|
welcome_email_on_sign_up = false
|
|
templates_pattern = emails/*.html, emails/*.txt
|
|
content_types = text/html
|
|
|
|
[log]
|
|
mode = {{ grafana_log_mode | join(" ") }}
|
|
level = {{ grafana_log_level | lower }}
|
|
|
|
{% for provider in grafana_log_providers %}
|
|
[log.{{ provider.name }}]
|
|
{% if "enabled" not in provider.config %}
|
|
enabled = true
|
|
{% endif %}
|
|
{% for key, value in provider.config.items() %}
|
|
{{ key }} = {{ value }}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
|
|
[alerting]
|
|
enabled = true
|
|
execute_alerts = true
|
|
|
|
[plugins]
|
|
enable_alpha = false
|
|
plugin_admin_enabled = false
|
|
plugin_admin_external_manage_enabled = false
|
|
plugin_catalog_url = https://grafana.com/grafana/plugins/
|
|
|
|
[date_formats]
|
|
full_date = YYYY-MM-DD HH:mm:ss
|
|
use_browser_locale = true
|
|
default_timezone = browser
|