Skip to content

Zabbix x WhatsApp: Integration Guide#

In this article, we will consider the integration of the Zabbix monitoring system with the WhatsApp messenger using the GREEN-API gateway. The manual contains scripts for Zabbix LTS 5, 6 and 7.

Contents#

Video guide#

Step 1. Installing WhatsApp and configuring a GREEN-API instance#

  1. Install the WhatsApp mobile application
  2. Registration in the console
  3. Create and authorize an instance
  4. Get access parameters to instance

Step 2. Integrating Zabbix and WhatsApp#

How to configure Zabbix to send notifications to WhatsApp:

In this example we use Zabbix LTS 5.

  1. Go to the Zabbix web interface, go to the AdministrationMedia types tab.
  2. In the upper right corner, click Create media type and create a notification method named WhatsApp.
  3. Add parameters to it, as shown in the screenshot below:

    1. Specify the apiURL, apiTokenInstance and IdInstance values from GREEN-API console.

    2. Specify the ID of a personal or group WhatsApp chat in the chatId field.

      Notifications will be sent to the specified chat.

      • The personal chat ID corresponds to the recipient's phone number and is entered in international format + the postfix c@us - phoneNumber@c.us. For example: 79876543210@c.us.
      • The group chat ID is a string like XXXXXXXXXX-XXXXXXXXXX@g.us or XXXXXXXXXXXXXXXXX@g.us. For more information on how to find out groupId, read our article.
    3. In the Script field, paste the script corresponding to your Zabbix version:

    Media type WhatsApp in Zabbix UI

  4. Go to the Message templates tab and add message templates.

    Message template is a prepared message text with dynamic variables for flexible message customization to the current situation.
    Templates can be edited at any time.

    Template examples:

    Message templates in Zabbix UI

  5. On the Options tab, you can configure notification processing. In the current scenario, the standard settings are sufficient.
    The parameters will be identical for all message types.

Read more about notifications in the Zabbix documentation.

Step 3. Testing sending messages to WhatsApp#

  1. Open the Media types tab, it should contain the WhatsApp method we added earlier.
  2. Click Test on the right side of the screen on the line with the selected method.

    Test WA media type in Zabbix UI

  3. Specify the values of the Message and Subject fields - the main message and its description.
    For example, Message = Trigger message, Subject = Trigger fired.

    Message from Zabbix to WhatsApp

  4. After clicking the Test button, the Response will display the OK value if sent successfully.

  5. Check the delivery of the notification to the WhatsApp chat.

    Message from Zabbix in WhatsApp

The message has been successfully delivered from Zabbix to WhatsApp.

This method allows you to configure any notifications from Zabbix to WhatsApp using GREEN-API.
We recommend using the free "Developer" plan to configure and test the integration.

Conclusion#

This article describes how to integrate Zabbix with WhatsApp using the GREEN-API service. This method is suitable for a wide range of system administrators, DevOps, users, and technical support specialists.

After installing the integration, you can quickly receive notifications from Zabbix directly in your work or personal WhatsApp chat, and promptly respond to any issues that arise.