Skip to content

Instantly share code, notes, and snippets.

@giovtorres
giovtorres / graphite.conf
Last active December 31, 2015 21:17
Run Graphite behind uwsgi + nginx in a subpath/subdirectory/non-root path
# This is the config I used for nginx to proxy graphite via uwsgi to a non-root path.
#
# Graphite is a stubborn Django app that must reside at the DocumentRoot level
# and is not readily moved to a subpath.
#
# The following config allows you to reach the graphite composer at
# http://HOSTNAME/graphite. The graphite will redirect all URLs back at the top
# level, so the remaining locations handle those and pass them back to the
# uwsgi server.
#
@giovtorres
giovtorres / send-cluster-util.py
Created December 31, 2015 16:58
Push slurm cpu and memory cluster utilization to a carbon (graphite) instance for graphing
#!/usr/bin/python
# vim: set ts=4 sw=4 et
"""
send_cluster_util.py - A script that will get CPU and Memory utilization
for a SLURM cluster and submit it directly to carbon's
pickle listener port.
http://graphite.readthedocs.org/en/latest/feeding-carbon.html#the-pickle-protocol
"""