GLPI - Connect an external GLPI
Applies to: Medulla/GLPI
Medulla version: all
GLPI version: 10.0.x
Environment: On-Premise
Category: Medulla
Prerequisites
Before configuring the integration between Medulla and GLPI, ensure that the following items are available and properly configured.
1. GLPI database access
Create a dedicated MySQL/MariaDB user for Medulla with the following permissions:
- Read-only (`READ ONLY`) or read/write as needed
- Access to the entire GLPI database
2. Network connectivity
Allow communication between the Medulla server and the GLPI database server:
- Port `3306` open (or a custom port depending on your configuration)
3. Creating a GLPI API user
Create a GLPI user dedicated to API calls with a name of your choice:
In GLPI under `Administration > Users`
- Type: standard user (username / password)
- Recommended profile:
- `Read-Only` or `Super-Admin`
- Assignment:
- Root entity
- Recursive mode enabled
Then generate a user API token (`user_token`)
4. Creating a GLPI API client
Create an API client named `MMC`.
In GLPI, go to `Configuration > General > API`
Then generate the application token (`app_token`)
5. Import SQL views into your GLPI database
In your GLPI database, you must import the file downloaded here:
https://dl.medulla-tech.io/nc/glpi-100.sql
---
Using the script
Help command
./change_itsm_parameters.py --help
usage: change_itsm_parameters.py [-h]
--url URL
--db-host DB_HOST
--db-port DB_PORT
--db-name DB_NAME
--db-user DB_USER
--db-pass DB_PASS
--api-url API_URL
--api-user API_USER
--api-pass API_PASS
[--inv-forward INV_FORWARD]
[--inv-forward-url INV_FORWARD_URL]
[--inv-plugin INV_PLUGIN]
[--inv-agent INV_AGENT]
[--inv-agent-disabled INV_AGENT_DISABLED]
Usage examples:
./change_itsm_parameters.py \
--url https://glpi.mon-domaine.fr/ \
--db-host 10.10.0.101 \
--db-port 3306 \
--db-name GLPI \
--db-user medulla_glpi \
--db-pass yJxI40UzO8Jn7dd7K5Yaml \
--api-url https://glpi.mon-domaine.fr/apirest.php/ \
--api-user medulla_APIUSER \
--api-pass fLN1Zomh877obPhk \