GuíasGuides · Nivel 2Level 2

GLPI: inventario con GLPI Agent, tickets con SLA y un equipo que deja de reportarGLPI: inventory with GLPI Agent, tickets with SLAs and a device that stops reporting

Lo básico para instalar GLPI, el inventario nativo con GLPI Agent, entidades y perfiles, tickets con SLA, activos vinculados a los tickets, notificaciones por correo, plugins con cuidado, las copias y qué mirar cuando un equipo deja de enviar inventario.The basics of installing GLPI, native inventory with GLPI Agent, entities and profiles, tickets with SLAs, assets linked to tickets, email notifications, plugins with care, backups, and what to check when a device stops sending inventory.

Qué vas a conseguir

Un GLPI que sirve para las dos cosas que se le piden: saber qué equipos hay y dónde, y llevar los tickets del soporte con tiempos que se cumplen. Inventario automático con GLPI Agent, usuarios que ven solo lo suyo, tickets con SLA y el equipo afectado enlazado, correos que salen y una copia que te deja actualizar sin miedo.

Antes de empezar

  • La versión. La rama actual es la 11.0; la 10.0 termina con la 10.0.28 y deja de recibir correcciones cuando salga la 12.0. Mira los requisitos de la versión que vas a instalar en la documentación oficial: para GLPI 11, PHP 8.2 o superior y MySQL 8.0 o MariaDB 10.6 como mínimo, con extensiones como intl, gd, curl, mysqli, bcmath y mbstring.
  • Un servidor Linux con Apache o Nginx y PHP-FPM, y una base de datos con un usuario solo para GLPI.
  • El nombre en DNS (glpi.contoso.example) y un certificado: los agentes enviarán el inventario por HTTPS.

1. Instalación: lo que no hay que saltarse

  • La raíz del servidor web apunta a la carpeta public de GLPI (/var/www/glpi/public), no a la carpeta de GLPI. Así los ficheros de configuración y los datos no quedan expuestos.
  • La base de datos se crea desde el asistente web o por consola con php bin/console db:install.
  • Al terminar, GLPI avisa en la página de inicio de dos cosas que se arreglan el primer día: las cuentas por defecto (glpi, tech, normal, post-only) con su contraseña de fábrica, que se cambian o se desactivan, y el fichero install/install.php, que se borra.
  • Las acciones automáticas (envío de correos, SLA, limpiezas) necesitan el cron. En la crontab del usuario del servidor web:
glpi01 · crontab de www-data
crontab -u www-data -e* * * * * php /var/www/glpi/front/cron.php

Y en Configuración › Acciones automáticas, las importantes en modo CLI. En modo GLPI solo se ejecutan cuando alguien navega por la aplicación.

2. Entidades y perfiles

  • Las entidades son el árbol de la organización: Contoso › Madrid, Contoso › Bilbao. Cada equipo y cada ticket pertenece a una. Sirven para que el técnico de una sede vea su sede, no todo.
  • Los perfiles dicen qué puede hacer cada uno. Los de fábrica cubren casi todo: Super-Admin, Admin, Supervisor, Technician, Hotliner, Observer, Self-Service y Read-Only.
  • Una habilitación une usuario, perfil y entidad, con la opción recursiva para que incluya las entidades hijas.
  • Con LDAP configurado (Configuración › Autenticación › Directorios LDAP), las reglas de asignación de habilitaciones dan a cada usuario su perfil y su entidad según su grupo o su OU. Los usuarios entran con Self-Service: abren tickets y ven los suyos.

3. Inventario con GLPI Agent

Desde GLPI 10 el inventario es nativo: ya no hace falta el plugin FusionInventory. El plugin GLPI Inventory solo se instala si necesitas descubrimiento de red, despliegue de software o inventario de ESX.

  1. Actívalo en Administración › Inventario, casilla Activar inventario. Sin ella, GLPI rechaza todo lo que envían los agentes.
  2. Instala el agente en los equipos con la dirección del servidor:
PowerShell · instalación silenciosa en Windows
msiexec /i GLPI-Agent-x64.msi /quiet SERVER="https://glpi.contoso.example/" RUNNOW=1 TAG="madrid"

En Linux, el paquete de la distribución o el instalador oficial, con server = https://glpi.contoso.example/ en su configuración. En la flota, el MSI se reparte con Intune, MECM o una GPO.

  1. Reglas. En Administración › Reglas, las reglas de importación y vinculación deciden si un envío crea un equipo nuevo o actualiza uno existente (por número de serie, UUID o nombre). Las de asignación de entidad pueden usar la etiqueta (TAG) del agente para dejar cada equipo en su sede.
  2. Comprueba la ficha de un equipo: modelo, número de serie, sistema operativo, discos, software, y la fecha del último inventario.

