mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #3912 from florianbeer/patch-1
Add rsyslog 5 example to syslog documentation
This commit is contained in:
@@ -112,6 +112,17 @@ $template librenms,"%fromhost%||%syslogfacility%||%syslogpriority%||%syslogsever
|
||||
|
||||
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
|
||||
*.* :omprog:;librenms
|
||||
```
|
||||
|
||||
If your rsyslog server is recieving messages relayed by another syslog server, you may try replacing `%fromhost%` with `%hostname%`, since `fromhost` is the host the message was received from, not the host that generated the message. The `fromhost` property is preferred as it avoids problems caused by devices sending incorrect hostnames in syslog messages.
|
||||
|
||||
Add the following to your LibreNMS `config.php` file to enable the Syslog extension:
|
||||
|
Reference in New Issue
Block a user