Created
February 18, 2019 15:41
-
-
Save scross01/dc677d8de6750ada039dfd78c9b51606 to your computer and use it in GitHub Desktop.
asuswrt syslog-ng config to forward logs to influxdb
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
# /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