influxdbreporter


License

License

GroupId

GroupId

org.nefilim
ArtifactId

ArtifactId

influxdbreporter_2.10
Last Version

Last Version

0.8
Release Date

Release Date

Type

Type

jar
Description

Description

influxdbreporter
influxdbreporter
Project URL

Project URL

https://github.com/nefilim/ScalaInfluxDBReporter
Project Organization

Project Organization

org.nefilim
Source Code Management

Source Code Management

https://github.com/nefilim/ScalaInfluxDBReporter.git

Download influxdbreporter_2.10

How to add to project

<!-- https://jarcasting.com/artifacts/org.nefilim/influxdbreporter_2.10/ -->
<dependency>
    <groupId>org.nefilim</groupId>
    <artifactId>influxdbreporter_2.10</artifactId>
    <version>0.8</version>
</dependency>
// https://jarcasting.com/artifacts/org.nefilim/influxdbreporter_2.10/
implementation 'org.nefilim:influxdbreporter_2.10:0.8'
// https://jarcasting.com/artifacts/org.nefilim/influxdbreporter_2.10/
implementation ("org.nefilim:influxdbreporter_2.10:0.8")
'org.nefilim:influxdbreporter_2.10:jar:0.8'
<dependency org="org.nefilim" name="influxdbreporter_2.10" rev="0.8">
  <artifact name="influxdbreporter_2.10" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.nefilim', module='influxdbreporter_2.10', version='0.8')
)
libraryDependencies += "org.nefilim" % "influxdbreporter_2.10" % "0.8"
[org.nefilim/influxdbreporter_2.10 "0.8"]

Dependencies

compile (7)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.10.4
com.typesafe.scala-logging : scala-logging-slf4j_2.10 jar 2.1.2
io.spray : spray-client_2.10 jar 1.3.2-20140909
io.spray : spray-routing_2.10 jar 1.3.2-20140909
io.spray : spray-json_2.10 jar 1.3.1
com.typesafe.akka : akka-actor_2.10 jar 2.3.7
nl.grons : metrics-scala_2.10 jar 3.3.0

test (3)

Group / Artifact Type Version
org.scalatest : scalatest_2.10 jar 2.2.2
ch.qos.logback : logback-classic jar 1.1.2
io.spray : spray-testkit_2.10 jar 1.3.2-20140909

Project Modules

There are no modules declared in this project.

ScalaInfluxDBReporter

A simple Metrics-Scala (codahale based: https://github.com/erikvanoosten/metrics-scala) reporter for InfluxDB over UDP using Akka.

It currently only reports Timers and Meters as those are the ones I use but it would be trivial to add support for the rest.

It would also be easy to add support for the HTTP based protocol but UDP seems preferable for metrics as it has fewer opportunity to impact the client process.

In addition to the reported Meter metric fields (time, mcount, one_minute, five_minute, fifteen_minute, mean_rate) ScalaInfluxDBReporter also maintains a little state: the mcount value of the previously reported Meter and reports another field: mcount_delta which tracks the change in Meter.count since the last report.

It makes it easy to sum those in the influx time group by buckets to see the total per time period.

Usage

The reporter is modeled as an Akka actor, which limits integration possibilities (but why aren't you using Akka?:P).

See src/test/scala/org/nefilim/influxdb/InfluxDBReporterSpec.scala for sample usage but basically it comes down to this one liner:

   val reporter = system.actorOf(Reporter.props(metricRegistry, "host", 4444, 10.seconds))

Versions

Version
0.8
0.7
0.6