Closed BrianInAz closed 2 years ago
This issue has been mentioned on Sensu Community. There might be relevant details there:
👋 Howdy frands, I just started rolling out Influxdb 2.0 and was curious aout @BrianInAz 's question as well.
bump!
Hello everybody,
I am happy to see influxdb2-support, too :-)
Any update on this?
Work around for now is to add a retention policy mapping for your influxdbv2 bucket https://docs.influxdata.com/influxdb/v2.0/tools/grafana/?t=InfluxQL#view-and-create-influxdb-dbrp-mappings
We have to make a decision about whether we want to roll in influxdbv2 support into this plugin or do we want to create a new plugin specifically for v2.
It appears its possible to support both influxdbv1 and influxdbv2 with the same client library, but doing so will introduce a breaking change and a major version bump.
Here's the proposed breaking change: remove influxdbv1 specific cli arguments: user,password,dbName,address replace with influxdbv2 arguments: url,bucket,token
influxdbv1 support is maintained by the using the documented database/retention-policy as specially formatted bucket name and user:pass as specially formatted token value understood by the influx golang client.
FWIW, the workaround for the handler in the meantime can be found here: https://github.com/unpoller/unpoller/issues/407#issue-1193065803
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 sensu_events 8760h0m0s 143f24876e1ec5d2
# influx v1 dbrp create --db sensu_events --rp sensu-rp --bucket-id 7112dfae5d1aa164 --default
ID Database Bucket ID Retention Policy Default Organization ID
075053f3abe50000 sensu_events 7112dfae5d1aa164 unifi-rp true 143f24876e1ec5d2
# influx v1 auth create --read-bucket 7112dfae5d1aa164 --write-bucket 7112dfae5d1aa164 --username sensu
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 = "sensu"
pass = "asupersecretpassword"
db = "sensu_events"
Contextualizing this example for your Sensu deployment will allow handlers to ship metrics to an InfluxDB 2.0 instance until 2.0 support is either rolled into this plugin or there's a new handler for InfluxDB 2.0.
New branch up that is being prepped for a PR to add influx 2 support. branch name: js/refactor-support-v2 This branch uses https://github.com/influxdata/influxdb-client-go and is intended to be backwards compatible with influxdb v1.8.x Details: https://github.com/influxdata/influxdb-client-go#influxdb-18-api-compatibility
Closing, newly tagged release 4.0.0 has native support for influxDB v2 using upstream provided golang client.
Note release provides backwards compatibility for influxDB v1.8+, as per guidance in upstream SDK. Support for influxDB v1.7 and lower has been dropped.
Hello - I was hoping to connect Sensu to my InfluxDB 2.0 installation. Are there any plans to update this handler?
InfluxDB 2.0 Go client
Thanks