-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report session pool statistics to Riemann.
Since these are reported every session refresh, they're a good target for use as a service heartbeat. Refs #12.
- Loading branch information
Showing
3 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
(ns shale.riemann | ||
(:require [riemann.client :as riemann] | ||
[shale.configurer :refer [config]] | ||
[taoensso.timbre :as timblre :refer [debug]])) | ||
|
||
(def client (when-let [client-config (config :riemann)] | ||
(debug "Configuring Riemann client..." client-config) | ||
(let [client-fn (condp = (:protocol client-config) | ||
:tcp riemann/tcp-client | ||
:udp riemann/udp-client | ||
nil)] | ||
(client-fn (dissoc client-config :protocol))))) | ||
|
||
(if client | ||
(debug "Riemann client configured." client)) |
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