Class VertxInfluxDbOptions
java.lang.Object
io.vertx.micrometer.VertxInfluxDbOptions
Vert.x InfluxDb micrometer configuration.
- Author:
- Dan Kristensen, Joel Takvorian
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault value for the maximum number of metrics in a batch = 10000.static final booleanThe default gzip enabled on InfluxDb = true.static final intThe default connection timeout (seconds) = 1.static final StringThe default InfluxDb database = default.static final booleanDefault value for enabled = false.static final intThe default number of threads used = 2.static final intThe default read timeout (seconds) = 10.static final intDefault value for metric collection interval (in seconds) = 10.static final StringThe default InfluxDb server URI = http://localhost:8086. -
Constructor Summary
ConstructorsConstructorDescriptionCreate default options for InfluxDB reporting.Creates new options object for InfluxDB reporting fromjsoninput.Creates new options object for InfluxDB reporting, which is a copy ofother. -
Method Summary
Modifier and TypeMethodDescriptionintGet batch size, which is the maximum number of measurements sent per request to the InfluxDB server.intGet the connection timeout for InfluxDB server connections, in seconds.getDb()Get the InfluxDB database name used to store metricsgetOrg()Get the password used for authenticated connectionsintGet the read timeout for InfluxDB server connections, in seconds.Get the InfluxDB retention policyintgetStep()Get the step of push intervals, in secondsgetToken()getUri()Get the InfluxDB server URIGet the username used for authenticated connectionsbooleanGet the GZIP compression flag for requestsbooleanWill InfluxDB reporting be enabled?setBatchSize(int batchSize) Maximum number of measurements sent per request to the InfluxDB server.Specifies the destination bucket for writes.setCompressed(boolean compressed) Activate or deactivate GZIP compression.setConnectTimeout(int connectTimeout) Connection timeout for InfluxDB server connections, in seconds.Database name used to store metrics.setEnabled(boolean enabled) Set true to enable InfluxDB reportingSpecifies the destination organization for writes.setPassword(String password) Password used for authenticated connectionssetReadTimeout(int readTimeout) Read timeout for InfluxDB server connections, in seconds.setRetentionPolicy(String retentionPolicy) InfluxDB retention policysetStep(int step) Push interval steps, in seconds.Authentication token for the InfluxDB API.URI of the InfluxDB server.setUserName(String userName) Username used for authenticated connectionstoJson()io.micrometer.influx.InfluxConfigConvert these options to a Micrometer'sInfluxConfigobject
-
Field Details
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDDefault value for enabled = false.- See Also:
-
DEFAULT_STEP
public static final int DEFAULT_STEPDefault value for metric collection interval (in seconds) = 10.- See Also:
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZEDefault value for the maximum number of metrics in a batch = 10000.- See Also:
-
DEFAULT_URI
The default InfluxDb server URI = http://localhost:8086.- See Also:
-
DEFAULT_DATABASE
-
DEFAULT_COMPRESSION_ENABLED
public static final boolean DEFAULT_COMPRESSION_ENABLEDThe default gzip enabled on InfluxDb = true.- See Also:
-
DEFAULT_NUM_THREADS
public static final int DEFAULT_NUM_THREADSThe default number of threads used = 2.- See Also:
-
DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUTThe default connection timeout (seconds) = 1.- See Also:
-
DEFAULT_READ_TIMEOUT
public static final int DEFAULT_READ_TIMEOUTThe default read timeout (seconds) = 10.- See Also:
-
-
Constructor Details
-
VertxInfluxDbOptions
public VertxInfluxDbOptions()Create default options for InfluxDB reporting. Note that they are disabled by default. -
VertxInfluxDbOptions
Creates new options object for InfluxDB reporting, which is a copy ofother. -
VertxInfluxDbOptions
Creates new options object for InfluxDB reporting fromjsoninput.
-
-
Method Details
-
toJson
- Returns:
- a JSON representation of these options
-
isEnabled
public boolean isEnabled()Will InfluxDB reporting be enabled?- Returns:
- true if enabled, false if not.
-
setEnabled
Set true to enable InfluxDB reporting -
getUri
Get the InfluxDB server URI -
setUri
URI of the InfluxDB server. Example: http://influx:8086. -
getDb
Get the InfluxDB database name used to store metrics -
setDb
Database name used to store metrics. Default is "default". -
getUserName
Get the username used for authenticated connections -
setUserName
Username used for authenticated connections -
getPassword
Get the password used for authenticated connections -
setPassword
Password used for authenticated connections -
getRetentionPolicy
Get the InfluxDB retention policy -
setRetentionPolicy
InfluxDB retention policy -
isCompressed
public boolean isCompressed()Get the GZIP compression flag for requests -
setCompressed
Activate or deactivate GZIP compression. It is activated by default. -
getStep
public int getStep()Get the step of push intervals, in seconds -
setStep
Push interval steps, in seconds. Default is 10 seconds. -
getConnectTimeout
public int getConnectTimeout()Get the connection timeout for InfluxDB server connections, in seconds. -
setConnectTimeout
Connection timeout for InfluxDB server connections, in seconds. Default is 1 second. -
getReadTimeout
public int getReadTimeout()Get the read timeout for InfluxDB server connections, in seconds. -
setReadTimeout
Read timeout for InfluxDB server connections, in seconds. Default is 10 seconds. -
getBatchSize
public int getBatchSize()Get batch size, which is the maximum number of measurements sent per request to the InfluxDB server. -
setBatchSize
Maximum number of measurements sent per request to the InfluxDB server. When the maximum is reached, several requests are made. Default is 10000. -
getOrg
- Returns:
- the destination organization for writes
-
setOrg
Specifies the destination organization for writes. Takes either the ID or Name interchangeably. This is only used with InfluxDB v2.- Parameters:
org- the destination organization for writes- Returns:
- a reference to this, so the API can be used fluently
-
getBucket
- Returns:
- the destination bucket for writes
-
setBucket
Specifies the destination bucket for writes. Takes either the ID or Name interchangeably. This is only used with InfluxDB v2.- Parameters:
bucket- the destination bucket for writes- Returns:
- a reference to this, so the API can be used fluently
-
getToken
- Returns:
- the authentication token for the InfluxDB API
-
setToken
Authentication token for the InfluxDB API. This takes precedence over userName/password if configured.- Parameters:
token- the authentication token for the InfluxDB API- Returns:
- a reference to this, so the API can be used fluently
-
toMicrometerConfig
public io.micrometer.influx.InfluxConfig toMicrometerConfig()Convert these options to a Micrometer'sInfluxConfigobject
-