El agente tiene una página local en http://127.0.0.1:62354 con un enlace para forzar el inventario. Es la forma más rápida de probar desde el propio equipo.

4. Tickets y SLA

  • Categorías pensadas para quien abre el ticket (Correo, Impresoras, Acceso a aplicaciones), no para el organigrama de IT.
  • Prioridad calculada a partir de urgencia e impacto, con la matriz de Configuración › General › Asistencia.
  • Calendario laboral con festivos (en los desplegables de configuración): un SLA de 8 horas no debe contar la noche.
  • SLA en Configuración › Niveles de servicio: un nivel de servicio con su calendario y dentro los dos tiempos, TTO (tiempo para hacerse cargo) y TTR (tiempo de resolución), con niveles de escalado si quieres que avise antes de vencer.
  • Reglas de negocio para tickets (Administración › Reglas) que asignan el SLA, el grupo técnico y la categoría según el origen o el tipo. Así nadie elige el SLA a mano.

5. Activos vinculados a los tickets

Un ticket con el equipo enlazado (pestaña Elementos) deja historial: en la ficha del portátil se ven todos sus tickets.

  • En el perfil Self-Service, el permiso para vincular elementos al crear el ticket deja que el usuario elija Mis dispositivos: los equipos que el inventario le ha asignado.
  • Para que eso funcione, el campo usuario del equipo tiene que estar bien. El agente lo rellena con el último usuario que inició sesión; revisa las reglas si llega vacío.

6. Notificaciones

  1. Configuración › Notificaciones: activa las notificaciones y las de correo.
  2. Configura el remitente y el servidor SMTP en la configuración de seguimiento por correo, y usa Enviar un correo de prueba al administrador.
  3. Revisa qué eventos avisan a quién: nuevo ticket, seguimiento, solución, SLA a punto de vencer. Menos y útiles: si los técnicos reciben veinte correos por ticket, dejan de leerlos.
  4. Los correos salen por la cola de notificaciones, que vacía una acción automática. Si no sale ninguno, lo primero es el cron del apartado 1.

7. Plugins, con cuidado

  • Cada plugin es código de terceros dentro de tu helpdesk. Instala solo los que resuelven algo concreto y desde el Marketplace (Configuración › Plugins).
  • Antes de actualizar GLPI, comprueba que cada plugin tiene versión compatible. En los saltos de versión mayor (de 10 a 11) muchos tardan semanas en estar listos, y un plugin incompatible se desactiva.
  • Desactivar no es desinstalar: desinstalar suele borrar las tablas del plugin y sus datos.

8. Copias

Dos partes: la base de datos y las carpetas con datos y configuración.

glpi01 · copia diaria
mysqldump --single-transaction -u glpi_backup -p glpi | gzip > /backup/glpi-db-$(date +%F).sql.gztar -C /var/www/glpi -czf /backup/glpi-files-$(date +%F).tar.gz config files marketplace plugins
  • config tiene la conexión a la base de datos y la clave de cifrado (glpicrypt.key). Sin esa clave, las contraseñas guardadas (LDAP, SMTP, receptores) no se pueden descifrar al restaurar.
  • files guarda los documentos adjuntos a los tickets.
  • Copia siempre antes de actualizar GLPI o un plugin, y restaura en pruebas de vez en cuando: un GLPI que arranca, con tickets y adjuntos, es la prueba.

9. El ticket: "este portátil no actualiza el inventario desde hace un mes"

La ficha de PC-MAD-0142 dice que su último inventario fue hace 34 días.

  1. En GLPI, antes de tocar el equipo: busca por número de serie, no por nombre. Si el portátil se reinstaló con otro nombre, puede que esté enviando inventario a otra ficha, y lo que tienes es un duplicado. Mira también Equipos rechazados en el inventario: las reglas pueden estar rechazando sus envíos.
  2. En el equipo: el servicio del agente en marcha, y un inventario forzado con detalle:
PowerShell · en PC-MAD-0142
Get-Service -Name glpi-agentStatus   Name         DisplayName------   ----         -----------Running  glpi-agent   GLPI Agent& "C:\Program Files\GLPI-Agent\glpi-agent.bat" --force --debug[info] target server0: server https://glpi-old.contoso.example/plugins/fusioninventory/[error] [http client] communication error: 500 Can't connect to glpi-old.contoso.example:443
  1. Lee el error. Aquí está claro: el agente sigue apuntando al servidor antiguo con la ruta de FusionInventory. Las causas habituales:
