riemann.librato
Forwards events to Librato Metrics.
librato-metrics
(librato-metrics user api-key)
(librato-metrics user api-key connection-mgr-options)
Creates a librato metrics adapter. Takes your username and API key, and returns a map of streams:
- :gauge
- :counter
- :annotation
- :start-annotation
- :end-annotation
Gauge and counter submit events as measurements. Annotation creates an annotation from the given event; it will have only a start time unless :end-time is given. :start-annotation will start an annotation; the annotation ID for that host and service will be remembered. :end-annotation will submit an end-time for the most recent annotation submitted with :start-annotation.
Example:
(def librato (librato-metrics "aphyr@aphyr.com" "abcd01234..."))
(tagged "latency"
(fixed-event-window 50 (librato :gauge)))
(where (service "www")
(changed-state
(where (state "ok")
(:start-annotation librato)
(else
(:end-annotation librato)))))
safe-name
(safe-name s)
Converts a string into a safe name for Librato’s metrics and streams. Converts spaces to periods, preserves only A-Za-z0-9.:-_, and cuts to 255 characters.