Since sometime yesterday I noticed my rules aren’t running anymore. There’s no entry in the logs (at least none I found…). But 13 rules are stuck in RUNNING. While looking at the installed bundles in the console, everything was “Active”.
After restart of openhab-service they returned to normal.
two questions:
Is there a way to monitor rules? From the outside would be best, as a rule won’t do!
Can I somehow find out, what caused the rules stuck in “RUNNING”?
I guess when rules (this refers to managed rules) are loaded after a restart into cache that something went wrong.
If you want to monitor rules from outside you could setup a shell script which periodically checks via openhab Rest api the status of rules.
Alternatives to polling the REST API is subscribing to the OH websocket where the events are published. You can also put openhab.event.RuleStatusEvent (or something like that, you’ll see it there in log4j2.xml or in the log viewer in MainUI) into INFO level logging. That will put started and idle log statements into events.log when rules start and stop.