↓Skip to main content

Seamless Integration: Setting Up Lark Webhooks for Uptime Kuma Notifications

·2 mins
Sebastian Scheibe
Author
Sebastian Scheibe
Table of Contents

Introduction #

In this article, we will guide you through setting up a Lark webhook to receive notifications from Uptime Kuma, a popular self-hosted monitoring tool. Using Lark for notifications ensures that your team stays informed in real-time about the status of your monitored services, allowing you to respond quickly to any downtime or issues.

Setup Lark Notification Webhook for Group #

Create Group #

Let’s create a group in which the notifications will be added.

If you already have a group that you would like to use, you do not need to create a new group. Ensure you have the necessary permissions to add bots to the group.

Lark dialog for creating the notification group

Add Bot #

Open up the settings and click on ‘Bots’.

Group settings in Lark

Click on ‘Add Bot’.

Add bot option in the Lark group settings

Choose the Custom Bot.

Bot selection dialog in Lark

Enter the desired bot information and click ‘Add’ to add the bot.

Custom bot setup dialog in Lark

Extract Webhook URL #

Copy the Webhook URL.

Webhook URL field for the newly created Lark bot

Sending a Notification #

Sending a notification is as simple as calling the URL via POST with application/json content-type.

There are multiple attributes available to style the messages, please check here .

curl --request POST \
  --url <WEBHOOK_URL> \
  --header 'content-type: application/json' \
  --data '{
  "msg_type": "text",
  "content": {
    "text": "Setting up the monitoring with webhooks"
  }
}'

Test webhook message received in the Lark group

Setup Uptime Kuma Notification #

To use Lark as a notification receiver for Uptime Kuma, setup a new notification.

Setup notification button in Uptime Kuma

Lark Webhook Setup #

Fill in the URL, the content and the headers as shown in the image. Important is the content type in the headers.

Body:

{
  "msg_type": "text",
  "content": {
    "text": "{{ msg }}"
  }
}

Headers:

{
    "content-type":"application/json"
}

Uptime Kuma notification configuration with the Lark webhook settings filled in

Test Message Received #

Test it and you should see a similar message.

Uptime Kuma test notification received in the Lark group

Conclusion #

By following these steps, you have successfully integrated Lark with Uptime Kuma to receive timely notifications directly in your Lark groups. This setup ensures you stay informed about any service downtime, allowing for quick response times and minimal disruption.

Resources #

Uptime Kuma

Lark Custom Bot Notification