1u0 commented on issue #6976: [FLINK-7155][metrics] Add new metrics reporter to 
InfluxDB
URL: https://github.com/apache/flink/pull/6976#issuecomment-436566905
 
 
   @rmetzger 
   > Will the influxdb client just throw an exception if the db doesn't exist?
   
   Yes, if the database doesn't exists, the InfluxDB service would return an 
error response. This would result in an exception during reporting.
   
   > Does it make sense to consider automatically creating the db if it doesn't 
exist?
   
   Imo, better **not** to do it in the reporter. This is mainly due to how 
InfluxDB operates. Metrics in InfluxDB are stored under `<database>.<retention 
policy>`.
   If the reporter creates just `<database>`, then the InfluxDB (by default) 
would generate a default `<retention policy>` with  infinite duration. This may 
be not desired for production use.
   
   Technically, the report can create the database. As follow up, it can also 
be extended to create the retention policy, but this would require much more 
parameters (name, duration, replication, shard duration). At the end this 
results in configuration bloat in the reporter and possible wrong configuration 
in production use.
   
   **Note:** Maybe, to better reflect that the InfluxDB database should be 
created separately, make the `db` configuration parameter as required (without 
default).
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to