Skip to content

Instantly share code, notes, and snippets.

@aalmenar
Forked from growse/unbound_to_graphite.sh
Created June 13, 2017 20:37
Show Gist options
  • Select an option

  • Save aalmenar/7808c2809b724854649746d23360cf7e to your computer and use it in GitHub Desktop.

Select an option

Save aalmenar/7808c2809b724854649746d23360cf7e 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