Smokeping is a very useful daemon which can run a number of checks at certain intervals. Out of the box it will perform ping tests on hosts every 5 minutes. It can however be setup to monitor websites and response/connection times.
Updated for Debian Bullseye
apt-get install smokeping By default apache2 config gets enabled: /etc/apache2/conf-enabled/smokeping.conf So http://domain/smokeping will be work straight away. May want to change. vi /etc/smokeping/config.d/General #update contact and name etc.
vi /etc/smokeping/config.d/Targets + Burkesys_Cluster menu = Burkesys Cluster title = Burkesys Cluster ++ burkesys menu = Burkesys title = burkesys.burkesys.com host = burkesys.burkesys.com ++ twister menu = Twister title = twister.burkesys.com host = twister.burkesys.com
With some trial and error you'll get it. Apache should be setup with the following config: /etc/apache2/conf.d/smokeping. Just go to http://server/smokeping/smokeping.cgi Also watch /var/log/daemon.log where the smokeping daemon will send logs.
vi /etc/smokeping/config.d/Probes #Under *** Probes ***, you will see FPing. Add this under it. + Curl binary = /usr/bin/curl extraargs = --head pings = 5 urlformat = http://%host%/ vi /etc/smokeping/config.d/Targets ++ www_burkesys probe = Curl menu = Burkesys(www) title = burkesys.burkesys.com(www) host = www.burkesys.com apt-get install curl #check that /usr/bin/curl exists. /etc/init.d/smokeping restart
vi /etc/smokeping/config.d/Probes + DNS binary = /usr/bin/dig pings = 5 step = 300 timeout = 15 vi /etc/smokeping/config.d/Targets ++ ns1_burkesys_com probe = DNS menu = Burkesys (ns1) title = Burkesys NS Server(ns1.burkesys.com) host = ns1.burkesys.com lookup = burkesys.com server = ns1.burkesys.com /etc/init.d/smokeping restart
/etc/init.d/smokeping stop smokeping --debug