Get Monika notifications to your WhatsApp using Monika WhatsApp Notifier
As we mentioned earlier in our Integrate Slack with Monika article, we told you that in Indonesia, many companies use WhatsApp as their primary workplace communication application. While collaboration tools such as Slack, Microsoft Teams, etc. are in hype right now, some of them still prefer WhatsApp.
In order to use WhatsApp as your notification channel, you need to use WhatsApp Business API. Unfortunately, WhatsApp Business API is currently limited. That’s why we provide you with a free solution: Monika WhatsApp Notifier.
In this article, we will be sharing how to integrate Monika with Monika WhatsApp Notifier so that when there is a Monika incidents or recoveries alert, you will be notified via WhatsApp. So, without further ado:
Setup Monika Whatsapp Notifier
First things first, you need to have a Monika WhatsApp Notifier webhook URL. Navigate to the https://whatsapp.hyperjump.tech and create your own webhook URL by inputting your name and phone number. After you submit the form, you will receive a notification to confirm your phone number.
Click the link that you received to confirm your phone number. After that, you should receive your webhook URL and a guide to set up your WhatsApp Notifier.
Save the Monika WhatsApp Notifier webhook URL to somewhere safe as we will need them later.
Configuring Monika with Webhook
I can assure you that Monika is not the girl from Doki Doki Literature Club. 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, etc.
Install Monika via npm install -g @hyperjumptech/monika
or if you don’t have NPM in your system, you can download the prebuilt binary from our release page.
Now that we have our Webhook URL, it’s time to create a configuration called monika.yml
:
Let me explain a little bit about this configuration:
- You need to set the notification channel in the
notifications
object. There are 3 properties:id
,type
, anddata
. Setid
with any string values, it’s just an identifier. Settype
withmonika-notif
. Then put your WhatsApp notifier webhook URL inurl
key in thedata
object. - Monika will be probing https://github.com and will send you an alert if the response time is greater than 500 milliseconds or the response status code is not 200, meaning the website is down
Now that we have our configuration ready, it’s time to run it with Monika. Go to the directory where you saved the Monika configuration, and run Monika straight away using monika -c monika.yml
Congratulations! Now that you have successfully integrated Monika with Monika WhatsApp Notifier, you will be notified if your website is slow or down via WhatsApp.
Closing
In order to use WhatsApp as your notification channel, you need to use WhatsApp Business API. Unfortunately, WhatsApp Business API is currently limited. With our Monika WhatsApp Notifier, you can receive Monika notifications straight to your WhatsApp without any charges.
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 its modern DevOps practices.