Created
March 16, 2018 13:00
-
-
Save mdpuma/89ced75c753ddcf779d0fb087a3ea900 to your computer and use it in GitHub Desktop.
cacti syslog module using syslog-ng
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
| source remote { | |
| udp(ip(0.0.0.0) port(514)); | |
| }; | |
| log { | |
| source(remote); | |
| destination(d_sql); | |
| }; | |
| destination d_sql { | |
| sql( | |
| type(mysql) | |
| host("127.0.0.1") username("cacti") password("cacti") | |
| database("cacti") | |
| table("syslog_incoming") | |
| columns("facility_id", "priority_id", "program", "date", "time", "host", "message") | |
| values("${FACILITY_NUM}", "${LEVEL_NUM}", "${PROGRAM}", "${YEAR}-${MONTH}-${DAY}", "${ISODATE}", "${FULLHOST_FROM}", "${MESSAGE}") | |
| indexes() | |
| ); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment