The short answer is no, you cannot trigger a rule on any Thing changing status. You have to specify the Things one by one.
I’ve published Thing Status Reporting [3.2.0;3.4.9] which gets around this by polling the Thing Registry for Things that match a configured state (e.g. OFFLINE) and then calling a separate rule with the list of this Things that are offline. From there you can process the list, send alerts or what ever you want.
It’s a rule template and can be installed from the Marketplace under Settings → Automation.
I haven’t tested this but in theory (famous last words), this should work in jruby.
rule 'Execute rule when any thing is changed' do
changed things
run { |event| logger.info("Thing #{event.uid} changed to #{event.status}") }
end
I can’t speak to its efficiency (you are create a trigger for this rule for each thing in your system). Also, it wont catch when new things are added as it is just a static capture of the things known to openhab when the rule is parsed, you would have to rerun the rule to capture new things added.