Install and Run Monika in Linux without Package Managers

Denny Pradipta
Hyperjump Tech
Published in
4 min readApr 27, 2022
Photo by Gabriel Heinzer on Unsplash

To run Monika on multiple platforms such as Windows or macOS, we provided different methods to install Monika. Take one for example: using package managers like NPM, Chocolatey, or Snapcraft. Instead of using the package managers mentioned (which we need to install first), we can simply use the standalone binaries on our GitHub releases page.

Everything was made easier for Linux users. Either you can download the Monika binary from the releases page, or you can use the one-liner script and Monika will be automatically installed in your system.

This article will guide you on how to run Monika on your Linux laptop, so without further ado:

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 undesirable events such as service outages or slow services. In addition, you can configure Monika to send notifications of the incidents on your services through your favorite communication tools like SMTP mail, Telegram, Slack, WhatsApp (It’s free!), and more!

Now that we want to run Monika using a standalone binary, visit the Monika GitHub release page and select the zip file according to your operating system (in this case, Linux).

Install Monika in Linux

1. Download the Monika binary file from the releases page

Monika Linux binary

In our previous article about running macOS, your browser may display that the file is not commonly downloaded and may be dangerous. If you see this alert, head to the caret menu beside the Discard button and select Keep. If you didn’t, proceed to the next step.

Keep this file (screenshot taken from MacOS)

Extract the zip and you should see the monika binary file. Then, open a terminal in the exact folder where you extracted the binary file.

To run Monika, you need to add the execute permission to the binary file. Run sudo chmod +x ./monika to add execute permission to the binary file. Once that’s done, verify that it is now executable by running ./monika -v in your terminal.

It’s working so far!

2. Use the one-liner script

If you prefer to run one script in your terminal without having to open any browser (e.g running in command-line interfaces such as servers), you can run this script:

curl https://raw.githubusercontent.com/hyperjumptech/monika/main/scripts/monika-install.sh | sh

This script will automatically download and saved your Monika binary file on your .local/bin folder inside your home folder.

It’s working so far!

Creating a simple Monika configuration

Now that we have installed Monika, let’s create a new Monika configuration from this sample.

Let me explain this configuration:

  • This configuration will be probing https://reqres.in/api/login using the POST method
  • The body that will be passed through the request will be an email and password.
  • We want to send the data as application/json by specifying the Content-Type at the headers block.
  • Monika will alert you if the response time is longer than 600 milliseconds, if the response status code is not 200, or if the response time is longer than ten seconds
  • Monika will alert you if there is any incident or recovery at least once.

Save this configuration as monika.yml in the same directory as the Monika binary. Now, let’s run Monika with our configuration by running monika -c monika.yml or ./monika -c monika.yml in your terminal.

Monika is running!

If you haven’t had any Monika configuration yet or you want to modify your existing Monika configuration, you can create a Monika configuration using Monika Config Generator and run Monika with your created Monika configuration.

Congratulations! You can now run Monika in Linux using the standalone binary!

Closing

Using standalone Monika binary, you won’t have to install NPM in your Linux system. You can download the binary or use the one-liner script and run it on your local machine.

If you have questions or find bugs while 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 week!

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.