unpoller icon indicating copy to clipboard operation
unpoller copied to clipboard

Add Influxdb v2 workaround to docs

Open LoeschMaximilian opened this issue 2 years ago • 2 comments

Hi

UniFi Poller can talk to InfluxDB 2.0 using DBRP mappings : https://docs.influxdata.com/influxdb/v2.0/tools/grafana/?t=InfluxQL#view-and-create-influxdb-dbrp-mappings

Once your InfluxDB 2.0 bucket is created (using CLI or 8086 web UI) :

# influx bucket list
ID                      Name                    Retention       Organization ID
f2763f172b50dea3        _monitoring             168h0m0s        143f24876e1ec5d2
74e9f584fccacedc        _tasks                  72h0m0s         143f24876e1ec5d2
7112dfae5d1aa164        unifi                   8760h0m0s       143f24876e1ec5d2

# influx v1 dbrp create --db unifi-db --rp unifi-rp --bucket-id  7112dfae5d1aa164 --default
ID                      Database        Bucket ID               Retention Policy        Default Organization ID
075053f3abe50000        unifi-db        7112dfae5d1aa164        unifi-rp                true    143f24876e1ec5d2

# influx v1 auth create  --read-bucket 7112dfae5d1aa164 --write-bucket 7112dfae5d1aa164 --username unifi-user
Please type your password: 

Please type your password again:

You then just have to fill up.conf :

[influxdb]
  disable = false
  url  = "http://influxdb:8086"
  user = "unifi-user"
  pass = "mysuperpassword"
  db = "unifi-db"

Originally posted by @Fredouye in https://github.com/unpoller/unpoller/issues/255#issuecomment-812365646

LoeschMaximilian avatar Apr 05 '22 12:04 LoeschMaximilian

Which settings do you use for Grafana? I'm having trouble adding a datasource with those settings.

ituri avatar May 23 '22 08:05 ituri

Has anyone managed to make the dashboard work? Mine seems not getting any data, even if I can see they're flowing to DB in influxDB GUI and on unpolled logs seems to receive them. In grafana seems that the right DB is not showing even if test & save works fine

ilbarone87 avatar Aug 03 '22 15:08 ilbarone87

I had to do an additional step for it to work - initially, influxDB appeared fine, grafana test & save was happy, but had no data. This post worked for me: https://community.influxdata.com/t/influxdb-error-retention-policy-not-found-autogen/26352/6

basically just had to type the following in cli (after already creating the v1 dbrp bucket): influx v1 dbrp create --db unifi --rp autogen --bucket-id

This then turns 'influx v1 dbrp list' 'Default' field for unifi, to false, and this somehow makes everything work...all the dashboards working great for me with grafana 9.1.6 and influxdb 2.4 :)

pauly2805 avatar Sep 28 '22 08:09 pauly2805

Screenshot 2022-11-28 at 00 44 00

I'm still getting these errors in my dashboard

ilbarone87 avatar Nov 28 '22 00:11 ilbarone87