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

@@ -114,12 +114,11 @@ Ancient versions of rsyslog may require different syntax.
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"
$ActionOMProgBinary /opt/librenms/syslog.php
# Feed syslog messages to librenms
$ModLoad omprog
$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
```