aboutsummaryrefslogtreecommitdiff
path: root/roles/icinga2/templates/influx.conf.j2
blob: 42b6d3bda5abf0b3699aaa823045dccab444ec82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 %}