Created
June 25, 2014 06:08
-
-
Save faxm0dem/f4ebf04fe2fe98b4a0c2 to your computer and use it in GitHub Desktop.
collectd-syslog_ng plugin oneliner hack
This file contains hidden or 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
| while DATE=$(date +%s); do syslog-ng-ctl stats | awk -vhost=$HOSTNAME -F\; 'NR!=1 && $1 != "src.none" {if ($2 == "") { t=$3 } else {t=$2} printf "PUTVAL %s/syslog_ng-%s/derive-%s %s:%s\n",host,t,$5,systime(),$6}'; sleep 10; done | socat - UNIX-CLIENT:/var/run/collectd/sock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment