Icinga is not sending any metricts to InfluxDB

Tested

icinga2 object list --type service | grep enable_perfdata
  * enable_perfdata = true
  * enable_perfdata = true
(duplicated lines removed)

So yes, perfdata is produced.

What do your influx logs say?

We have a similar influxdbwriter setup, but it’s worth noting we are using auth:

library "perfdata"

object InfluxdbWriter "influxdb" {
  host = "127.0.0.1"
  port = 8086
  database = "icinga2"
  username = "redacted"
  password = "redacted"

  ssl_enable = false
  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$"
    }
  }

}

Also worth noting we are using influxdb-1.8.0-1.x86_64 (centos 7)

What do you see if you use the influx cli tool and use <database name> and then show measurements?

Hi Ben.

We’re in Influxdb2 and there are some differences on how authentication and the query language are.

From your configuration file I noticed that I had no library line, so I added to it, but no change.

To check the db status I use:

influx query ‘import “influxdata/influxdb/schema”
schema.measurements(bucket: “icinga2”)’

That always gives me an empty result:

Result: _result
Table: keys:
_value:string

1 Like

Have you already seen the influxdb2 support? Object Types - Icinga 2

1 Like

Hi Marcus.

Yes. The configuration is right and according to the template shown in the page you mention. :frowning:

I just installed a fresh Icinga2 and an InfluxDB2 Database (both on several hosts, both Ubuntu 20). Pushing the perfdata into InfluxDB2 works without problems. Just make sure that:

  • InfluxDB listens on an available address (default it listens to localhost, in my case I had to change this)
  • create a bucket for icinga2
  • create an auth token with read/write access to this bucket
  • config the bucket and the token in the influxdb2 settings

So I don’t think, it’s a Icinga2 or InfluxDB2 problem