Skip to content

Instantly share code, notes, and snippets.

@scross01
Created February 18, 2019 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save scross01/dc677d8de6750ada039dfd78c9b51606 to your computer and use it in GitHub Desktop.
Save scross01/dc677d8de6750ada039dfd78c9b51606 to your computer and use it in GitHub Desktop.
asuswrt syslog-ng config to forward logs to influxdb
# /opt/etc/syslog-ng.d/influxdb.conf
destination influxdb {
http(
url("http://influxdb.home.lan:8086/write?db=home_network")
method("POST")
user("username")
password("password")
headers("Content-type: application/octet-stream")
body("syslog,appname=${PROGRAM},facility=${FACILITY},host=${HOST},hostname=${HOST},severity=${LEVEL} facility_code=${FACILITY_NUM}i,message=\"${MESSAGE}\",severity_code=${LEVEL_NUM}i,procid=\"${PID}\",timestamp=${UNIXTIME}${USEC}000i,version=1i")
);
};
log {
source(src);
source(net);
source(kernel);
destination(influxdb);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment