Install Monika on Windows using Chocolatey

Denny Pradipta
Hyperjump Tech
Published in
4 min readMar 8, 2022
Chocolatey

At Hyperjump, aside from improving our selection of notification channels, we also improve the availability of Monika in package managers, one of which is Chocolatey.

Taken from their website, Chocolatey is a software management solution on Windows. Chocolatey brings the concepts of true package management to allow you to version things, manage dependencies and installation orders, better inventory management, and other features.

In this article, we will show you how to install Monika on Windows using Chocolatey and run a simple configuration using the installed Monika. So, without further ado:

Let’s do this

Install Chocolatey and Monika

To install Chocolatey, click the Start button and type Powershell. Then, right-click the Windows Powershell option and click Run as Administrator. After that, paste this command bellow in the Windows Powershell and press Enter:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Wait a few seconds for the command to complete. If you don’t see any errors, you are ready to use Chocolatey!

Now that we have installed Chocolatey, it’s time to install Monika. To install Monika using Chocolatey, run this command below in PowerShell:

choco install monika

Wait a few seconds for the command to complete. After that, verify that Monika is working as expected by running monika -v in the PowerShell.

Running Monika

What is Monika? Monika is an open-source and free synthetic monitoring command-line application. The name Monika stands for “Monitoring Berkala”, which means “periodic monitoring” in the Indonesian language.

With Monika, you can add as many websites as you want to monitor. You can monitor several conditions such as service outages or slow services. Also, you can configure Monika to send notifications of the incidents on your services through your favorite communication tools like SMTP mail, Telegram, WhatsApp (It’s free!), etc.

Now that we have installed Monika using Chocolatey, it’s time to create a new configuration called monika.yml in the current working directory:

Let me explain a little bit about this sample configuration:

  • We are going to use the Desktop notification channel
  • We are going to probe https://reqres.in/api/users/2 URL and it will return a user with ID “2” along with the response status code 200.
  • We want to be notified when the response status code is not 200
  • We want to be notified when the response time is larger than 200 milliseconds
  • We want to be notified when the ID from the response body data is not 3 (this is just for testing purposes)
  • We want to be notified when the incident or recovery has been triggered two times

Now that we have our configuration and Monika ready, it’s time to run monika -c monika.yml in the PowerShell:

Congratulations! You can now monitor your website performances using Monika that you installed from Chocolatey!

Closing

Before we added Monika into Chocolatey, we prompted users to use NPM to install Monika. Because not many users have NPM in their system as they are not JavaScript developers, we added Monika to the Chocolatey so that users can still use Monika without having to install NPM in their system.

If you’re having a problem with using Monika, don’t hesitate to create an issue on Monika’s Github Issue Page. If you like this article, don’t forget to clap and share this article with your friends!

That’s it for today, see you next time!

Hyperjump is an open-source-first company providing engineering excellence service. We aim to build and commercialize open-source tools to help companies streamline, simplify, and secure the most important aspects of their modern DevOps practices.

--

--

Denny Pradipta
Hyperjump Tech

Full-stack developer who loves to explore new technologies. Uses MongoDB, Express, React, and Node daily. Regularly writing for Hyperjump Technologies.