HashiQube - DevOps Lab
Youtube Channel Medium Posts Riaan Nolan Linkedin Riaan Nolan Hashicorp Ambassador

.

Uptime Kuma

An easy-to-use self-hosted monitoring tool to track website and service uptime

Uptime Kuma

🚀 Introduction

Uptime Kuma is an easy-to-use self-hosted monitoring tool that allows you to track the availability of your websites and services. With its user-friendly interface, you can quickly set up monitors and receive notifications when your services go down.

🛠️ Provision

Choose one of the following methods to set up your environment:

Open in GitHub Codespaces

bash docker/docker.sh
bash uptime-kuma/uptime-kuma.sh
vagrant up --provision-with basetools,docker,docsify,uptime-kuma
docker compose exec hashiqube /bin/bash
bash hashiqube/basetools.sh
bash docker/docker.sh
bash uptime-kuma/uptime-kuma.sh

📊 Features

After provisioning, you can access Uptime Kuma on http://localhost:3001 with the following credentials:

  • Username: admin
  • Password: P@ssw0rd

Dashboard

The main dashboard provides an overview of all your monitored services and their current status.

Uptime Kuma Dashboard

Status Page

Uptime Kuma includes a public status page that you can share with users to provide transparency about your service availability.

Uptime Kuma Status Page

Check History

View detailed history of uptime checks, including response times and availability percentages.

Uptime Kuma Check History

⚙️ Provisioning Script

The uptime-kuma.sh script handles the installation and configuration of Uptime Kuma:

[filename](uptime-kuma.sh ':include :type=code')

🔍 Key Capabilities

  • Multiple Monitor Types: HTTP(S), TCP, Ping, DNS, and more
  • Notifications: Email, Telegram, Discord, Slack, and many other platforms
  • Status Page: Public status page to share service status with users
  • History: Detailed uptime history with graphs and statistics
  • Authentication: Secure access with username/password protection
  • Mobile-Friendly: Responsive design that works on mobile devices
  • Low Resource Usage: Minimal resource requirements for hosting

📚 Resources

#!/bin/bash

# https://github.com/louislam/uptime-kuma

echo -e '\e[38;5;198m'"++++ "
echo -e '\e[38;5;198m'"++++ Cleanup"
echo -e '\e[38;5;198m'"++++ "
sudo docker stop uptime-kuma
sudo docker rm uptime-kuma
yes | sudo docker system prune -a
yes | sudo docker system prune --volumes

if pgrep -x "dockerd" >/dev/null
then
  echo -e '\e[38;5;198m'"++++ "
  echo -e '\e[38;5;198m'"++++ Docker is running"
  echo -e '\e[38;5;198m'"++++ "
else
  echo -e '\e[38;5;198m'"++++ "
  echo -e '\e[38;5;198m'"++++ Ensure Docker is running.."
  echo -e '\e[38;5;198m'"++++ "
  sudo bash /vagrant/docker/docker.sh
fi

echo -e '\e[38;5;198m'"++++ "
echo -e '\e[38;5;198m'"++++ Start Uptime Kuma"
echo -e '\e[38;5;198m'"++++ "
sudo mkdir -p /tmp/uptime-kuma
sudo cp /vagrant/uptime-kuma/kuma.db /tmp/uptime-kuma/
docker run -d --restart=always -p 3001:3001 -v /tmp/uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1

echo -e '\e[38;5;198m'"++++ Uptime Kuma: http://localhost:3001/ and login with Username: admin and Password: P@ssw0rd"