Uptime Kuma – Infrastructure as Code
It is important to monitor your applications, websites, network, firewall, … etc. The monitoring can help you to find the root cause of a problem and be aware of the issue before your customers.
In this article we will be focused on the monitoring of web applications or websites.
There are multiple solutions such as UptimeRobot which allow you to monitor 50 websites for FREE. You can monitor your URL, check if your SSL certificate will expire, and receive alerts if your website is down via email, slack or even by SMS.
You can have exactly the same features (even more) by installing Uptime Kuma which is open-source.
The design of the dashboard is similar to Uptime Robot and very user-friendly.
The installation of Uptime Kama can be done via Docker with two commands line :
$ docker volume create uptime-kuma $ docker run -d --restart=always -p 3001:3001 -v uptime-kuma:/app/data --name uptime-kuma louislam/uptime-kuma:1
Or directly via our marketplace with a simple button.
Behind the application Uptime Kuma, there is a manifest (infrastructure as a code ) that describes the architecture of the applications.
You can find in Jelastic’s documentation some examples of manifest and how to create one.
We will try to build the manifest for Uptime Kuma, line by line.
While creating a manifest, you have two kind of methods :
- Install = to create new environment
- update = to make some changes on an existing environment
We specified the name of the environment that will be created
Categories the application. In our case, Uptime Kuma is located on dev-and-admin-tools section of the marketplace
Logo which is displayed before the installation of the manifest.
Write a little description of the application
It is an option to enable SSL wildcard (*.hidora.com). By enabling SSL, you will be able to access your application via HTTPS. At any time, you can add your own SSL certificate or install Let’s Encrypt for your own domain name.
By default you will have a subdomain of .hidora.com.
Specify the kind of nodes or docker that you would like to install. In our case, we need a load Balancer (NGINX ) that will redirect the traffic to our Uptime Kuma.
- We configure 8 cloudlets to the Load Balancer NGINX (cloudlet is a unit ressources on Hidora’s platform)
- The second one is a docker image from docker hub called louislam/uptime-kuma with 16 cloudlets and has persistent volumes (app/data).
You can customize a message that will be sent after the creation of the environment.
Below, you can find the full manifest
The manifest for Uptime Kuma is basic but you can do a very complex infrastructure as a code. Everything that you can do manually, can be done automatically with manifest.
Don’t hesitate to try Uptime Kuma on our platform.
You can also find WordPress, WordPress cluster, Kubernetes, Nextcloud, Gitlab, Mattermost, Drupal and even more applications on your marketplace.
Jean-Luc is a Junior Full-Stack Tech Engineer at Hidora with a strong IT background. He is consulting clients about DevOps and also helping Hidora’s customers to make automation deployments and migrate their environments.