org.dhatim.io.dropwizard:dropwizard-metrics-elasticsearch

Dropwizard Metrics Support for Elastic Search

License

License

Categories

Categories

DropWizard Container Microservices Metrics Application Testing & Monitoring Monitoring Search Business Logic Libraries Elasticsearch
GroupId

GroupId

org.dhatim.io.dropwizard
ArtifactId

ArtifactId

dropwizard-metrics-elasticsearch
Last Version

Last Version

1.0.9
Release Date

Release Date

Type

Type

jar
Description

Description

org.dhatim.io.dropwizard:dropwizard-metrics-elasticsearch
Dropwizard Metrics Support for Elastic Search
Project URL

Project URL

https://github.com/dhatim/dropwizard-metrics-elasticsearch
Source Code Management

Source Code Management

https://github.com/dhatim/dropwizard-metrics-elasticsearch/tree/1.0.9

Download dropwizard-metrics-elasticsearch

How to add to project

<!-- https://jarcasting.com/artifacts/org.dhatim.io.dropwizard/dropwizard-metrics-elasticsearch/ -->
<dependency>
    <groupId>org.dhatim.io.dropwizard</groupId>
    <artifactId>dropwizard-metrics-elasticsearch</artifactId>
    <version>1.0.9</version>
</dependency>
// https://jarcasting.com/artifacts/org.dhatim.io.dropwizard/dropwizard-metrics-elasticsearch/
implementation 'org.dhatim.io.dropwizard:dropwizard-metrics-elasticsearch:1.0.9'
// https://jarcasting.com/artifacts/org.dhatim.io.dropwizard/dropwizard-metrics-elasticsearch/
implementation ("org.dhatim.io.dropwizard:dropwizard-metrics-elasticsearch:1.0.9")
'org.dhatim.io.dropwizard:dropwizard-metrics-elasticsearch:jar:1.0.9'
<dependency org="org.dhatim.io.dropwizard" name="dropwizard-metrics-elasticsearch" rev="1.0.9">
  <artifact name="dropwizard-metrics-elasticsearch" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.dhatim.io.dropwizard', module='dropwizard-metrics-elasticsearch', version='1.0.9')
)
libraryDependencies += "org.dhatim.io.dropwizard" % "dropwizard-metrics-elasticsearch" % "1.0.9"
[org.dhatim.io.dropwizard/dropwizard-metrics-elasticsearch "1.0.9"]

Dependencies

compile (1)

Group / Artifact Type Version
org.elasticsearch : metrics-elasticsearch-reporter jar 2.2.0

provided (1)

Group / Artifact Type Version
io.dropwizard : dropwizard-metrics jar 1.0.2

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.assertj : assertj-core jar 3.5.2

Project Modules

There are no modules declared in this project.

Dropwizard Metrics Support for Elastic Search

Build Status Maven Central

This modules enables a dropwizard application to send metrics to an elasticsearch instance.

What about Metrics Elasticsearch Reporter? Doesn't it do just that?

No, it doesn't. As outlined here, it needs you to write some code in your application. This module adds the ability to perform that task through your dropwizard application yaml configuration. In fact, under the hood it actually makes use of Metrics Elasticsearch Reporter to perform the work.

How to

  • add this jar as a dependency to the dropwizard app:
<dependencies>
    ../..
    <dependency>
        <groupId>org.dhatim.io.dropwizard</groupId>
        <artifactId>dropwizard-metrics-elasticsearch</artifactId>
        <version>1.0.8</version>
    </dependency>
    ../..
</dependencies>
  • enable the metrics reporter through the configuration:
metrics:
  reporters:
    - type: elasticsearch

and you're good to go.

configuration

The configuration is somewhat limited right now:

  • servers: you can configure a set of elasticsearch nodes with the servers key, which hold a collection of host and port keys.
  • prefix: useful to identify single hosts.
  • index: elasticsearch index name.
  • indexDateFormat: elasticsearch index date format.
  • additionalFields: optional map of additional field values.

default values

metrics:
  reporters:
    - type: elasticsearch
      servers:
        - host: localhost
          port: 9200
      prefix:
      index: metrics
      indexDateFormat: yyyy.MM.dd
      additionalFields:

It should basically follow the Metrics Elasticsearch Reporter defaults.

org.dhatim.io.dropwizard

Dhatim

Versions

Version
1.0.9
1.0.8