Package io.vertx.micrometer

## Class VertxInfluxDbOptions

- java.lang.Object
- - io.vertx.micrometer.VertxInfluxDbOptions

-     public class VertxInfluxDbOptions
      extends Object

  Vert.x InfluxDb micrometer configuration.
  Author:
    Dan Kristensen, Joel Takvorian

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `DEFAULT_BATCH_SIZE` | Default value for the maximum number of metrics in a batch = 10000.
    `static boolean` | `DEFAULT_COMPRESSION_ENABLED` | The default gzip enabled on InfluxDb = true.
    `static int` | `DEFAULT_CONNECT_TIMEOUT` | The default connection timeout (seconds) = 1.
    `static String` | `DEFAULT_DATABASE` | The default InfluxDb database = default.
    `static boolean` | `DEFAULT_ENABLED` | Default value for enabled = false.
    `static int` | `DEFAULT_NUM_THREADS` | The default number of threads used = 2.
    `static int` | `DEFAULT_READ_TIMEOUT` | The default read timeout (seconds) = 10.
    `static int` | `DEFAULT_STEP` | Default value for metric collection interval (in seconds) = 10.
    `static String` | `DEFAULT_URI` | The default InfluxDb server URI = http://localhost:8086.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `VertxInfluxDbOptions()` | Create default options for InfluxDB reporting.
    `VertxInfluxDbOptions​(JsonObject json)` | Creates new options object for InfluxDB reporting from `json` input.
    `VertxInfluxDbOptions​(VertxInfluxDbOptions other)` | Creates new options object for InfluxDB reporting, which is a copy of `other`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getBatchSize()` | Get batch size, which is the maximum number of measurements sent per request to the InfluxDB server.
    `String` | `getBucket()` |
    `int` | `getConnectTimeout()` | Get the connection timeout for InfluxDB server connections, in seconds.
    `String` | `getDb()` | Get the InfluxDB database name used to store metrics
    `int` | `getNumThreads()` | Deprecated. no longer used by Micrometer
    `String` | `getOrg()` |
    `String` | `getPassword()` | Get the password used for authenticated connections
    `int` | `getReadTimeout()` | Get the read timeout for InfluxDB server connections, in seconds.
    `String` | `getRetentionPolicy()` | Get the InfluxDB retention policy
    `int` | `getStep()` | Get the step of push intervals, in seconds
    `String` | `getToken()` |
    `String` | `getUri()` | Get the InfluxDB server URI
    `String` | `getUserName()` | Get the username used for authenticated connections
    `boolean` | `isCompressed()` | Get the GZIP compression flag for requests
    `boolean` | `isEnabled()` | Will InfluxDB reporting be enabled?
    `VertxInfluxDbOptions` | `setBatchSize​(int batchSize)` | Maximum number of measurements sent per request to the InfluxDB server.
    `VertxInfluxDbOptions` | `setBucket​(String bucket)` | Specifies the destination bucket for writes.
    `VertxInfluxDbOptions` | `setCompressed​(boolean compressed)` | Activate or deactivate GZIP compression.
    `VertxInfluxDbOptions` | `setConnectTimeout​(int connectTimeout)` | Connection timeout for InfluxDB server connections, in seconds.
    `VertxInfluxDbOptions` | `setDb​(String db)` | Database name used to store metrics.
    `VertxInfluxDbOptions` | `setEnabled​(boolean enabled)` | Set true to enable InfluxDB reporting
    `VertxInfluxDbOptions` | `setNumThreads​(int numThreads)` | Deprecated. no longer used by Micrometer
    `VertxInfluxDbOptions` | `setOrg​(String org)` | Specifies the destination organization for writes.
    `VertxInfluxDbOptions` | `setPassword​(String password)` | Password used for authenticated connections
    `VertxInfluxDbOptions` | `setReadTimeout​(int readTimeout)` | Read timeout for InfluxDB server connections, in seconds.
    `VertxInfluxDbOptions` | `setRetentionPolicy​(String retentionPolicy)` | InfluxDB retention policy
    `VertxInfluxDbOptions` | `setStep​(int step)` | Push interval steps, in seconds.
    `VertxInfluxDbOptions` | `setToken​(String token)` | Authentication token for the InfluxDB API.
    `VertxInfluxDbOptions` | `setUri​(String uri)` | URI of the InfluxDB server.
    `VertxInfluxDbOptions` | `setUserName​(String userName)` | Username used for authenticated connections
    `JsonObject` | `toJson()` |
    `io.micrometer.influx.InfluxConfig` | `toMicrometerConfig()` | Convert these options to a Micrometer's `InfluxConfig` object

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_ENABLED

          public static final boolean DEFAULT_ENABLED

      Default value for enabled = false.
      See Also:
        Constant Field Values

    - #### DEFAULT_STEP

          public static final int DEFAULT_STEP

      Default value for metric collection interval (in seconds) = 10.
      See Also:
        Constant Field Values

    - #### DEFAULT_BATCH_SIZE

          public static final int DEFAULT_BATCH_SIZE

      Default value for the maximum number of metrics in a batch = 10000.
      See Also:
        Constant Field Values

    - #### DEFAULT_URI

          public static final String DEFAULT_URI

      The default InfluxDb server URI = http://localhost:8086.
      See Also:
        Constant Field Values

    - #### DEFAULT_DATABASE

          public static final String DEFAULT_DATABASE

      The default InfluxDb database = default.
      See Also:
        Constant Field Values

    - #### DEFAULT_COMPRESSION_ENABLED

          public static final boolean DEFAULT_COMPRESSION_ENABLED

      The default gzip enabled on InfluxDb = true.
      See Also:
        Constant Field Values

    - #### DEFAULT_NUM_THREADS

          public static final int DEFAULT_NUM_THREADS

      The default number of threads used = 2.
      See Also:
        Constant Field Values

    - #### DEFAULT_CONNECT_TIMEOUT

          public static final int DEFAULT_CONNECT_TIMEOUT

      The default connection timeout (seconds) = 1.
      See Also:
        Constant Field Values

    - #### DEFAULT_READ_TIMEOUT

          public static final int DEFAULT_READ_TIMEOUT

      The default read timeout (seconds) = 10.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### VertxInfluxDbOptions

          public VertxInfluxDbOptions()

      Create default options for InfluxDB reporting. Note that they are disabled by default.

    - #### VertxInfluxDbOptions

          public VertxInfluxDbOptions​(VertxInfluxDbOptions other)

      Creates new options object for InfluxDB reporting, which is a copy of `other`.

    - #### VertxInfluxDbOptions

          public VertxInfluxDbOptions​(JsonObject json)

      Creates new options object for InfluxDB reporting from `json` input.

  - ### Method Detail

    - #### toJson

          public JsonObject 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

          public VertxInfluxDbOptions setEnabled​(boolean enabled)

      Set true to enable InfluxDB reporting

    - #### getUri

          public String getUri()

      Get the InfluxDB server URI

    - #### setUri

          public VertxInfluxDbOptions setUri​(String uri)

      URI of the InfluxDB server. Example: http://influx:8086.

    - #### getDb

          public String getDb()

      Get the InfluxDB database name used to store metrics

    - #### setDb

          public VertxInfluxDbOptions setDb​(String db)

      Database name used to store metrics. Default is "default".

    - #### getUserName

          public String getUserName()

      Get the username used for authenticated connections

    - #### setUserName

          public VertxInfluxDbOptions setUserName​(String userName)

      Username used for authenticated connections

    - #### getPassword

          public String getPassword()

      Get the password used for authenticated connections

    - #### setPassword

          public VertxInfluxDbOptions setPassword​(String password)

      Password used for authenticated connections

    - #### getRetentionPolicy

          public String getRetentionPolicy()

      Get the InfluxDB retention policy

    - #### setRetentionPolicy

          public VertxInfluxDbOptions setRetentionPolicy​(String retentionPolicy)

      InfluxDB retention policy

    - #### isCompressed

          public boolean isCompressed()

      Get the GZIP compression flag for requests

    - #### setCompressed

          public VertxInfluxDbOptions setCompressed​(boolean compressed)

      Activate or deactivate GZIP compression. It is activated by default.

    - #### getStep

          public int getStep()

      Get the step of push intervals, in seconds

    - #### setStep

          public VertxInfluxDbOptions setStep​(int step)

      Push interval steps, in seconds. Default is 10 seconds.

    - #### getNumThreads

          @Deprecated
          public int getNumThreads()

      Deprecated.
      no longer used by Micrometer
      Get the number of threads used by the push scheduler.

    - #### setNumThreads

          @Deprecated
          public VertxInfluxDbOptions setNumThreads​(int numThreads)

      Deprecated.
      no longer used by Micrometer
      Number of threads to use by the push scheduler. Default is 2.

    - #### getConnectTimeout

          public int getConnectTimeout()

      Get the connection timeout for InfluxDB server connections, in seconds.

    - #### setConnectTimeout

          public VertxInfluxDbOptions setConnectTimeout​(int connectTimeout)

      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

          public VertxInfluxDbOptions setReadTimeout​(int readTimeout)

      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

          public VertxInfluxDbOptions setBatchSize​(int batchSize)

      Maximum number of measurements sent per request to the InfluxDB server. When the maximum is reached, several requests are made. Default is 10000.

    - #### getOrg

          public String getOrg()

      Returns:
        the destination organization for writes

    - #### setOrg

          public VertxInfluxDbOptions setOrg​(String org)

      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

          public String getBucket()

      Returns:
        the destination bucket for writes

    - #### setBucket

          public VertxInfluxDbOptions setBucket​(String bucket)

      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

          public String getToken()

      Returns:
        the authentication token for the InfluxDB API

    - #### setToken

          public VertxInfluxDbOptions setToken​(String token)

      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's `InfluxConfig` object