This tutorial will show you how to integrate Monika with Opsgenie to get your Monika notifications through the Opsgenie dashboard.
To use Opsgenie, you need to create an account on the Opsgenie website. After you have created your account, head over to the Teams menu in the Dashboard and create a Team.
Now that you have created a team, go to the Integrations menu and click Add Integration. Then, select the API integration. You will be redirected to the API Key page. After that, copy the API Key and save it somewhere safe as we are going to need it later.
Once that’s done, it’s time to configure Monika to integrate with Opsgenie.
Now that we have our API Key from Opsgenie, it’s time to create a Monika configuration called
notifications:- id: unique-id-opsgenietype: opsgeniedata:geniekey: <YOUR_API_KEY>probes:- id: "1"name: Localhostdescription: Check statusinterval: 3incidentThreshold: 3recoveryThreshold: 3requests:- method: GETurl: https://httpbin.org/delay/2500alerts:- query: response.time > 2000message: Response time more than 2 seconds- query: response.status != 200message: Status not 2xx
Let’s take a look at the configuration above:
Once that’s done, run Monika with the configuration above with the command
monika -c monika.yml
Congratulations! You have successfully integrated Monika with Opsgenie! Note that Opsgenie integration is only available from the Monika version 1.8.0++
PT Artha Rajamas Mandiri (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.
Copyright © 2023 Hyperjump Tech. All Rights Reserved.