docs: Update syslog docs to prevent dates in the future/past (#7519)

Extracted docs changes from: #7282
This commit is contained in:
Tony Murray
2017-10-20 10:25:26 -05:00
committed by Neil Lathwood
parent 8ae64fa4ea
commit 84a06f4596

View File

@@ -54,7 +54,7 @@ source s_net {
# Destinations
########################
destination d_librenms {
program("/opt/librenms/syslog.php" template ("$HOST||$FACILITY||$PRIORITY||$LEVEL||$TAG||$YEAR-$MONTH-$DAY $HOUR:$MIN:$SEC||$MSG||$PROGRAM\n") template-escape(yes));
program("/opt/librenms/syslog.php" template ("$HOST||$FACILITY||$PRIORITY||$LEVEL||$TAG||$R_YEAR-$R_MONTH-$R_DAY $R_HOUR:$R_MIN:$R_SEC||$MSG||$PROGRAM\n") template-escape(yes));
};
########################
@@ -102,7 +102,7 @@ Create a file called something like `/etc/rsyslog.d/30-librenms.conf` containing
# Feed syslog messages to librenms
$ModLoad omprog
$template librenms,"%fromhost%||%syslogfacility%||%syslogpriority%||%syslogseverity%||%syslogtag%||%$year%-%$month%-%$day% %timereported:8:25%||%msg%||%programname%\n"
$template librenms,"%fromhost%||%syslogfacility%||%syslogpriority%||%syslogseverity%||%syslogtag%||%$year%-%$month%-%$day% %timegenerated:8:25%||%msg%||%programname%\n"
*.* action(type="omprog" binary="/opt/librenms/syslog.php" template="librenms")