Cluster High Availability
Availability, in the other words uptime of any software can be implemented in several different ways. It's up to company decisions, policies and best practices which process should be implemented.

Monitoring

Availability

Getint.io Cluster application is a combination of different components, mainly Java Application, PostgreSQL database, NGINX balancer. All being built with different frameworks and running independently from each other. All can run on a one or multiple machines, it all depends on a deployment architecture you select.
All of above, can become a point of failure, but after all, business directly depends on a Cluster application and this is what we will focus in first place to monitor and ensure highest possible uptime.
We decided to prepare for you a short guide taking you step by step on how to setup basic and efficient low level monitoring over a Cluster application processes with Monit and how to start them up in case of failure.
Install Monit
1
sudo apt-get update && sudo apt-get upgrade
2
sudo apt install monit
3
sudo monit
Copied!
Configure
1
sudo systemctl status monit
2
# you should see info saying monit is running
3
​
4
sudo vim /etc/monit/monitrc
5
# - change interval to 60 seconds:
6
# - uncomment set httpd lines if you want to access monit web ui
Copied!
/etc/monit/monitrc file would look like this
1
set daemon 60 # check services at 2-minute intervals
2
with start delay 240 # optional: delay the first check by 4-minutes (by
3
​
4
set log /var/log/monit.log
5
​
6
set idfile /var/lib/monit/id
7
set statefile /var/lib/monit/state
8
​
9
set eventqueue
10
basedir /var/lib/monit/events # set the base directory where events will be stored
11
slots 100 # optionally limit the queue size
12
​
13
set httpd port 2812 and
14
use address <YOUR_IP_ADDRESS> # only accept connection from localhost
15
allow localhost # allow localhost to connect to the server and
16
allow admin:monit # require user 'admin' with password 'monit'
17
​
18
include /etc/monit/conf.d/*
19
include /etc/monit/conf-enabled/*
Copied!
Reload Monit
1
sudo systemctl restart monit
2
sudo systemctl enable monit
Copied!
..
​
Copy link