monit gateway_alert only works for gateway groups

Started by lbogdan, November 11, 2023, 10:54:04 AM

Previous topic - Next topic
Hello, there!

Is there any reason why the monit gateway_alert only works for gateway groups?

My Tunnelbroker gateway went down, but I didn't get any monit notifications, as I would've expected. Looking at monit status, it was showing "OK":

Program 'gateway_alert'
  status                       OK
  monitoring status            Monitored
  monitoring mode              active
  on reboot                    start
  last exit value              0
  last output                  -
  data collected               *~1 minute ago*


So I looked at the check script in /usr/local/opnsense/scripts/OPNsense/Monit/gateway_alert and noticed all checks are wrapped in an if (isset($config['gateways']['gateway_group'])) {}.

Is there any particular reason for that? As I said, I would expect to get "gateway down" notifications regardless of if I have gateway groups defined or not.