Skip to content

Instantly share code, notes, and snippets.

@mdpuma
Created March 16, 2018 13:00
Show Gist options
  • Select an option

  • Save mdpuma/89ced75c753ddcf779d0fb087a3ea900 to your computer and use it in GitHub Desktop.

Select an option

Save mdpuma/89ced75c753ddcf779d0fb087a3ea900 to your computer and use it in GitHub Desktop.
cacti syslog module using syslog-ng
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