riemann.opentsdb

Forwards events to OpenTSDB.

opentsdb

(opentsdb opts)

Returns a function which accepts an event and sends it to OpenTSDB. Silently drops events when OpenTSDB is down. Attempts to reconnect automatically every five seconds. Use:

(opentsdb {:host “opentsdb.local” :port 4242})

Options:

  • :metric-name A function which, given an event, returns the string describing the path of that event in opentsdb. opentsdb-metric-name by default.
  • :tags A function which, given an event, returns the hash-map for the tags. opentsdb-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 opentsdb connection from the pool. Default 0.1.
  • :block-start Wait for the pool’s initial connections to open before returning.

opentsdb-metric-name

(opentsdb-metric-name event)

Constructs a metric-name for an event.

opentsdb-tags

(opentsdb-tags event)

Constructs a tag-key named host from an event. tcollector also generates tag-key named host

OpenTSDBClient

protocol

members

close

(close client)

Cleans up (closes sockets etc.)

open

(open client)

Creates a OpenTSDB client

send-line

(send-line client line)

Sends a formatted line to OpenTSDB