Forwards events to Librato Metrics.
Converts an event to an annotation.
Converts an event to a gauge.
(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.
(def librato (librato-metrics “firstname.lastname@example.org” “abcd01234…”))
(tagged “latency” (fixed-event-window 50 (librato :gauge)))
(where (service “www”) (changed-state (where (state “ok”) (:start-annotation librato) (else (:end-annotation librato)))))
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.