![Photo by Sudhith Xavier on Unsplash Photo by Sudhith Xavier on Unsplash](/var/ezflow_site/storage/images/archive/2023/77/a-watchdog-for-every-modern-ix-server/photobysudhithxavieronunsplash_gold_gramophone.png/207672-1-eng-US/PhotobySudhithXavieronUnsplash_Gold_Gramophone.png_medium.png)
Photo by Sudhith Xavier on Unsplash
A watchdog for every modern *ix server
Old but Still Gold
Every business is an IT business at the back end comprising physical and virtual servers. The backbone of modern IT systems is a cloud-based infrastructure made up primarily of GNU/Linux servers. In the cloud-native world of modern IT, servers should be intelligent and designed to auto-heal proactively in case of internal problems. Unfortunately, many businesses still operate in old world reactive mode when it comes to server operations. Sooner or later enough server issues pile up to create frequent outages and resulting revenue losses.
A solution to this problem is Monit [1], a lightweight, free, open source solution that monitors *ix systems and performs automatic maintenance and repair. I use Footloose container machines to test everything covered in this article. A commonly available Docker engine is the only requirement to test the example code shown in this article.
Getting Started
As indicated by the name itself, the first set of functionalities provided by Monit is watching over process, file, FIFO, filesystem, directory, system, program, and remote host server resources. To begin, I'll explore monitoring the common system, filesystem, and process resources.
The first thing to do is set up a container machine running Monit. Listing 1 [2] creates the Ubuntu 22.04 LTS base image used to create further images for the test container machines. To generate the base image, go to your terminal and execute the command:
docker build -f Dockerfile_UbuntuJammyJellyfish . -t ubuntujjf
Listing 1
Dockerfile_UbuntuJammyJellyfish
01 FROM ubuntu:22.04 02 03 ENV container
Buy this article as PDF
(incl. VAT)