Influxdbwriter multi-tenancy

Hi all,

we’re running a multi-zone Icinga environment that monitors environments of multiple customers. It’s currently writing into a single influxdb with v1.8. In addition we use Grafana to create performance data reports from that influxdb.

In a later step we have to let external users create their own reports in Grafana which requires direct access to the influxdb. Unfortunately that single db also contains data from other companies. So we either need a security layer in influx or to split the data.

Is it possible to configure Influxdbwriter (or Influxdb2writer) to filter the data before writing? E.g. write all data to influxdb A, but just write data for company B to a different influxdb B?

Best regards
Uwe

Hello @uwereiter!

I’m afraid that’s not possible.

Best,
AK

Sorry to bump this old post - would it be technically possible to use macro expansion in the InfluxDB writer configuration? Object Types - Icinga 2

e.g.

object Influxdb2Writer "influxdb2" {
  host = "127.0.0.1"
  port = 8086
  organization = "$host.vars.customer_id$""
  bucket = "icinga2"

I assume this isn’t possible now - but if I were to create a PR that implemented macro expansion in the InfluxDB configuration attributes, are there any obvious concerns with this?

We would benefit from this greatly, as we monitor around ~120 customers (mostly in their own zone) - we have a unique organization in Grafana for each customer, but without InfluxDB enterprise, there is no way to prevent one customer viewing another customers data.

This also causes performance issues with InfluxDB as we have high levels of cardinality (e.g SNMP interface perfdata tagged with the interface name, customer ID, etc.

Our workaround is disallowing users to create or modify their own dashboards in Grafana, however a user can craft a HTTP request to Grafana and execute arbitrary InfluxDB queries - see User with Viewer privileges can run arbitrary queries on InfluxDB proxy datasources · Issue #6180 · grafana/grafana · GitHub.

120 customers? Why not to buy InfluxDB enterprise then?