16. 12. 2024 Mirko Morandini Asset Management

GUI-based GLPI Network Inventory Setup with the “GLPI Inventory” Plugin

GLPI agents not only perform a local inventory of the computer where they were installed, but also include several tools for discovering and inventorying other devices in their network:

  • A network discovery task that scans an IP range (ping, arp table lookup) and retrieves essentially a list of “alive” IP addresses
  • A network inventory task which performs SNMP queries on discovered devices to retrieve information on printers and network devices
  • A remote inventory task that performs a complete inventory of other computers via ssh (Linux/Unix) or WinRM (Windows), as if the agent was installed on them, which is useful for computers where the agent can’t be installed
  • A remote VMWare ESX/ESXi inventory task that connects to the vSphere SOAP web API and gets detailed information on hosts, including basic information about their virtual machines

Of course, you’ll need to install and execute these tasks on only a few selected servers that reach the network sections you want.

My colleague presented some of them in this blog post https://www.neteye-blog.com/2024/07/glpi-device-discovery/ and gave hints on how you need to install the agents (a standard installation does not include them) and to execute these tasks via command line.

The command line execution is very handy for testing and in certain environments. I’d like to present two possibilities for configuring these tasks without command line access, via two completely different Web GUIs! In this article I present the GLPI Inventory plugin, while my next blog will talk about the GLPI Agent Toolbox.

The GLPI Inventory Plugin

The GLPI inventory plugin is really a must for anyone using more than just local inventory with GLPI agents. The plugin is available on GitHub (https://github.com/glpi-project/glpi-inventory-plugin) and on the GLPI marketplace for both GLPI standalone and GLPI Cloud.

This plugin provides a menu entry under “Administration”, with its own dashboard and menu bar for a complete overview of agent information and configuration. If you plan to discover and inventory devices with GLPI agents, this plugin will soon be your favorite entry point. To some this page may already be familiar: it’s the direct successor to the popular Fusion inventory plugin. In fact, Fusion inventory and the Fusion agent were forked by TecLib some years ago to create the GLPI agent and GLPI native inventory, which can be configured under Administration > Inventory. However, only part of the functionality was ported to GLPI 10. To configure network inventory and discovery, ESX inventory, and package deployment inside GLPI, you’ll need this plugin. Some other links in the plugin menu are now shortcuts to native GLPI functionalities.

Configure Network Inventory

Let’s look at the steps to configure network discovery and inventory through this plugin, without using the command line:

  1. Go to Administration > Inventory > SNMP credentials and add credentials by defining the community and the SNMP version.
  2. Now go to the GLPI Inventory plugin page (Administration > GLPI Inventory). Select Networking > IP Ranges. Here, define an IP range. Usually, /24-Ranges are used to define management networks, specific networks for printers etc., because scanning larger ranges might take too much time. Now go to the 4th tab, “Associated SNMP credentials”, and select one or more of the credentials previously defined. Don’t skip this part!
  • To enable the network discovery and inventory functionalities on a specific agent, click on the agent icon, select an agent that runs on a computer/server with access to the desired IP ranges. Then on the 4th tab “Agents modules” select “Network discovery” and “Network inventory” (there are other ways to do this but this is the simplest one to describe).
  • Go to Tasks > Time slot and add a time slot where you configure the time slots where the agent should run (or select all 24h on all weekdays).

Now that everything is prepared, go to Tasks > Task Management. Here, you need to add two new tasks:

  1. The “network discovery” task, to scan an IP range and detect all devices that respond either to a simple ping or to an SNMP query: add a name and select both “Permit to prepare task after run” and “Active”. Now go to the tab “Job configuration”, select the module “Network discovery”, the IP range(s) to scan, and the agent where this will be done; click “Update” to save the configuration.
  2. The SNMP inventory task, to get available SNMP data for printers and network devices (computers with SNMP enabled will be ignored): perform the same steps as above, but in “Job configuration” select the module “Network inventory (SNMP)”, the same agent, and the same IP range(s). Here, network devices that have already been registered can also be selected manually if needed.

Everything is now ready – let’s wait for the agent to run!

When the agent successfully runs the discovery job, you can see it on the tab “Job executions”. Click on the agent name (in the image, “neteye01.lan”), and you’ll see all discovered devices and their associated asset type. All assets which don’t respond to an SNMP query, or have a different community, are put in the “Unmanaged devices” section. When responding to SNMP, most network equipment and printers are saved correctly, thanks to the GLPI agent’s comprehensive MIB catalogue.

After a first discovery run, GLPI is able to prepare the list of IPs for SNMP inventory, which will be queried in a second run. Finally you will find your switches, access points and printers as GLPI assets, with many details from the serial number to BIOS version and memory, printer drum and cartridge levels and all switch ports with connection details and connected devices. If you notice a device is missing, please check first if the SNMP community associated with that IP range is correct!

Now you’ve learned how to configure network discovery and inventory directly on the GLPI GUI. Once it works, this is a flexible way to manage network inventory, where you can easily add IP ranges, SNMP communities, agents to be remote-controlled, etc.

Let’s rock IT with GLPI!

Mirko Morandini

Mirko Morandini

Mirko Morandini, PhD, is part of the EriZone team since 2015. As a consultant, he guided the implementation of EriZone in various projects in the DACH area and in Italy.

Author

Mirko Morandini

Mirko Morandini, PhD, is part of the EriZone team since 2015. As a consultant, he guided the implementation of EriZone in various projects in the DACH area and in Italy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Archive