monit-general
[Top][All Lists]
Advanced

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

Re: Check if my IP address has changed ?


From: Stephen Butler
Subject: Re: Check if my IP address has changed ?
Date: Fri, 15 Feb 2013 03:15:47 +0000

I was wondering if I could use a connection test.

I have monit running on the server in question to keep an eye on samba and openssh.
I've enabled the httpd for remote gui access.

Could I not just do a connection test, the servers lan ip address is 10.1.1.151 and it has the port 2812 open for the httpd part of monit.

Can i do some kind of test with monit to check that ip address, and if there is no return ping then run a shell script that will sort out my ip address ?

PS I know this is a problem to fix in the OS or some other running program, and I'm looking into that, however I need a quick patch asap.

Here is my /etc/monitrc file.

---------------------
set daemon  60              # check services at 1-minute intervals

set logfile syslog facility log_daemon

set httpd port 2812 and
    use address 10.1.1.152  # only accept connection from localhost
    allow 0.0.0.0/0.0.0.0        # allow localhost to connect to the server and
    allow admin:monit      # require user 'admin' with password 'monit'

check process smbd with pidfile /var/run/smbd.pid
 start program = "/usr/local/etc/init.d/samba start"
 stop program = "/usr/local/etc/init.d/samba stop"

check process sshd with pidfile /var/run/sshd.pid
 start program = "/usr/local/etc/init.d/openssh start"
 stop program = "/usr/local/etc/init.d/openssh stop"
---------------------

Thanks all.
Stephen.

reply via email to

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