Icinga2 and InfluxDB

Hello I send the performance data from icinga2 throug InfluxDB with a grep.

When I send the performance data to the influxdb it automatically set it as the tag metric.

It’s possible to send one part as metric and the other as field.

For example: "Check xxx successfully | xxx (field size=…, field duration=…)

At the moment the data inserts all the values as single metric in the influx db.
I want that the output is three dimensional so the tag metric has two fields one for the size and one for the duration.

Best Regards and Thanks

Hi,

Have you read through the Data Performance Metrics in the documentation? It should answer your questions.

Sidenote: What do you mean by “sending perfdata to Influxdb with a grep”? Are you not using the influxdb-writer feature?

Cheers,
George

Hi

I do it like in the example of the documentation:
| ‘label’=value[UOM];[warn];[crit];[min];[max]

But in this example the data given to influx db is set as metric.
Now my question is how can i give some data to influx db as metric and some other data as field.

Best Regards
Gennaro

Hi,

before exporting perf data to influx, you should take a look on the influx db schema and try to understand what and how data can be stored (and retired).

Icinga forwards perf data as follows (simplified, when using default settings):

  • the service check name defines the influx measurement name
  • each perf data value creates a measurement field set (key=value), the label is stored as metric
  • the icinga hostname is stored as influx tag

Example for host pings (hostalive):
measurement = hostalive
field sets (metrics) = rta, pl, i.e. rta=2ms, pl=0%
tags = hostname

You can change default settings within influxdb.conf and add additional tags for each measurement by extending your host and service template. Tags will help you to filter or group you graphs within visualisation tools like Grafana.
Only tags are indexed, it makes no sense to filter on field values.

Cheers,
Manfred

3 Likes