Skip to content

Instantly share code, notes, and snippets.

@goncha
goncha / sendgraph.py
Created November 15, 2012 07:36 — forked from bkjones/sendgraph.py
Fork from bkjones, nagios command to send graphite graph by email
#!/usr/bin/env python
"""
This takes a recipient email address and a graphite URL and sends a
POST to <graphite host>/dashboard/email with a body that looks like
this:
sender=user%40example.com&recipients=user2%40example.com&subject=foo&message=bar&graph_params=%7B%22target%22%3A%22target%3DdrawAsInfinite(metric.path.in.graphite)%22%2C%22from%22%3A%22-2hours%22%2C%22until%22%3A%22now%22%2C%22width%22%3A600%2C%22height%22%3A250%7D
...which will cause the graphite installation to send an email.
@wolever
wolever / MIT-LICENSE.txt
Last active June 1, 2022 05:42 — forked from niw/MIT-LICENSE.txt
Put a mac's AirPort in HostAP mode. Updated to work with OS X 10.8.
Copyright (C) 2012 Yoshimasa Niwa
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@ring-the-sysop
ring-the-sysop / carbon-cache.init
Created January 17, 2013 22:48
A RHEL 6 start/stop/status script for carbon-cache
#!/bin/bash
#
# chkconfig: 2345 92 17
# description: Backend data caching and persistence daemon for Graphite
#
# Source function library.
. /etc/rc.d/init.d/functions
PROG='carbon-cache'