Giter VIP home page Giter VIP logo

dropwizard-metrics-elasticsearch's Introduction

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.

dropwizard-metrics-elasticsearch's People

Contributors

rgbj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

rgbj ochedru

dropwizard-metrics-elasticsearch's Issues

Release artifacts to maven central

I tried using your library but it's not available at maven central. Do you plan to have it released?
That would be nice so I don't need to clone and deploy the artifacts to my local repo.

Not able to report logs

I've got the following error, while trying on local machine. I'm using ElasticSearch V6.2.3

org.elasticsearch.metrics.ElasticsearchReporter: Reporting returned code 406 Not Acceptable: {}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.