One network monitoring tool to rule them all

Remember when something broke down and you’ve learned about it the hard way?

Imagine this: you’re happily cruising through your digital day when, suddenly, the Wi-Fi decides it’s time for a dramatic exit – poof! Gone. And replacing it, there are tens of employees asking what happened with the internet connection.

That’s where a trusty network monitoring tool comes in – think of it as your digital Sherlock Holmes. It’s always on the lookout, sniffing out issues before they turn into internet mysteries that leave you scratching your head.

And in the line-up of these digital detectives, Uptime Kuma is definitely my MVP. It’s not just free and open-source – it’s also a breeze to set up, and its web interface? Let’s just say it could win awards for both functionality and style.

So, in this guide, let’s go ahead and set it up on a Linux machine.

 
Step 1: Installing Node.JS in Linux
Begin by logging into your server and updating the local package index.
$ sudo apt update
Since Uptime Kuma is written in Node.JS, you must install Node.JS. Release 16.x is a good choice since it supports most Ubuntu versions.
Switch to the root user.
$ sudo su
Add the Nodesource 16.x repository to your system using the curl command.
$ curl -sL https://deb.nodesource.com/setup_16.x | sudo bash
Once added, install Node.JS using the package manager.
$ sudo apt install nodejs -y
 
Step 2: Installing Uptime Kuma in Linux
After Node.JS installation, proceed to install the Uptime Kuma monitoring tool. Clone the Uptime Kuma repository from GitHub.
# git clone https://github.com/louislam/uptime-kuma.git
Navigate to the Uptime Kuma directory.
# cd uptime-kuma/
Set up the monitoring tool.
# npm run setup
 
Step 3: Run Uptime Kuma with pm2
PM2 is a NodeJS process manager. Install it using the following command within the uptime-kuma directory.
# npm install pm2@latest -g
Start the pm2 daemon.
# pm2 start npm --name uptime-kuma -- run start-server -- --port=3001 --hostname=127.0.0.1
Enable Node.js application to start after a reboot.
# pm2 startup
Save the application state.
# pm2 save
 
Step 4: Configure Apache as a Reverse Proxy for Uptime-Kuma
Install Apache web server.
$ sudo apt install apache2 -y
Enable required Apache modules.
# a2enmod ssl proxy proxy_ajp proxy_wstunnel proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html
Create a virtual host file for Uptime Kuma.
$ sudo nano /etc/apache2/sites-available/uptime-kuma.conf
Paste the following code and specify your server’s Fully Qualified Domain Name or public IP address.
<VirtualHost *:80>
ServerName kuma.name.com
ProxyPass / http://localhost:3001/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) “ws://localhost:3001/$1" [P,L]
</VirtualHost>
Activate the Apache virtual host.
$ sudo a2ensite uptime-kuma
Restart Apache.
$ sudo systemctl restart apache2
 
Step 5: Access Uptime Kuma from the Web UI
  • With Uptime Kuma installed, visit your server via the domain name or IP address in a browser.
  • http://server-ip or domain-name
  • Create an Admin account by providing a username and password.
  • Log in to Uptime Kuma’s dashboard. To monitor a new host, click ‘Add New Monitor’ and provide the site details.
  • Add item to Monitoring
  • Uptime Kuma will start monitoring your site and display uptime metrics.

And that’s it! You have successfully installed and configured Uptime Kuma and your monitoring is up and running. Now, you’ll be the one saying, ‘Hey, there was a network issue today, but don’t worry, I took care of it.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *