Hi everyone, I’m currently working on optimizing my OpenHAB setup for better logging and analysis. I have two Raspberry Pi units: one running OpenHAB2 (let’s call it Pi A) and another with InfluxDB and Grafana (Pi B). My goal is to configure Pi A to send all its logs to Pi B, which will act as a syslog server. This way, I can centralize my logs, analyze them, and feed them into InfluxDB for visualization in Grafana.
I’ve started by modifying the org.ops4j.pax.logging.cfg
file on Pi A and added a Syslog appender section. Here’s what I’ve tried so far:
plaintext
Syslog appender
log4j.appender.syslog=org.apache.log4j.net.SyslogAppender
log4j.appender.syslog.layout=org.apache.log4j.PatternLayout
log4j.appender.syslog.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
log4j.appender.syslog.syslogHost=IP-OF(B)
log4j.appender.syslog.facility=KARAF
log4j.appender.syslog.facilityPrinting=false
However, despite these configurations, I’m not seeing any logs being transferred from Pi A to Pi B. I’ve verified that Pi B’s syslog-ng service is functioning correctly by sending logs from a third-party machine, which worked without issues. This makes me confident that the problem lies within the OpenHAB2 logging configuration on Pi A.
I’m wondering if there are additional settings or configurations I need to adjust within OpenHAB2 to enable the logs to be sent to the remote syslog server. Has anyone successfully implemented a similar setup? Any insights or suggestions would be greatly appreciated!