Source: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/media/glpi?at=release/7.4

This guide describes how to integrate your Zabbix installation with your GLPI installation using the Zabbix webhook feature, providing instructions on setting up a media type, user, and action in Zabbix.
The webhook supports both legacy REST API (V1) and RESTful API (V2). This webhook creates tickets in the GLPI Assistance section. Created tickets have the following urgency mapping:
| Severity in Zabbix | Urgency in GLPI |
|---|---|
| 0 - Not classified | Very low |
| 1 - Information | Very low |
| 2 - Warning | Low |
| 3 - Average | Medium |
| 4 - High | High |
| 5 - Disaster | Very high |
Zabbix version: 7.4 and higher.
After importing the webhook, you can configure it using webhook parameters.
The configurable parameters are intended to be changed according to the webhook setup as well as the user's preferences and environment.
| Name | Value | Description |
|---|---|---|
| zabbix_url | {$ZABBIX.URL} | Current Zabbix URL. |
| glpi_legacy_api | false | Boolean value (true/false) to set API version: false (default) enables Modern API v2 with OAuth2 Bearer token authentication, true enables Legacy API v1 with Session-Token authentication. |
| glpi_app_token | GLPI application token (optional; specify if the token is set in the API client settings). | |
| glpi_user_token | <PLACE GLPI USER TOKEN> | GLPI user token. |
| glpi_client_id | <PLACE GLPI CLIENT ID> | GLPI client ID. |
| glpi_client_secret | <PLACE GLPI CLIENT SECRET> | GLPI client secret. |
| glpi_username | <PLACE GLPI USERNAME> | GLPI username. |
| glpi_password | <PLACE GLPI USER PASSWORD> | GLPI user password. |
| glpi_url | <PLACE GLPI URL> | URL of GLPI installation. |
| glpi_urgency_autoregistration | Low | String value of GLPI urgency to assign to autoregistration event tickets. |
| glpi_urgency_discovery | Low | String value of GLPI urgency to assign to discovery event tickets. |
| glpi_urgency_internal | Low | String value of GLPI urgency to assign to internal event tickets. |
| severity_not_classified | Very low | GLPI urgency to assign to tickets when event has Zabbix severity "Not classified". |
| severity_information | Very low | GLPI urgency to assign to tickets when event has Zabbix severity "Information". |
| severity_warning | Low | GLPI urgency to assign to tickets when event has Zabbix severity "Warning". |
| severity_average | Medium | GLPI urgency to assign to tickets when event has Zabbix severity "Average". |
| severity_high | High | GLPI urgency to assign to tickets when event has Zabbix severity "High". |
| severity_disaster | Very high | GLPI urgency to assign to tickets when event has Zabbix severity "Disaster". |
Internal parameters are reserved for predefined macros that are not meant to be changed.
| Name | Value | Description |
|---|---|---|
| event_source | {EVENT.SOURCE} | Numeric value of the event source. Possible values: 0 - Trigger, 1 - Discovery, 2 - Autoregistration, 3 - Internal, 4 - Service. |
| event_value | {EVENT.VALUE} | Numeric value of the event that triggered an action (1 for problem, 0 for recovering). |
| event_severity | {EVENT.SEVERITY} | Name of the event severity. |
| event_nseverity | {EVENT.NSEVERITY} | Numeric value of the event severity. Possible values: 0 - Not classified, 1 - Information, 2 - Warning, 3 - Average, 4 - High, 5 - Disaster. |
| event_update_nseverity | {EVENT.UPDATE.NSEVERITY} | Numeric value of the event update severity. Possible values: 0 - Not classified, 1 - Information, 2 - Warning, 3 - Average, 4 - High, 5 - Disaster. |
| event_update_severity | {EVENT.UPDATE.SEVERITY} | Name of the event update severity. |
| event_update_status | {EVENT.UPDATE.STATUS} | Numeric value of the problem update status. Possible values: 0 - Webhook was called because of problem/recovery event, 1 - Update operation. |
| alert_subject | {ALERT.SUBJECT} | 'Default subject' value from action configuration. |
| alert_message | {ALERT.MESSAGE} | 'Default message' value from action configuration. |
| event_id | {EVENT.ID} | Numeric ID of the event that triggered an action. |
| trigger_id | {TRIGGER.ID} | Numeric ID of the trigger of this action. |
| glpi_problem_id | {EVENT.TAGS.__zbx_glpi_problem_id} | GLPI problem ID. |
Please be aware that each webhook supports an HTTP proxy. To use this feature, add a new media type parameter with the name
http_proxyand set its value to the proxy URL.
GLPI 11+ continues to support REST API (V1) without requiring OAuth2/V2. Note that V1 is not recommended for new integrations.
{$ZABBIX.URL}:{$ZABBIX.URL} which will contain the URL to the Zabbix frontend. The URL should be either an IP address, a fully qualified domain name, or a localhost./zabbix to the end of the URL. Good examples:
http://zabbix.comhttps://zabbix.lan/zabbixhttp://server.zabbix.lan/http://localhosthttp://127.0.0.1:8080zabbix.comhttp://zabbix/media_glpi.yaml file.Please adjust these values to suit your GLPI environment.
The following parameters apply to Zabbix events that support severities:
severity_not_classified - for Zabbix severity "Not Classified"severity_information - for Zabbix severity "Information"severity_warning - for Zabbix severity "Warning"severity_average - for Zabbix severity "Average"severity_high - for Zabbix severity "High"severity_disaster - for Zabbix severity "Disaster"And the following for Zabbix events that do not have severities:
glpi_urgency_internal - for Zabbix internal eventsglpi_urgency_discovery - for Zabbix discovery eventsglpi_urgency_autoregistration - for Zabbix autoregistration eventsglpi_url - the frontend URL of your GLPI installation, without any path suffix (e.g. http://glpi.example.com:8080).glpi_legacy_api - determine whether you are using RESTful API V2 with OAuth2 authorization (default, parameter value false) or legacy API (parameter value true).If using RESTful API V2 with OAuth2, set the required parameters:
glpi_client_id - the client ID that was generated during the creation of the OAuth client.glpi_client_secret - the client secret that was generated during the creation of the OAuth client.glpi_username - GLPI username created for the webhook.glpi_password - password for the GLPI webhook user.If using legacy API, set the parameters:
glpi_app_token - if you've opted to use an application token during the creation of API client, specify it here; otherwise leave it empty.glpi_user_token - the user token that was generated during the creation of the GLPI user.Click the Enabled checkbox to enable the media type and click the Update button to save the webhook settings.
Create a Zabbix user and add media:
For more information, please see Zabbix and GLPI documentation.
Please report any issues with the media type at https://support.zabbix.com.
You can also provide feedback, discuss the media type, or ask for help at ZABBIX forums.