InfluxExporter
public InfluxExporter(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String database,
java.lang.String retention,
boolean createDatabase,
boolean exportDifference,
java.util.function.Function<java.lang.String,java.lang.String> measurementNameProvider)
Creates a new influx Exporter.
The export does not export by itself, but instead has to be triggered manually by calling
export();
This can be done periodically for example using
ScheduledExecutorService.scheduleAtFixedRate(Runnable, long, long, TimeUnit).
- Parameters:
url - The http url of the influx to connect to
user - the user to use when connecting to influx, can be null
password - the password to use when connecting to influx, can be null
database - the influx database to
retention - the retention policy of the database to write to
createDatabase - if true, the exporter will create the specified database with an "autogen" policy when it connects
measurementNameProvider - a function to use for resolving the measurement names for custom metrics.
By default, this is done by finding the measure corresponding to a view.
If this function returns a non-null value, the provided measurement name is used instead.