||3 weeks ago|
|LICENSE||3 months ago|
|README.md||3 months ago|
|config||3 months ago|
|demo.gif||3 months ago|
|sclimon||3 weeks ago|
|sclimon.png||3 months ago|
|template-web.conf||3 months ago|
The name sclimon stands for [S]imple [C]ommand [L]ine [I]nterface [Mon]itoring. Sclimon is a shell monitoring tool for websites, hosts and SSL certificates written in bash. You just need to drop a config file in the sclimon directory and run the script file in list mode or alarm mode. It's possible to configure the treshold how often the checks may fail until you get a notification mail.
Just clone this repository or download the script file and make it executable
$ chmod +x sclimon
and run the script file
If you trust this repo and the script file, you can drop it into in your binary directory.
sudo curl sclimon -o /usr/bin/sclimon sudo chmod +x /usr/bin/sclimon
and run it from enywhere with
How to configure
The default configuration of sclimon is
$HOME/.config/sclimon/config. Sclimon will create a empty file, if it doesn't exists, but you must fill it on your own.
FROMMAIL="email@example.com" MAILSERVER="example.com" PASSWORD="<my secret password>" TOMAIL="firstname.lastname@example.org" DELAY="60"
This file will be include by the script and set the mailserver (MAILSERVER) from where the mails should be send (FROMMAIL) to the receiver (TOMAIL). The delay option set in which intervals the checks should be run.
After the basic configuration you can create under
$HOME/.config/sclimon/config/ a text file with a
.conf ending like
.conf file will be included by sclimon and read in a loop. The
.conf files need the following informations:
TITLE="localhost" DOMAIN="example.com" HOST="127.0.0.1" PORT="8000" PROTOCOL="http|https" PATTERN="example" TYPE="Web|Ping|SSL" TRESHOLD="10"
TITLE set the name in sclimon which will be shown in the interface.
DOMAIN is needed for the SSL and web check.
HOST set the IP adress for the ping check.
PORT The Port is needed for the SSL and web check. The default value is 443. If your Application runs on another port, please set it here.
PROTOCOL may be http or https. This option must be set for the webcheck and will be combine
PATTERN for the web check, sclimon will search on
DOMAIN for a word pattern. If
PATTERN could not be found, sclimon will mark the check as failed.
TYPE here you can set which kind of check should be run by sclimon.
WEB checks on the webpage for a word or sentence from PATTERN.
PING will test if
HOST is reachable and
PORT how long the SSL cert is valid and alarm it expires in less then 8 days or is already expired.
TRESHOLD set how often the ping and web check may fail, until you get a notification mail of the downtime.
$HOME/.config/sclimon/config is set to 60 and the
TRESHOLD will be set to 5, it will take a check every minute until 5 fails are reached, so you get a notification of a downtime after 5 minutes. The
TRESHOLD will be reset by a postive test. Please note, if you have a lot configurations this may increase the delay between the checks.
You can run sclimon with one of these options:
Usage: check-if-online.sh [options] Options: -l List mode. Show all stats. -a Alarm mode. Show only alarms. -h Show this help page
List mode will show all configured checks in
If you run sclimon with
Alarm mode, sclimon will only show failed checks