Skip to content

Instantly share code, notes, and snippets.

View ahma's full-sized avatar
👻

Ferenc HERNADI ahma

👻
View GitHub Profile
@jkapusi
jkapusi / graphite_report_free_space.sh
Created December 22, 2014 13:09
MogileFS rebalance workaround and MogileFS graphite reporter
#!/bin/bash
while :; do
mogadm check | cut -d] -f2- | awk '/writeable/{print "mogilefs."$1".free "$4" "systime()}' | nc -q0 graphite 2003
mogadm check | cut -d] -f2- | awk '/writeable/{print "mogilefs."$1".free_percent "int($5)" "systime()}' | nc -q0 graphite 2003
sleep `date "+60-%s%%60" | bc`
done