riemann.kairosdb

Forwards events to KairosDB.

kairosdb

(kairosdb opts)

Returns a function which accepts a single event or collection of events and sends them to KairosDB. Silently drops events when KairosDB is down. Attempts to reconnect automatically every five seconds. Use:

(kairosdb {:host "kairosdb.local" :port 4242 :protocol :tcp})

or

(kairosdb {:host "kairosdb.local" :port 8080 :protocol :http})

Options:

  • :protocol :tcp to use the Telnet API, or :http for the HTTP REST API. Default :tcp.
  • :metric-name A function which, given an event, returns the string describing the path of that event in kairosdb. kairosdb-metric-name by default.
  • :tags A function which, given an event, returns the hash-map for the tags. kairosdb-tags by default.
  • :pool-size The number of connections to keep open. Default 4.
  • :reconnect-interval How many seconds to wait between attempts to connect. Default 5.
  • :claim-timeout How many seconds to wait for a kairosdb connection from the pool. Default 0.1.
  • :block-start Wait for the pool’s initial connections to open before returning.
  • :ttl A function which, given an event, returns the TTL in seconds. Note: TTL is only supported in the HTTP API, and is ignored when sent via Telnet.

kairosdb-metric-name

(kairosdb-metric-name event)

Constructs a metric-name for an event.

kairosdb-tags

(kairosdb-tags event)

Constructs tags from an event. Fqdn in kairosdb is usually passed as a tag.

KairosDBClient

protocol

members

close

(close client)

Cleans up (closes sockets etc.)

open

(open client)

Creates a KairosDB client

send-metrics

(send-metrics client metrics)

Sends a collection of metrics to KairosDB

make-kairosdb-client

(make-kairosdb-client protocol host port)