Update rsyslog 5 template

We want textual representations of "syslogfacility" and "syslogpriority".

Also I think it's better to use "timereported" than "timegenerated". Otherwise your log messages would be out of order if the servers don't all run in the same timezone (localtime).
This commit is contained in:
Florian Beer
2016-08-05 14:42:46 +02:00
committed by GitHub
parent eac28226a9
commit 695f7b70c4

View File

@@ -116,8 +116,7 @@ This is an example for rsyslog 5 (default on Debian 7):
```bash
# 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-text%||%syslogpriority-text%||%syslogseverity%||%syslogtag%||%$YEAR%-%$MONTH%-%$DAY% %timegenerated:8:25%||%msg%||%programname%\n"
$ActionOMProgBinary /opt/librenms/syslog.php
*.* :omprog:;librenms