Install Monika in macOS using Homebrew

Denny Pradipta
Hyperjump Tech
Published in
3 min readMay 10, 2022
Homebrew (https://brew.sh/)

We are improving the availability of Monika in package managers. A few weeks ago, we showed you how to install Monika in Linux using Snapcraft, this time we will show you how to install Monika on macOS using Homebrew.

Taken from Wikipedia, Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple’s operating system, macOS, as well as Linux. The name is intended to suggest the idea of building software on the Mac depending on the user’s taste.

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

Install Monika using Homebrew

To install Monika using Homebrew, you need to install Homebrew on your macOS machine. To install the Homebrew, run this command in your terminal:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This will install Homebrew in your system. After you have installed Homebrew, you can now install Monika using Homebrew by running brew install monika in your terminal.

Installing Monika using Brew

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, WhatsApp (it’s free!), Microsoft Teams, Slack, and many more.

Now that we have installed Monika from Homebrew, 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 Terminal.

It’s working!

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

Closing

Before we added Monika to Homebrew, 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 Homebrew 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!

Bye!

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.