Monika will send notifications to you whenever alerts are triggered, e.g., when the response status of a probed URL is not 2xx success code (status-not-2xx).
At this moment, Monika support these channel of notifications (You can use just one or more):
To use one or more notifications, you need to define the settings in the monika.yml file as shown below.
notifications:- id: unique-id-mailguntype: mailgundata:recipients: ['RECIPIENT_EMAIL_ADDRESS1', 'RECIPIENT_EMAIL_ADDRESS2']apiKey: YOUR_API_KEYdomain: YOUR_DOMAIN- id: unique-id-sendgridtype: sendgriddata:sender: YOUR_VERIFIED_EMAIL_BY_SENDGRIDrecipients: ['RECIPIENT_EMAIL_ADDRESS']apiKey: YOUR_API_KEY- id: unique-id-smtptype: smtpdata:recipients: ['RECIPIENT_EMAIL_ADDRESS']hostname: SMTP_HOSTNAMEport: 587username: SMTP_USERNAMEpassword: SMTP_PASSWORD- id: unique-id-webhooktype: webhookdata:url: https://WEBHOOK_URL
Note that every triggered alert will be sent to you through all the notifications you defined in the configuration file, e.g., if you added webhook
and smtp
settings, you will receive the alert messages through both.
Monika supports desktop notifications. Here are the prerequisites for enabling the desktop notifications:
notify-send
command. notify-osd
or libnotify-bin
required (Ubuntu should have this by default).notifications:- id: unique-id-monika-notiftype: desktop
Monika supports Discord. To enable notification via Discord, you must create a discord webhook first. More info at Discord webhook documentation
notifications:- id: unique-id-webhooktype: discorddata:url: https://YOUR_DISCORD_URL
Key | Description | Example |
---|---|---|
ID | Notification identity number | Discord12345 |
Type | Notification types | discord |
Url | The URL of the Discord Webhook that will receive notification | https://discord.com/api/webhook/<webhook.id>/<webhook.token> |
Monika supports Facebook Workplace. To enable notification via Workplace, you must create custom integration first. More info at Facebook Workplace Custom Integrations
notifications:- id: unique-workplace-idtype: workplacedata:thread_id: abcd-123-456access_token: your_custom_integration_access_token
Key | Description | Example |
---|---|---|
ID | Notification identity number | Workplace12345 |
Type | Notification types | workplace |
ThreadID | It's located at thread url, in the last segment | 6367478493277649 |
AccessToken | Workplace access token for custom integration | DQVJzYWtsdHRJRWIxUk9uOG5VV... |
You can send Monika notifications to your Google Chat. First you need to generate the url webhook for Monika to use. To create a webhook:
For further information check the Google Chat documentations here
Example of Google Chat configuration may be something similar to below:
notifications:- id: myGoogleChatNotiftype: google-chatdata:url: https://chat.googleapis.com/v1/spaces/XXXXX/messages?key=1122334455
If you use Larksuite, you can get Monika to send notifications to the Larksuite bots. You can create a webhook url, and then use it in the monika configuration.
You can find more information on creating webhooks here.
The Yaml config setup may look something like this:
notifications:- id: lark-group-messagetype: larkdata:url: https://open.larksuite.com/open-apis/bot/v2/hook/your-webhook-key-here
Keep watch on these pages, new notification methods are being developed.
Mailgun is an email notification delivery service provided by Mailgun email service. To use mailgun for your notification,
monika.yml
configuration as follows:notifications:- id: unique-id-mailguntype: mailgundata:recipients: ['RECIPIENT_EMAIL_ADDRESS']apiKey: YOUR_API_KEYdomain: YOUR_DOMAIN
Key | Description | Example |
---|---|---|
ID | Notification identity number | Mailgun12345 |
Type | Notification types | mailgun |
Recipients | An array of email addresses that will receive the email from Monika | ["monika@testmail.com", "symon@testmail.com"] |
Api Key | Mailgun account api key, mailgun registered key to identify your account | MAILGUN_API_KEY |
Domain | The domain to set in Mailgun | sandboxmail.mailgun.com |
Monika supports sending notifications via Microsoft Teams. In order to be able to send notifications via Microsoft Teams, you may need to add Connectors and webhooks to your channel. Please refer to Microsoft Teams Documentation to enable connectors and webhooks.
notifications:- id: unique-id-teamstype: teamsdata:url: https://YOUR_TEAMS_WEBHOOK_URL
Key | Description | Example |
---|---|---|
ID | Notification identity number | MyTeamsNotif123 |
Type | Notification types | teams |
Url | The URL of your Microsoft Teams Webhook | https://<company>.webhook.office.com/webhookb2/1234-abcdef |
You can get a notification from Monika to your WhatsApp number without having a Whatsapp Business account. First, you must create a Monika Whatsapp Notifier account.
notifications:- id: unique-monika-notif-idtype: monika-notifdata:url: https://YOUR_MONIKA_NOTIF_URL
Key | Description | Example |
---|---|---|
ID | Notification identity number | MonikaNotif12345 |
Type | Notification types | monika-notif |
Url | The URL of the Monika Notif Webhook link | https://whatsapp.hyperjump.tech/api/notify?token=<webhook.token> |
Please note, to receive messages from the WhatsApp cloud API the following requirements are mandatory.
PagerDuty is a platform for agile incident management. You need the integration key to use PagerDuty which you can get by following the steps in PagerDuty's services and integration docs. To give you the flexibility to choose which probe belongs to which PagerDuty service. You need to map the PagerDuty integration key with your Monika probe id in the configuration.
notifications:- id: unique-id-pagerduty-notifytype: pagerdutydata:- key: YOUR_PAGERDUTY_INTEGRATION_KEYprobeID: ZN32nw_KsvTKtLFNu55JV
Key | Description | Example |
---|---|---|
id | Notification identity number | pager-duty-1 |
type | Notification types | pagerduty |
data.key | PagerDuty integration key | 0nlar5b9ko8hnqrvsfnhtmihyopn5eri |
data.probeID | Monika Probe ID | ZN32nw_KsvTKtLFNu55JV |
Similar to mailgun, sendgrid is also an email delivery service. Make sure you have a sendgrid account. To obtain your API key, refer to sendgrid documentation. Then put the API key in Monika's configuration as follows:
notifications:- id: unique-id-sendgridtype: sendgriddata:sender: YOUR_VERIFIED_EMAIL_BY_SENDGRIDrecipients: ['RECIPIENT_EMAIL_ADDRESS1', 'RECIPEIENT_EMAIL_ADDRESS2']apiKey: YOUR_API_KEY
Key | Description | Example |
---|---|---|
ID | Notification identity number | Sendgrid12345 |
Type | Notification types | sendgrid |
sender | A string of email addresses that has been verified in your sendgrid account | your@email.com |
Recipients | An array of email addresses that will receive the email from Monika | ["monika@testmail.com", "symon@testmail.com"] |
Api Key | Sendgrid account api key, sendgrid registered key to identify your account | 70e34aba-0ea908325 |
Monika supports Slack Incoming Webhook. To enable notification via Slack, you must have a Slack's Incoming Webhook URL
. Please consult the Sending messages using Incoming Webhooks documentation.
notifications:- id: unique-id-slacktype: slackdata:url: https://YOUR_SLACK_INCOMING_WEBHOOK_URL
Key | Description | Example |
---|---|---|
ID | Notification identity number | Slack12345 |
Type | Notification types | slack |
Url | The URL of your slack incoming webhook | https://slackwebhook.com/channel |
SMTP (Simple Mail Transfer Protocol) is a way to send email using the TCP/IP protocol. This is the easiest way to get notified when alerts are triggered. Use the following configuration to set up SMTP notification.
notifications:- id: unique-id-smtptype: smtpdata:recipients: ['RECIPIENT_EMAIL_ADDRESS']hostname: smtp.mail.comport: 587username: SMTP_USERNAMEpassword: SMTP_PASSWORD
Key | Description | Example |
---|---|---|
ID | Notification identity number | Smtp12345 |
Type | Notification types | smtp |
Recipients | An array of email addresses that will receive the email from Monika | ["monika@testmail.com", "symon@testmail.com"] |
Hostname | The smtp host that you will be using for sending the email | smtp.gmail.com |
Port | The port allowed to be used for sending mail in your host | 587 |
Username | Registered username on your smtp server | yourusername@gmail.com |
Password | The password set for your username | thepasswordforyourusername |
To use Gmail SMTP with Monika,
smtp.gmail.com
for hostname
.587
for port
.username
.password
.password
.Statuspage is a status and incident communication tool. You need a page ID and an API key to use Statuspage. You can obtain it by following the steps in the documentation.
notifications:- id: unique-id-statuspagetype: statuspagedata:apiKey: YOUR_STATUSPAGE_API_KEYpageID: YOUR_STATUSPAGE_PAGE_ID
Key | Description | Example |
---|---|---|
id | Notification identity number | statuspage-1 |
type | Notification types | statuspage |
data.apiKey | Statuspage API key | c374d669-8ac0-480d-9ec7-732d71b43e38 |
data.pageID | Statuspage page ID | q3sl2xb8h0 |
Monika supports Telegram. To enable notification via Telegram, you must have a Telegram bot. Please consult Bots: An introduction for developers.
notifications:- id: unique-id-telegramtype: telegramdata:group_id: YOUR_GROUP_IDbot_token: YOUR_BOT_TOKEN
Key | Description | Example |
---|---|---|
ID | Notification identity number | Telegram12345 |
Type | Notification types | telegram |
Group ID | The ID of group where the bot should send the messages | -123456 |
Bot Token | The Token of your telegram bot | abcdefg:hijklmnopqrstuvwxyz |
Monika supports Webhook. To enable notification via Webhook.
notifications:- id: unique-id-webhooktype: webhookdata:url: https://YOUR_WEBHOOK_URL
Key | Description | Example |
---|---|---|
ID | Notification identity number | Webhook12345 |
Type | Notification types | webhook |
Url | The URL of the server that will receive the webhook notification | https://yourwebsite.com/webhook |
Using the webhook type configuration, Monika
will send a request with the following body:
body: {url: stringtime: stringalert: string}
Monika supports notifications from Whatsapp for business accounts. To enable notifications via WhatsApp for business, you must have a registered user in the WhatsApp business API server. Please refer to WhatsApp Business API documentation.
notifications:- id: unique-whatsapp-idtype: whatsappdata:recipients: ['628123456789', '3804321234']url: https://yourwhatsappapiserver.comusername: whatsappusernamepassword: whatsapppassword
Key | Description | Example |
---|---|---|
ID | Notification identity number | whatsapp12345 |
Type | Notification types | whatsapp |
Recipients | An array phone number registered for whatsapp, should start with your country code number | ["628123456790", "629745834093"] |
Url | The URL of your whatsapp api server | https://yourwhatsappapiserver.com |
Username | Your whatsapp api user name | username |
Userpassword | Your whatsapp api user password | userpassword |
Monika supports Dingtalk. To enable notification via Dingtalk, you must create a robot webhook first. More info at Dingtalk robot webhook Dingtalk documentation and Alibaba cloud documentation.
notifications:- id: unique-id-webhooktype: dingtalkdata:access_token: YOUR_ACCESS_TOKEN
Key | Description | Example |
---|---|---|
Access Token | The token of your Dingtalk account | Dingtalk1234 |
Monika supports Gotify. To enable notification via Gotify, you must have a Gotify Server's URL and application token. Gotify is an open source notification server with several different clients. More info at Gotify documentation.
notifications:- id: unique-id-gotifytype: gotifydata:url: GOTIFY_URLtoken: GOTIFY_TOKEN
Key | Description | Example |
---|---|---|
url | Gotify server URL | https://gotify.example.com |
token | Gotify application token | Ohyegh1eePahraz |
Monika supports Pushover. To enable notification via Pushover, you must create a pushover application first. More info at Pushover documentation.
notifications:- id: unique-id-webhooktype: pushoverdata:token: PUSHOVER_TOKENuser: PUSHOVER_USER
Key | Description | Example |
---|---|---|
Token | Pushover application token | pushoverApplicationToken |
User | Pushover user key | pushoverUserKey |
Monika supports Opsgenie. To enable notification via Opsgenie, you must create a team, then create an integration, and finally add an API. More info at Opsgenie documentation.
notifications:- id: unique-id-opsgenietype: opsgeniedata:geniekey: GENIE_KEY
Key | Description | Example |
---|---|---|
Geniekey | Opsgenie application token | opsgenieApplicationToken |
Monika supports Pushbullet. To enable notification via Pushbullet, you must create an account and create your access token. You can create an access token at Pushbullet Settings Page.
Optionally, you can push notifications to specific devices by running the command below:
curl --header 'Access-Token: <your_access_token_here>' \https://api.pushbullet.com/v2/devices
Then, you can put the iden
value from the API response to the deviceID
at the Monika configuration properties.
More info at Pushbullet Documentation.
notifications:- id: unique-id-pushbullettype: pushbulletdata:token: PUSBULLET_ACCESS_TOKENdeviceID: PUSHBULLET_DEVICE_ID
Key | Description | Example |
---|---|---|
token | Pushbullet Access Token | a6FJVAA0LVJKrT8k |
deviceID | Pushbullet Device Identifier | ujpah72o0sjAoRtnM0jc |
Instatus is a status and incident communication tool. You need a page ID and an API key to use Instatus. You can obtain it by following the steps in the documentation.
notifications:- id: unique-id-instatustype: instatusdata:apiKey: YOUR_INSTATUS_API_KEYpageID: YOUR_INSTATUS_PAGE_ID //You can get it with client.pages.get()
Key | Description | Example |
---|---|---|
id | Notification identity number | instatus-id |
type | Notification types | instatus |
data.apiKey | Instatus API key | 43d43d2c06ae223a88a9c35523acd00a |
data.data.pageID | Instatus page ID | 2hu1aj8r6td7mog6uz1sh |
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 © 2024 Hyperjump Tech. All Rights Reserved.