Skip to content

Instantly share code, notes, and snippets.

View jamtur01's full-sized avatar
💭
I may be slow to respond.

James Turnbull jamtur01

💭
I may be slow to respond.
View GitHub Profile
@jamtur01
jamtur01 / architecture.md
Last active August 29, 2015 14:23
Graphite configuration
        Relay
          |
          |
    |            |
    G1          G2
  |    |     |     |
G1C1 G1C2  G2C1 G2C2

Essentially:

@jamtur01
jamtur01 / gist:3478d914d94a8b6c3beb
Last active August 29, 2015 14:23
Brooklyn venues
BAM - http://www.brooklynmuseum.org/about/rental.php
The Bell House - http://www.thebellhouseny.com/private-events/
Knowndown - http://knockdown.center/about/
Grand Prospect - http://www.grandprospect.com/
BRIC House - http://bricartsmedia.org/about/bric-house/rentals-space-use
Brooklyn Expo Center - http://www.brooklynexpocenter.com/
@jamtur01
jamtur01 / riemann.config
Last active September 10, 2016 16:08
Example of Riemann index lookup a la Nagios Herald
(require 'riemann.common)
(require 'clojure.pprint)
(let [host "0.0.0.0"]
(graphite-server :host host
:port 5559)
(tcp-server :host host)
(udp-server :host host
:max-size 65000)
(repl-server :host host)
(ns examplecom.email
"Riemann email alerting"
(:require [riemann.email :refer :all]
[riemann.common :refer :all]
[clojure.string :as str]
[clojure.pprint :as pp])
)
(def header "Monitoring alert from Riemann\n\n")
(def footer "This is an automated Riemann notification. Please do not reply.")
(ns examplecom.email
"Riemann email alerting"
(:require [riemann.common :refer :all]
[riemann.core :refer :all]
[riemann.email :refer :all])
)
(def header "Monitoring alert from Riemann\n\n")
(def footer "This is an automated Riemann notification. Please do not reply.")
Interval 10
CheckThresholds true
LoadPlugin syslog
LoadPlugin cpu
LoadPlugin df
LoadPlugin interface
LoadPlugin load
LoadPlugin memory
LoadPlugin processes
(include "/etc/riemann/mycorp/process.clj"
(ns mycorp.queue
"Instrumentation and alerts for our distributed queue and consumers"
(:require [riemann.config :refer :all]
[riemann.streams :refer :all]
[mycorp.process :refer :all]))
(defn capacity [index pagerduty] ...)
(where (tagged "collectd")
(adjust [:service str/replace #"^load/load/(.*)$" "load $1"]
graph
))
Metrics:
app1-web.load/load/shortterm
app1-web.load/load/midterm
app1-web.load/load/longterm
(def default-services
[{:service #"^load/load/(.*)$" :rewrite "load $1"}
{:service #"^swap/swap_(.*)-(.*)$" :rewrite "swap $1 $2"}
{:service #"^memory/memory-(.*)$" :rewrite "mem $1"}
{:service #"^processes/ps_state-(.*)$" :rewrite "processes $1"}
{:service #"^aggregation-cpu-average/cpu-(.*)$" :rewrite "cpu $1"}
{:service #"^df-(.*)/df_complex-(.*)$" :rewrite "df $1 $2"}
{:service #"^interface-(.*)/if_(errors|packets|octets)/(tx|rx)$" :rewrite "nic $1 $3 $2"}])