Interface ElasticConfig

All Superinterfaces:
io.micrometer.core.instrument.config.MeterRegistryConfig, io.micrometer.core.instrument.push.PushRegistryConfig, io.micrometer.core.instrument.step.StepRegistryConfig

public interface ElasticConfig extends io.micrometer.core.instrument.step.StepRegistryConfig
Configuration for ElasticMeterRegistry.
Since:
1.1.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ElasticConfig
    Accept configuration defaults
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Base64-encoded credentials string.
    default boolean
    Whether to create the index automatically if it doesn't exist.
    default String
    Deprecated.
    This is no-op due to removal of mapping types since Elasticsearch 7.
    get(String key)
    Get the value associated with a key.
    default String
    The host to send metrics to.
    default String
    The index name to write metrics to.
    default String
    The index date format used for rolling indices.
    default String
    The separator between the index name and the date part.
    default String
    The Basic Authentication password.
    default String
    The ingest pipeline name.
    default String
    Property prefix to prepend to configuration names.
    default String
    The name of the timestamp field.
    default String
    The Basic Authentication username.
    default io.micrometer.core.instrument.config.validate.Validated<?>
     

    Methods inherited from interface io.micrometer.core.instrument.config.MeterRegistryConfig

    requireValid

    Methods inherited from interface io.micrometer.core.instrument.push.PushRegistryConfig

    batchSize, connectTimeout, enabled, numThreads, readTimeout, step
  • Field Details

    • DEFAULT

      static final ElasticConfig DEFAULT
      Accept configuration defaults
  • Method Details

    • get

      @Nullable String get(String key)
      Get the value associated with a key.
      Specified by:
      get in interface io.micrometer.core.instrument.config.MeterRegistryConfig
      Parameters:
      key - Key to look up in the config.
      Returns:
      Value for the key or null if no key is present.
    • prefix

      default String prefix()
      Property prefix to prepend to configuration names.
      Specified by:
      prefix in interface io.micrometer.core.instrument.config.MeterRegistryConfig
      Returns:
      property prefix
    • host

      default String host()
      The host to send metrics to.
      Returns:
      host
    • index

      default String index()
      The index name to write metrics to. Default is: "micrometer-metrics"
      Returns:
      index name
    • indexDateFormat

      default String indexDateFormat()
      The index date format used for rolling indices. This is appended to the index name, separated by the indexDateSeparator(). Default is: "yyyy-MM"
      Returns:
      date format for index
    • timestampFieldName

      default String timestampFieldName()
      The name of the timestamp field. Default is: "@timestamp"
      Returns:
      field name for timestamp
    • autoCreateIndex

      default boolean autoCreateIndex()
      Whether to create the index automatically if it doesn't exist. Default is: true
      Returns:
      whether to create the index automatically
    • userName

      @Nullable default String userName()
      The Basic Authentication username. If apiKeyCredentials() is configured, it will be used for authentication instead of this.
      Returns:
      username for Basic Authentication
    • password

      @Nullable default String password()
      The Basic Authentication password. If apiKeyCredentials() is configured, it will be used for authentication instead of this.
      Returns:
      password for Basic Authentication
    • pipeline

      @Nullable default String pipeline()
      The ingest pipeline name.
      Returns:
      ingest pipeline name
      Since:
      1.2.0
    • indexDateSeparator

      default String indexDateSeparator()
      The separator between the index name and the date part. Default is: "-"
      Returns:
      index name separator
      Since:
      1.2.0
    • apiKeyCredentials

      @Nullable default String apiKeyCredentials()
      Base64-encoded credentials string. From a generated API key, concatenate in UTF-8 format the unique id, a colon (:), and the api_key in the following format:
      <id>:<api_key>
      The above should be the input for Base64 encoding, and the output is the credentials returned by this method. If configured, ApiKey type authentication is used instead of username/password authentication.
      Returns:
      base64-encoded ApiKey authentication credentials
      Since:
      1.8.0
      See Also:
    • documentType

      @Deprecated default String documentType()
      Deprecated.
      This is no-op due to removal of mapping types since Elasticsearch 7.
      The type to be used when writing metrics documents to an index. This configuration is only used with Elasticsearch versions before 7. Default is: "doc"
      Returns:
      document type
      Since:
      1.4.0
    • validate

      default io.micrometer.core.instrument.config.validate.Validated<?> validate()
      Specified by:
      validate in interface io.micrometer.core.instrument.config.MeterRegistryConfig
      Specified by:
      validate in interface io.micrometer.core.instrument.push.PushRegistryConfig