Skip to content

Instantly share code, notes, and snippets.

@jamtur01
Created August 28, 2018 18:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamtur01/10f12057ab901b4815d3c2ce239b993b to your computer and use it in GitHub Desktop.
Save jamtur01/10f12057ab901b4815d3c2ce239b993b to your computer and use it in GitHub Desktop.
run
#!/bin/bash
git clone https://github.com/riemann/riemann.git
cd riemann
lein deps
cat << EOF > ./riemann.config
; -*- mode: clojure; -*-
; vim: filetype=clojure
(logging/init {:file "riemann.log"})
(tcp-server {:tls? false
:key "test/data/tls/server.pkcs8"
:cert "test/data/tls/server.crt"
:ca-cert "test/data/tls/demoCA/cacert.pem"})
(instrumentation {:interval 1})
(udp-server)
(ws-server)
(graphite-server)
(periodically-expire 1)
(let [index (tap :index (index))]
(streams
(default :ttl 3
(expired #(prn "Expired" %))
(where (not (service #"^riemann "))
index))))
(tests
(deftest index-test
(is (= (inject! [{:service "test"
:time 1}])
{:index [{:service "test"
:time 1
:ttl 3}]}))))
EOF
nohup lein run -- ./riemann.config &
cd ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment