OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • Monit restart OpenConnect
« previous next »
  • Print
Pages: [1]

Author Topic: Monit restart OpenConnect  (Read 1836 times)

dstrobel

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Monit restart OpenConnect
« on: July 09, 2018, 07:13:19 pm »
I am looking for a way to start and stop the OpenConnect service using Monit.

I started reading about configuring Monit to monitor a network host and that seems straight forward but now I'm stuck at the start and stop scripts. I have the OpenConnect plugin installed and just want to ping a host address on the other side of the tunnel and have the connection attempt to restart if the pings fail.

Thanks
Logged

dstrobel

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: Monit restart OpenConnect
« Reply #1 on: July 09, 2018, 11:01:00 pm »
In case this helps someone else, here is what I figured out.

Services / Monit / Service Test Settings
Create new test
Name - OpenConnect Ping
Condition - failed ping
Action - Restart

Services / Monit / Service Settings
Create new service
Enabled
Name - OpenConnect
Type - Remote Host
Address - IP Address on the other side of the VPN
Start - /usr/local/etc/rc.d/opnsense-openconnect start
Stop - /usr/local/etc/rc.d/opnsense-openconnect stop
Tests - OpenConnect Ping

Just tested it a couple times and seems to work so far.
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6293
  • Karma: 432
    • View Profile
Re: Monit restart OpenConnect
« Reply #2 on: July 10, 2018, 05:41:08 am »
Great, thanks :)
Logged
Twitter: mimu_muc
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • Monit restart OpenConnect
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2