Griesbacher / nagflux

A connector which copies performancedata from Nagios / Icinga(2) / Naemon to InfluxDB
GNU General Public License v2.0
65 stars 30 forks source link

Nagflux with Non-Admin User on InfluxDB #35

Closed gitmopp closed 6 years ago

gitmopp commented 7 years ago

I tried to get nagflux working with a non admin user, it fails because the first query is show databases, which requires admin access.

[httpd] 127.0.0.1 - nagflux [07/Apr/2017:13:26:35 +0200] "GET /query?db=nagflux&p=%5BREDACTED%5D&precision=ms&q=show+databases&u=nagflux HTTP/1.1" 403 133 "-" "Go-http-client/1.1" 0ebf918f-1b85-11e7-8104-000000000000 494

It would be nice to have an option to skip the show databases part.

Griesbacher commented 7 years ago

I'll look into that, it's currently used to test if the database exists.

Griesbacher commented 7 years ago

InfluxDB allows non admin users to use show database in the next version 1.3.0. https://github.com/influxdata/influxdb/pull/7974 Seems like Grafana has the same issues. Therefore I would say lets wait for the next release, because I don't see a clean way to check if the database exists without admin rights. If you found something let me know.

Griesbacher commented 6 years ago

This should be fixed by the current InfluxDB version.