[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[monit] Monitoring ssh tunnel

From: Stephen Nelson-Smith
Subject: [monit] Monitoring ssh tunnel
Date: Mon, 7 Dec 2009 12:49:28 +0000

I want to use monit to keep an ssh tunnel up.

I ssh from inside a broadband network to an external server, so I can
then ssh back down the tunnel.  However, I wish to keep that
connection up.

I'm setting up the tunnel with the following arguments:

My first try was to try an http get down the tunnel from the broadband
machine (and make it available down the tunnel), but this doesn't seem
to return a 200 - perhaps because I'm using virtual hosts, so monit
restarts itself regularly.

I then tried just running netcat on a high port on the external
machine (40001 as above), and testing for that, but if I kill netcat,
monit doesn't seem to notice, and doesn't restart.

Here's my config;

check process atalanta-tunnel with pidfile /var/run/
    start program  = "/etc/init.d/atalanta-tunnel start"
    stop program  = "/etc/init.d/atalanta-tunnel stop"
# For use on remote systems
    if failed host port 40001
       then restart

What am I missing?  How should I go about achieving this?


Stephen Nelson-Smith
Technical Director
Atalanta Systems Ltd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]