Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Monitoring gateways with Monit
« previous
next »
Print
Pages: [
1
]
Author
Topic: Monitoring gateways with Monit (Read 4010 times)
DCLR
Newbie
Posts: 6
Karma: 0
Monitoring gateways with Monit
«
on:
February 09, 2023, 11:02:01 am »
I've been chasing my tail for a few days trying to put this together, but not finding what I need--a basic how-to for monitoring gateways in OPNsense.
I have two gateways with two different providers configured for failover. Failover works surprisingly well, much better than most commercial (enterprise-grade) firewalls I've used, but the one thing I'm still missing is email/SMS notification when one of my providers goes down. I've been studying and researching Monit and looking for an obvious way to pick up the gateway status, but everything I've found comes just short of the answer.
Can someone give me a basic rundown of how to make this work?
Thanks!
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: Monitoring gateways with Monit
«
Reply #1 on:
February 09, 2023, 11:12:04 am »
Yep:
https://forum.opnsense.org/index.php?topic=18745.msg97953#msg97953
Logged
DCLR
Newbie
Posts: 6
Karma: 0
Re: Monitoring gateways with Monit
«
Reply #2 on:
February 09, 2023, 11:55:07 am »
Quote from: Greelan on February 09, 2023, 11:12:04 am
Yep:
https://forum.opnsense.org/index.php?topic=18745.msg97953#msg97953
Thanks for the link, but it deals with restarting dpinger when it fails. What I need is a way to evaluate dpinger's result, specifically an alert when a gateway goes down.
Thanks!
Logged
axsdenied
Full Member
Posts: 199
Karma: 9
Re: Monitoring gateways with Monit
«
Reply #3 on:
February 09, 2023, 08:11:32 pm »
Assuming you have your SMTP server setup correctly in the "General Settings" tab of Monit, AND you have your email configured correctly in "Alert Settings" you only need 1 more step:
1. Service Settings Tab
Add, if not already present, and enable a "gateway_alert" service. Within that service just ensure that the "Path" value is set to "/usr/local/opnsense/scripts/OPNsense/Monit/gateway_alert" (no quotes) and the "Tests" value is set to "NonZeroStatus" or I believe you can use "ChangedStatus" as well.
Logged
OPNsense 24.7.7 running on:
Dell Optiplex 3050
Intel I5-7600 @ 3.5Ghz (4 Cores)
Intel I350-T4 Nic
8G DDR4
256G SSD
DCLR
Newbie
Posts: 6
Karma: 0
Re: Monitoring gateways with Monit
«
Reply #4 on:
February 10, 2023, 04:27:49 am »
Thank you! Just what I needed.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Monitoring gateways with Monit