influxdata / nginx-influxdb-module

MIT License
39 stars 13 forks source link

How to set the db for writing into influxdb? #13

Closed daniyel closed 6 years ago

daniyel commented 6 years ago

Hi.

I just wanted to test this module. After building it dynamically, my next step was to include it in nginx.conf and configure it, but then I have realised that there is no option to define db for influxdb where it should write the data. I went through the code to see if there is some default setting, but I did not find it. Maybe I am looking at the wrong place. Is there already a setting for this or is it still missing?

Best regards.

fntlnz commented 6 years ago

HI @daniyel - you're right, there's no option to configure the db where to write.

This is intended because this module uses UDP to write to Influx (or telegraf) and the udp configuration does not want a database on client side because you specify the database name in the InfluxDB (or telegraf) configuration itself.

You can see an InfluxDB configuration example here in the integration tests: https://github.com/influxdata/nginx-influxdb-module/blob/master/integration/influxdb.conf#L118-L127

fntlnz commented 6 years ago

I'm closing since this behavior is intended, but please feel free to continue the discussion.