Created
January 23, 2020 22:57
-
-
Save fser/01c415ab8e45ef478ec8a9d43fc13c1f to your computer and use it in GitHub Desktop.
Pushes number of zones from a master DNS into an influxDB. No rocket science, but keep this somewhere.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
NRZONES=$(rndc status | awk -F: '/number of zones/ { gsub(/ /, "", $2); print $2 }') | |
curl -s -XPOST 'http://10.0.1.1:8086/write?db=dns_stats' --data-binary "nrzones,type=master value=$NRZONES" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment