Monika v1.6.0 is out! YAML Support, Secondary Proof, Advanced Alert, and many more!
We are very excited to present you Monika v1.6.0, featuring:
- YAML Support: Use YAML instead of JSON configuration file
- Improvements on Alert: Flexible alerting using Handlebars
- Monika Status: Send running Monika workers’ status periodically
- Secondary Proof: Use STUN servers for detecting false negatives
- Notification Message: Added City and ISP information
- And many more, which you can read the full changelog on our Github release page!
YAML Support
One of our goals is to create user-friendly configurations. While developers may be comfortable with JSON files, other developers and non-developers tend to use YAML because it is easier to read.
Furthermore, by using YAML, we can add comments so that when you are ready to leave your current company and hand over the Monika configuration, the next developer who took your work can easily understand your Monika configuration flow. We even put an example in the YAML configuration so you could uncomment the lines you need to run Monika straight away.
Improvements on Alert
There are two alerts available in the previous releases: status-not-2xx
and response-time-greater-than-x-ms
but with the new version released, you can now use more flexible queries using Filtrex and Handlebars!
You can now query from response time, status code, size, headers and body instead of just plain “status is not 200” or “response time is greater than x milliseconds”. For example, you can now check if your probe returns an object with a key called result, with the value ‘true’. We can define an alert object like this if we want to send an alert for the result is not ‘true’:
{
"query": "response.body.result == false",
"message": "Result is not true, expecting true"
}
Notice that there is a message key in the alert object which enables you to create your custom alert message.
Monika Status
We have more than 10+ instances of Monika running in many servers. We use Microsoft Teams to receive the notifications from our Monika instances when Monika detects any system failures.
Previously, we didn’t know how many times our probes crashed or recovered. Sure, we can count how many times we receive notifications through our channel. But what if there are hundreds of logs because your current monitored website is problematic? Are you sure you want to count manually? We don’t think so.
In this version, you can get a periodical report of your running Monika instances, such as how many incidents and recoveries occurred, the number of probes, and average response times. Monika will send over these reports to your configured notification channels using CRON scheduling so you can set the daily report to be sent every morning you wake up at 7 AM.
Secondary Proof
Sometimes Monika gives you false negative alerts. Let’s say that you have 2 Monika instances, both running at the same time. Monika Instance A sent a warning that your website is slow, while Monika Instance B didn’t alert you because it works fine. It turns out Monika Instance A internet is having trouble for a minute.
In this version, Monika has a separate cycle to check if it can connect to the network by clicking on a STUN server. If the STUN server is unreachable, Monika should not probe anything. Then continue again when the STUN server is reachable.
Notification Message
Let’s say that you have two Monika instances. Both of them running in different regions and ISP. Previously, we could only determine the Monika instances by the public IP. Well, not anymore!
We added ISP and City information in the Monika startup message so that you can detect which instance is sending you the alert. Combined with our Secondary Proof algorithm, you can tell which ISP currently fails if you have two Monika instances in the same region but different ISP.
Closing
Those are the highlights of five features in this version. For more details about this release, consider checking out our Github release page to see more about this version.
If you have suggestions, feedback, feature requests, or maybe willingness to contribute to Monika, don’t hesitate to open a new issue or start a further discussion on our Github repository page:
That’s it for today, I’ll see you in the next article!
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.