Publishing Play Web Application Metrics to InfluxDB

metrics-play which is a fork of metrics-play project can be used to publish Play web application metrics including JVM metrics to InfluxDB via Graphite protocol.

To add support for publishing Play application metrics to InfluxDB, first you have to add metrics-play with Graphite reporter into you Play app dependencies like below:

libraryDependencies ++= Seq(
  "com.kenshoo" %% "metrics-play" % "2.3.0_0.2.1-graphite",
  javaJdbc,
  javaEbean,
  cache,
  javaWs
)

And then you have to add the Play plugin com.kenshoo.play.metrics.MetricsPlugin to your play.plugins file. Then in the Play application configuration, you can enable and configure the Graphite reporter like below:

metrics {
  graphite {
    enabled = true
    period = 1
    unit = MINUTES
    host = localhost
    port = 2003
  }
}

Above steps assume that you have configured InfluxDB Graphite input plugin like below.

[input_plugins]

  # Configure the graphite api
  [input_plugins.graphite]
  enabled = true
  # address = "0.0.0.0" # If not set, is actually set to bind-address.
  port = 2003
  database = "play-influxdb"  # store graphite data in this database
  udp_enabled = true # enable udp interface on the same port as the tcp interface

Current implementation of this plugin doesn’t support route level metrics. I am hoping to add them based on StatsD plugin for Play.

 
11
Kudos
 
11
Kudos

Now read this

How To Setup Multi Node Hadoop 2.0.x(YARN) Cluster

This post describes necessary steps required to setup 2-node Hadoop YARN cluster using Hadoop 2.0.6-alpha release. This post is based on these1 posts2 and can be considered as a combination of both posts with extra steps necessary to... Continue →