Lo que dice el agenteCausa probable
No conecta con el servidorURL antigua o mal escrita, DNS, cortafuegos o proxy
Error de certificadoCertificado renovado con una CA que el equipo no conoce
Conecta, pero GLPI no lo guardaInventario desactivado, o una regla lo rechaza (Equipos rechazados)
Todo bien, pero no lo vesSe ha guardado en otra entidad o en otra ficha (duplicado)
  1. Corrige la dirección (en Windows, el valor server en HKLM\SOFTWARE\GLPI-Agent, o reinstalando el MSI con SERVER=), fuerza otro inventario y comprueba que cambia la fecha en la ficha.
  2. Busca si hay más: una búsqueda de equipos con último inventario de hace más de 30 días saca todos los que se quedaron atrás en la migración. Corrígelos con la herramienta de despliegue, no uno a uno.

Siguientes pasos

  • La guía de Jira Service Management cubre qué tiene que tener un ticket bien hecho, sea cual sea la herramienta.
  • La guía de Device42 sigue la misma idea de inventario para la sala de comunicaciones: racks, U y contratos.
  • Con el inventario y los tickets en GLPI, el siguiente paso es medir: tiempos frente al SLA, reaperturas y volumen por categoría. Es lo que hace el repositorio 04-itsm-kpi-dashboard de mi GitHub, y 38-it-asset-lifecycle-planner aprovecha el inventario para planificar qué equipos toca renovar.

¿Falta algo o en tu entorno es distinto? Escríbeme y lo corrijo.

What you'll get

A GLPI that does the two things it is asked to do: tell you which devices there are and where, and run the support tickets with times that are met. Automatic inventory with GLPI Agent, users who only see their own things, tickets with SLAs and the affected device linked, emails that go out and a backup that lets you upgrade without fear.

Before you start

  • The version. The current branch is 11.0; 10.0 ends with 10.0.28 and stops getting fixes when 12.0 comes out. Check the requirements of the version you are installing in the official documentation: for GLPI 11, PHP 8.2 or later and at least MySQL 8.0 or MariaDB 10.6, with extensions such as intl, gd, curl, mysqli, bcmath and mbstring.
  • A Linux server with Apache or Nginx and PHP-FPM, and a database with a user just for GLPI.
  • The DNS name (glpi.contoso.example) and a certificate: the agents will send inventory over HTTPS.

1. Installation: what not to skip

  • The web server's document root points to GLPI's public folder (/var/www/glpi/public), not to the GLPI folder. That way the configuration files and the data are not exposed.
  • The database is created from the web wizard or from the console with php bin/console db:install.
  • Once done, GLPI warns on the home page about two things you fix on day one: the default accounts (glpi, tech, normal, post-only) with their factory passwords, which you change or disable, and the install/install.php file, which you delete.
  • Automatic actions (sending emails, SLAs, clean-ups) need cron. In the web server user's crontab:
glpi01 · www-data crontab
crontab -u www-data -e* * * * * php /var/www/glpi/front/cron.php

And in Setup › Automatic actions, the important ones in CLI mode. In GLPI mode they only run when someone is browsing the application.

2. Entities and profiles

  • Entities are the organisation tree: Contoso › Madrid, Contoso › Bilbao. Every device and every ticket belongs to one. They let a site's technician see their site, not everything.
  • Profiles say what each person can do. The built-in ones cover almost everything: Super-Admin, Admin, Supervisor, Technician, Hotliner, Observer, Self-Service and Read-Only.
  • An authorisation ties user, profile and entity together, with the recursive option so it includes child entities.
  • With LDAP configured (Setup › Authentication › LDAP directories), the authorisation assignment rules give each user their profile and entity based on their group or OU. Users come in with Self-Service: they open tickets and see their own.

3. Inventory with GLPI Agent

Since GLPI 10 inventory is native: the FusionInventory plugin is no longer needed. The GLPI Inventory plugin is only installed if you need network discovery, software deployment or ESX inventory.

  1. Turn it on in Administration › Inventory, the Enable inventory box. Without it, GLPI rejects everything the agents send.
  2. Install the agent on the devices with the server address:
PowerShell · silent install on Windows
msiexec /i GLPI-Agent-x64.msi /quiet SERVER="https://glpi.contoso.example/" RUNNOW=1 TAG="madrid"

On Linux, the distribution package or the official installer, with server = https://glpi.contoso.example/ in its configuration. Across the fleet, the MSI goes out with Intune, MECM or a GPO.

  1. Rules. In Administration › Rules, the import and link rules decide whether a submission creates a new device or updates an existing one (by serial number, UUID or name). The entity assignment rules can use the agent's tag (TAG) to place each device in its site.
  2. Check a device's record: model, serial number, operating system, disks, software, and the date of the last inventory.

The agent has a local page at http://127.0.0.1:62354 with a link to force an inventory. It is the quickest way to test from the device itself.

