Code Monkey home page Code Monkey logo

metrics-reporter-play's Introduction

Build Status Download

Dependencies

Quick Start

Get the artifacts

Artifacts are released in Bintray. For sbt, use resolvers += Resolver.jcenterRepo, for gradle, use the jcenter() repository. For maven, go here and click "Set me up".

SBT:

libraryDependencies += Seq(
  "com.typesafe.play" %% "play" % "2.5.10",
  "io.dropwizard.metrics" % "metrics-core" % "3.1.2",
  "de.khamrakulov.metrics-reporter-play" %% "reporter-core" % "1.0.2"
)

Maven:

<dependency>
  <groupId>de.khamrakulov.metrics-reporter-play</groupId>
  <artifactId>reporter-core_2.11</artifactId>
  <version>1.0.2</version>
  <type>pom</type>
</dependency>

Gradle:

compile 'de.khamrakulov.metrics-reporter-play:reporter-core_2.11:1.0.2'

Add the module MetricsReporterModule to your application.conf

play.modules.enabled += "de.khamrakulov.play.metrics.MetricsReporterModule"

Use it

The MetricsReporter will create and appropriately register reporters for configured registry.

Configuration Reference

Metrics
metrics {
  registry = "default"
}
Name Default Description
registry default Registry name to be used
All Reporters
metrics {
  reporters = [
    {
      type: <type>
      durationUnit: "milliseconds"
      rateUnit: "seconds"
      frequency: "1 minute"
    }
  ]
}
Name Default Description
durationUnit milliseconds The unit to report durations as. Overrides per-metric duration units.
rateUnit seconds The unit to report rates as. Overrides per-metric rate units.
frequency 1 minute The frequency to report metrics. Overrides the default.
Console Reporter
metrics {
  reporters = [
    {
      type: "console"
      timeZone: "UTC"
      output: "stdout"
    }
  ]
}
Name Default Description
timeZone UTC The timezone to display dates/times for.
output stdout The stream to write to. One of stdout or stderr.
Graphite Reporter
metrics {
  reporters = [
    {
      type: "graphite"
      host: "localhost"
      port: "8080"
      prefix: <prefix>
      sender: <sender>
    }
  ]
}
Name Default Description
host localhost The hostname of the Graphite server to report to.
port 8080 The stream to write to. One of stdout or stderr.
prefix (none) The prefix for Metric key names to report to Graphite.
sender graphite Sender that is used to send metrics to Graphite.
Ganglia Reporter
metrics {
  reporters = [
    {
      type: "ganglia"
      host: localhost
      port: 8649
      mode: unicast
      ttl: 1
      uuid: (none)
      spoof: "localhost:8649"
      tmax: 60
      dmax: 0
      prefix: <prefix>
    }
  ]
}
Name Default Description
host localhost The hostname (or group) of the Ganglia server(s) to report to.
port 8649 The port of the Ganglia server(s) to report to.
mode unicast The UDP addressing mode to announce the metrics with. One of unicast or multicast.
ttl 1 The time-to-live of the UDP packets for the announced metrics.
uuid (none) The UUID to tag announced metrics with.
spoof (none) The hostname and port to use instead of this nodes for the announced metrics. In the format hostname:port.
tmax 60 The tmax value to announce metrics with.
dmax 0 The dmax value to announce metrics with.
prefix (none) The prefix for Metric key names to report to Graphite.

TODO

  • Add more reporters

metrics-reporter-play's People

Contributors

htimur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

metrics-reporter-play's Issues

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.