This media type integrates your Zabbix installation with your GLPi installation using the Zabbix webhook feature.

GLPi configuration:

1. Enable access to the GLPi REST API:
- In the GLPi web interface, go to "Setup" → "General" → "API".
- Set the "Enable Rest API" and "Enable Rest API" options to "Yes" and click the "Save" button.

2. Add a new API client:
- Click the "Add API client" button.
- Specify the API client name and set the "Active" option to "Yes".
- For security reasons, you may want to restrict the API client to the IP address of Zabbix server and/or create an additional application token (will be generated by default; you can uncheck the "Regenerate" checkbox if you don't want to use it).
- Click the "Add" button.
- If you've opted to create an application token, open the settings of the created API client, and then copy and save the generated application token.

3. Create a new user profile with permissions to create problems and followups (alternatively, you can use an existing profile with sufficient privileges):
- Go to "Administration" → "Profiles" and click the "Add" button on the top of the page.
- Specify the profile name and set the "Profile's Interface" option to "Standard Interface", and then click the "Add" button.
- Open the created profile and click the "Assistance" tab.
- Set the "Add followup (requester)" permission for the "Followups" line in the "Followups/Tasks" section.
- Set the "Update", "Create", and "See all" permissions in the "Problems" section.
- Click the "Save" button.

4. Create a new user:
- Go to "Administration" → "Users" and click the "Add User" button on the top of the page.
- Specify the user login and set the "Profiles" option to the profile that you created in the previous step (or any other existing profile with permissions to create problems and followups).
- Click the "Add" button.
- Open the profile of the created user and check the "Regenerate" checkbox of the "API token" option; click "Save".
- Copy and save the generated user API token.

Zabbix configuration:

1. Before you can start using the GLPi webhook, set the global macro "{$ZABBIX.URL}":
- In the Zabbix web interface, go to "Administration" → "Macros" in the top-left drop-down menu.
- Set the global macro "{$ZABBIX.URL}" to the URL of the Zabbix frontend. The URL should be either an IP address, a fully qualified domain name, or localhost.
- Specifying a protocol is mandatory, whereas the port is optional. Depending on the web server configuration, you might also need to append "/zabbix" to the end of URL. Good examples:
  - http://zabbix.com
  - https://zabbix.lan/zabbix
  - http://server.zabbix.lan/
  - http://localhost
  - http://127.0.0.1:8080
- Bad examples:
  - zabbix.com
  - http://zabbix/

2. Set the following webhook 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_url - the frontend URL of your GLPi installation
- glpi_user_token - the user token that was generated during creation of GLPi user

3. Click the "Enabled" checkbox to enable the media type and click the "Update" button to save the webhook settings.

4. Create a Zabbix user and add media:
- To create a new user, go to the "Users" → "Users" section, click the "Create user" button in the top right corner. In the "User" tab, fill in all required fields (marked with red asterisks).
- In the "Media" tab, click "Add" and select the type "GLPi" from the drop-down list. Add any value in the "Send to" field: it is not used in the webhook, but is required.
- Make sure this user has access to all hosts for which you would like problem notifications to be sent to GLPi.

5. Done! You can now start using this media type in actions and create problem items in GLPi.

You can find the latest version of this media and additional information in the official Zabbix repository:
https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/media/glpi