Skip to content

Instantly share code, notes, and snippets.

View bmhatfield's full-sized avatar
🍌
I'm a banana.

Brian Hatfield bmhatfield

🍌
I'm a banana.
View GitHub Profile
; Expire old events from the index every 15 seconds.
(periodically-expire 10 {:keep-keys [:host :service :tags]})
(def rollup-ttl 60)
(def throttle-ttl 120)
(defn event-log [prefix]
(fn [e] (info prefix (str e))))
(def email (mailer {:from "riemann@domain"}))
@bmhatfield
bmhatfield / gist:e49022dbea8013c3cef4
Created September 11, 2014 16:55
Stubbed-Search (Chef)
module StubbedSearch
def stubbed_search(index, query, stub)
# When running in the 'local' environment, dynamically set the hostname
# value for the search_stub to the hostname of the running VM
if node.chef_environment == 'local'
node.normal[:search_stub][stub] = node[:search_stub][stub].map do |n|
hsh = n.to_hash
hsh[:hostname] = node[:hostname]
hsh
end
@bmhatfield
bmhatfield / keybase.md
Created March 27, 2014 18:05
keybase.md

Keybase proof

I hereby claim:

  • I am bmhatfield on github.
  • I am brianhatfield (https://keybase.io/brianhatfield) on keybase.
  • I have a public key whose fingerprint is 2DF5 8084 BCAC BB25 AA51 9650 FFD6 0508 E5D9 0536

To claim this, I am signing this object: