Openhab Error messages to external Management system (SNMP)

I’m looking for a solution where error messages from openhab are being sent to an external Management system, e.g. via SNMP.
Ideally openhab would support a kind of SNMP appender in the log4j logger architecture.

Any thoughts?

best regards

this: should be more than enough :slight_smile:

Thanks Dim!
I saw this already but wasn’t sure if just adding the appender configuration to org.ops4j.pax.logging.cfg would work (without any modification within the openhab code) ?

I’ll give it a try anyway.


Hi Thomas,

Which openHAB version are you using?

The link that I gave you will work for log4j2 (which can be found on OH2.2 +)

In theory, you don’t need any modifications to the openhab code to configure custom destinations for log4j2 (I haven’t tried it… but it should work)

Hi Dim,

this is excellent feedback, much appreciated.
I’m using OH2.2, so as I said I will give it a try, and will report the outcome.

Thanks again!


1 Like

It is working!
Let me just briefly post my /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg

(don’t forget to add the appender to root logger parameters )

Root logger

log4j.rootLogger = WARN, email, out, osgi:*
#SMTP appender Log of messages

glad you got it working! :slight_smile:

…careful with that Buffer… you may spam your SMTP host :stuck_out_tongue:

(on the other hand… There should be very few WARN level messages on a stable OH2 deployment, so it should be ok)

by the way: log4j or log4j2 ?