Docs
command
lscpu //view cpu architecture 64/32
install mysql server in spesific version
cd /opt/ &&
wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb &&
sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb &&
sudo apt-get update &&
sudo apt-install mysql-server
source : https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/
install mmonit (web monitoring tools)
cd /opt/ &&
wget https://mmonit.com/dist/mmonit-3.7.3-linux-x64.tar.gz &&
tar xvfz mmonit-3.7.3-linux-x64.tar.gz &&
cd mmonit-3.7.3 &&
./bin/mmonit
Point your Browser to the host where mmonit is installed http://localhost:8080
source : https://mmonit.com/wiki/MMonit/Setup#install
setup mmonit with mysql database
mysqladmin create mmonit -uroot -prahasia &&
mysql -uroot -prahasia -e "GRANT ALL ON mmonit.* to mmonit@localhost identified by 'rahasia.'" &&
mysql -uroot -prahasia mmonit < /opt/mmonit-3.7.3/db/mmmonit-schema.mysql
make sure schema is exported, then restart ./bin/mmonit
, check logs/error.log
if any error.
mmonit as service
[Unit]
Description = Easy, proactive monitoring of Unix systems, network and cloud services
After = network.target
Documentation= https://mmonit.com/documentation/
[Service]
Type=simple
KillMode=process
ExecStart = /opt/mmonit-3.7.3/bin/mmonit -i
ExecStop = /opt/mmonit-3.7.3/bin/mmonit stop
PIDFile = /opt/mmonit-3.7.3/logs/mmonit.pid
Restart = on-abnormal
[Install]
WantedBy = multi-user.target
Reload systemd configuration, enable M/Monit on boot and start it:
systemctl daemon-reload
systemctl enable mmonit
/*test command*/
systemctl start mmonit
systemctl stop mmonit
login mmonit
username : admin
password : swordfish
install monit
sudo apt install monit
edit configuration /etc/monit.
vim /etc/monit/monitrc
simple configuration
// set mmonit web guide
set mmonit http://admin:swordfish@localhost:8383/collector
with timeout 30 seconds # Default timeout is 5 seconds
and register without credentials # Don't register credentials
//type service
check system $HOST
if loadavg (1min) > 4 then alert
if loadavg (5min) > 2 then alert
if cpu usage > 95% for 10 cycles then alert
if memory usage > 75% then alert
if swap usage > 25% then alert
// enable httpd port,
set httpd port 2812 and
use address 188.000.236.000 # only accept connection from this ipa
allow 0.0.0.0/0.0.0.0 # allow all ip to connect to the server and
allow admin:monit # require user 'admin' with password 'monit'