4. Tickets and SLAs

  • Categories designed for the person opening the ticket (Email, Printers, Application access), not for IT's org chart.
  • Priority calculated from urgency and impact, with the matrix in Setup › General › Assistance.
  • A working calendar with public holidays (in the setup dropdowns): an 8-hour SLA should not count the night.
  • SLAs in Setup › Service levels: a service level with its calendar and, inside it, the two times, TTO (time to own) and TTR (time to resolve), with escalation levels if you want a warning before they expire.
  • Business rules for tickets (Administration › Rules) that assign the SLA, the technician group and the category based on the source or the type. That way nobody picks the SLA by hand.

5. Assets linked to tickets

A ticket with the device linked (the Items tab) leaves a history: the laptop's record shows all its tickets.

  • In the Self-Service profile, the right to link items when creating a ticket lets users pick My devices: the devices the inventory has assigned to them.
  • For that to work, the device's user field has to be right. The agent fills it with the last user who signed in; check the rules if it arrives empty.

6. Notifications

  1. Setup › Notifications: turn on notifications and email notifications.
  2. Set the sender and the SMTP server in the email followups configuration, and use Send a test email to the administrator.
  3. Review which events notify whom: new ticket, followup, solution, SLA about to expire. Fewer and useful: if technicians get twenty emails per ticket they stop reading them.
  4. Emails leave through the notification queue, which an automatic action empties. If none go out, the first thing to check is the cron from section 1.

7. Plugins, with care

  • Every plugin is third-party code inside your helpdesk. Install only the ones that solve something specific, and from the Marketplace (Setup › Plugins).
  • Before upgrading GLPI, check that every plugin has a compatible version. On major version jumps (10 to 11) many take weeks to be ready, and an incompatible plugin gets disabled.
  • Disabling is not uninstalling: uninstalling usually drops the plugin's tables and its data.

8. Backups

Two parts: the database and the folders with data and configuration.

glpi01 · daily backup
mysqldump --single-transaction -u glpi_backup -p glpi | gzip > /backup/glpi-db-$(date +%F).sql.gztar -C /var/www/glpi -czf /backup/glpi-files-$(date +%F).tar.gz config files marketplace plugins
  • config holds the database connection and the encryption key (glpicrypt.key). Without that key, the stored passwords (LDAP, SMTP, receivers) cannot be decrypted after a restore.
  • files holds the documents attached to tickets.
  • Back up every time before upgrading GLPI or a plugin, and restore to test now and then: a GLPI that starts, with tickets and attachments, is the proof.

9. The ticket: "this laptop has not updated its inventory for a month"

The record for PC-MAD-0142 says its last inventory was 34 days ago.

  1. In GLPI, before touching the device: search by serial number, not by name. If the laptop was reimaged with another name, it may be sending inventory to another record, and what you have is a duplicate. Also check Refused equipment in the inventory: the rules may be rejecting its submissions.
  2. On the device: the agent service running, and a forced inventory with detail:
PowerShell · on PC-MAD-0142
Get-Service -Name glpi-agentStatus   Name         DisplayName------   ----         -----------Running  glpi-agent   GLPI Agent& "C:\Program Files\GLPI-Agent\glpi-agent.bat" --force --debug[info] target server0: server https://glpi-old.contoso.example/plugins/fusioninventory/[error] [http client] communication error: 500 Can't connect to glpi-old.contoso.example:443
  1. Read the error. Here it is clear: the agent still points at the old server with the FusionInventory path. The usual causes:
What the agent saysLikely cause
Cannot connect to the serverOld or mistyped URL, DNS, firewall or proxy
Certificate errorCertificate renewed with a CA the device does not know
Connects, but GLPI does not store itInventory disabled, or a rule rejects it (Refused equipment)
All fine, but you cannot see itStored in another entity or another record (duplicate)
  1. Fix the address (on Windows, the server value in HKLM\SOFTWARE\GLPI-Agent, or reinstall the MSI with SERVER=), force another inventory and check the date changes on the record.
  2. Look for others: a search for devices whose last inventory is more than 30 days old brings up every one left behind in the migration. Fix them with the deployment tool, not one by one.

Next steps

  • The Jira Service Management guide covers what a well-made ticket needs, whatever the tool.
  • The Device42 guide follows the same inventory idea for the comms room: racks, U positions and contracts.
  • With inventory and tickets in GLPI, the next step is measuring: times against SLA, reopenings and volume by category. That is what the 04-itsm-kpi-dashboard repository on my GitHub does, and 38-it-asset-lifecycle-planner uses the inventory to plan which devices are due for replacement.

Is something missing, or different in your environment? Get in touch and I'll fix it.

Tech Career Lab · newsletter

¿Te ha servido? Cada dos semanas envío una idea práctica para perfiles IT: LinkedIn, proyectos, networking y procesos de selección.Found this useful? Every two weeks I send one practical idea for IT professionals: LinkedIn, projects, networking and hiring processes.

Apúntate y llévate las 33 ideasSign up and get the 33 ideas →