For event reporting, is it possible to add further prerequisites for a trigger to fire?
E.g., I set up an email alert in case of WAN failover. However, since I have scheduled my RUTX11 to reboot evry night at 00:00, I always get an event email at ~00:02 about WAN failover, which of course happens due to the reboot.
My idea was that the event message about the WAN failover is only sent during a specified time, and I would then like to explicitly tell the event report service to only send tha WAN failover message between 00:02 and 23:58 (approximately, would need to test).
Does it make sense what I’m asking about? Would this be possible somehow?
You can achieve this by creating a simple script where you will enable/disable the configured events reporting instance. Then you will run the script at a specified time before and after the scheduled reboot using Crontabs.
Useful UCI commands (uci show events_reporting to see existing instances)
uci set events_reporting.@rule[0].enable='0'
uci commit events_reporting
reload_config