Created
June 16, 2014 06:45
-
-
Save nickchappell/8261a1759d8731dca923 to your computer and use it in GitHub Desktop.
riemann influxdb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [index (index)] | |
; Inbound events will be passed to the functions that come after (streams... | |
(streams | |
;This is one function. Index all events immediately. | |
index | |
;For each distinct host and service combination | |
(by [:host :service] | |
;Send events to InfluxDB | |
(influxdb | |
(let [servicename (:service event) | |
hostname (:host event)] | |
{:host "10.0.1.195" | |
:port 8086 | |
:scheme "http" | |
:username "nick" | |
:password "password" | |
:db "riemann-data" | |
:series (clojure.string/join "." [hostname servicename])}))) | |
;Just for debugging, log all events to the log file specified above in "(logging/init...." | |
#(info %))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment