diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2022-02-19 21:37:05 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2022-02-19 21:37:05 +0100 |
commit | 13dedddf418bae3cb7a357ee018a3645ee139d14 (patch) | |
tree | 0c9257eb41eddbe3ce8ab990f243f045d2498e03 /roles/icinga2/templates/influx.conf.j2 | |
parent | 4fbed3a809e81d6210d051643b7e930ac6244b18 (diff) | |
download | ansible_collection-13dedddf418bae3cb7a357ee018a3645ee139d14.tar.gz |
icinga: add influxdb config option
Diffstat (limited to 'roles/icinga2/templates/influx.conf.j2')
-rw-r--r-- | roles/icinga2/templates/influx.conf.j2 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/roles/icinga2/templates/influx.conf.j2 b/roles/icinga2/templates/influx.conf.j2 new file mode 100644 index 0000000..42b6d3b --- /dev/null +++ b/roles/icinga2/templates/influx.conf.j2 @@ -0,0 +1,34 @@ +/** +* vi: ft=icinga2 +* This File is managed by Ansible. Do NOT change. +*/ + +{% if icinga.influx.enable %} +object InfluxdbWriter "influxdb" { + host = "{{ icinga.influx.host }}" + ssl_enable = {{ icinga.influx.ssl | string | lower }} + port = {{ icinga.influx.port }} + database = "{{ icinga.influx.database }}" + username = "{{ icinga.influx.username }}" + password = "{{ icinga.influx.password }}" + flush_threshold = 1024 + flush_interval = 10s + enable_send_thresholds = true + enable_send_metadata = true + host_template = { + measurement = "$host.check_command$" + tags = { + hostname = "$host.name$" + } + } + service_template = { + measurement = "$service.check_command$" + tags = { + hostname = "$host.name$" + service = "$service.name$" + check_command = "$service.vars.check_command$" + instance = "$service.vars.instance$" + } + } +} +{% endif %} |