Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.24 KB

README.markdown

File metadata and controls

48 lines (34 loc) · 1.24 KB

Getting started

This project encompasses:

  1. A Java client for the Riemann protocol
  2. The Riemann protocol buffer definition, and
  3. Its corresponding (autogenerated) Java classes

Artifacts are available through clojars which you can add to your maven repository like so:

<repository>
  <id>clojars.org</id>
  <url>http://clojars.org/repo</url>
</repository>

Example

RiemannClient c = new RiemannTcpClient(new InetSocketAddress("my.riemann.server", 5555));
c.event().
  service("fridge").
  state("running").
  metric(5.3).
  tags("appliance", "cold").
  send();

c.query("tagged \"cold\" and metric > 0"); // => List<Event>;

Status

The TCP client is in its early stages; it does not handle server error responses correctly and offers no pooling or retries. The top-level API for sending events and querying the index is functional and threadsafe. A small DSL is available to make sending events easier.

Next steps

  • Set host automatically.

Hacking

You'll need protoc 2.5.0. After that, mvn package should build a JAR, and mvn install will drop it in your local repository.