====== Syslog Server ======
++++ Version History...|
**Version 0.0.5**
* Service restart after cfg change
**Version 0.0.4**
* Correction of the 'ü' in German
**Version 0.0.3**
* German Language added - many thanks to Riesenschnabel
**Version 0.0.2**
* Add Czech language
* Language corrections
* Link to wiki
**Version 0.0.1**
* First pre-release
++++
----
===== Functionality of the plugin =====
The Syslog Server use the standard rsyslog package. It's possible to receive log entries from another system and stored them in separate log file.
For analyzing of log files is used [[http://loganalyzer.adiscon.com/|Adiscon LogAnalyzer]]
===== Download =====
The current release can be found here:[[https://github.com/Gagi2k/LoxBerry-Plugin-WifiScanner/archive/v1.0-rc1.zip|]]https://github.com/zmata/LoxBerry-Plugin-SyslogServer/archive/v0.0.5.zip
All releases are listed here: https://github.com/zmata/LoxBerry-Plugin-SyslogServer/releases
===== Installation =====
The plugin can be installed as zip file into Loxberry. Similar to all other plugins.
===== Configuration options =====
First click at the "New" button. Fill in a unique name and IP address of the Miniserver. It's all. Configuration of the rsyslog and LogAnalyzer is done by scrypt.
===== Setup in the Loxone Config Software =====
Click at Messages in the Miniserver tree. Then click at Logger icon (or you can change settings of your current logger).
{{plugins:syslog_server:1211859143.jpg?h=250}}
Logger is inserted. Fill name. In the "Address of Logger" fill something like "/dev/syslog/192.168.1.10". Use IP address of your LoxBerry!
{{plugins:syslog_server:1211859144.jpg?h=250}}
Alternatively, you can use the entry "/dev/udp/192.168.1.10/514", where "514" is the standard listening port of rsyslog. If you want to use another, you can change it in the /etc/rsyslog.conf as root.
Finally assign a new logger to where you need it.
===== Log Analyzer =====
{{plugins:syslog_server:1211859150.png?h=250}}
In the upper right corner you can select Language, Style, Source (each configuration = one source), and View (actualy Syslog is best for Miniserver Log).
My parser fill date (date and time), ProcessID (Subject), Messagetype (my internal type - log line type) and Message.
In case of the Miniserver log you should have Loxone(n) in the Messagetype field. Number n depend on settings of the rsyslog. If you don't change settings, there "Loxone2".
If there is trouble with some messages line from another system, plase, send me part of the log file, and I'll update parser for it.
===== Forward Syslog to QNAP NAS =====
If you forward the syslog-messages to QNAP NAS the Log Analyzer is not receiving any more these messages!
Logger assignment in Loxone Config Software as per below snap required:
{{plugins:syslog_server:1219757758.png?h=59}}
that version will work, but allocation of Logger name is not possible:
{{plugins:syslog_server:1219757759.png?h=59}}
change loxberry (loxberry.conf) config file located in "/opt/loxberry/config/plugins/syslogserver/rsyslog.d/" to
**loxberry.conf**
:fromhost-ip, isequal, "MS-IP" /opt/loxberry/log/plugins/syslogserver/loxberry.log
$template RFC3164fmt,"<%PRI%>%TIMESTAMP:::date-rfc3339% MS-IP MS-Host %msg:7:200%"
:fromhost-ip, isequal, "MS-IP" @NAS-IP:514;RFC3164fmt
& stop
adaption of placeholders according your values:
NAS-IP = IP adress for your QNAP-NAS with running syslog-server (e.g. 192.168.178.2)
MS-IP = IP adress for your Miniserver (e.g. 192.168.178.23)
MS-Host = Name of your Miniserver (e.g. Loxone_Miniserver)
The "loxberry.conf" can be downloaded/uploaded via ftp client software (e.g. filezilla)
__QNAP-Syslog-Viewer:__
{{plugins:syslog_server:1219757760.png?h=95}}
__QNAP-Syslog-File:__
**syslogfile**
<13>1 2018-11-18T18:37:22.741611+01:00 192.168.178.23 Loxone_Miniserver - - - Loxone_Miniserver Logger_Fenster;FK_10_Buero_AUF#015
<13>1 2018-11-18T18:37:33.270795+01:00 192.168.178.23 Loxone_Miniserver - - - Loxone_Miniserver Logger_Fenster;FK_10_Buero_ZU#015
__known issues:__
* MS-Host is repeated in Message column
* LF (#015) is shown at the end of the Message column
===== Asking questions and reporting problems =====
Questions about the plugin will be answered in this wiki page. Please report your errors [[https://github.com/zmata/LoxBerry-Plugin-SyslogServer/issues|here]]. English or Czech language, please.