Wiregaurd Monit Remote Host Ping

Started by tracerrx, July 30, 2024, 07:02:44 PM

Previous topic - Next topic
July 30, 2024, 07:02:44 PM Last Edit: July 30, 2024, 07:20:11 PM by tracerrx
I want to use Monit to monitor if my Wiregaurd tunnel is up.  But using "Remote Host" with a private IP doesnt seem to work (monit must be pinging from the WAN).  Is there any way to tell monit to ping a host on the LAN or WG0? 

Is there any other suggested way to monitor and get alerted when a Wiregaurd site to site VPN is down?

Setting the SOURCE address works in diagnostics, but I dont know how to do this in monit.

SOLVED! 

Services -> Monit -> Settings -> Service Test Settings
   Add
      Name: WG_VPN_ALERT
      Condition: failed ping address INSERT SOURCE IP
      Action: Alert

Services -> Monit -> Settings -> Service Settings
   Add
      Enable Service Checks: Checked
      Name: WG_VPN   
      Type: Remote Host
      Address: INSERT IP TO PING
      Tests: WG_VPN_ALERT