Skip to content

Instantly share code, notes, and snippets.

@growse
Created July 31, 2012 19:37
Show Gist options
  • Save growse/3219851 to your computer and use it in GitHub Desktop.
Save growse/3219851 to your computer and use it in GitHub Desktop.
Output unbound statistics for sending to graphite
#!/bin/bash
/usr/sbin/unbound-control stats|grep -E '^total\.|^num\.' | sed 's/=/\t/' | gawk 'BEGIN{"hostname -f" | getline hstnm ; }; {print "unbound." hstnm "." $0"\t" strftime("%s")}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment