{"id":1543,"date":"2026-09-11T01:31:05","date_gmt":"2026-09-11T04:31:05","guid":{"rendered":"https:\/\/www.linuxpro.com.br\/?p=1543"},"modified":"2026-09-11T01:31:05","modified_gmt":"2026-09-11T04:31:05","slug":"go-glpi-agent-inventario-para-glpi-10-sem-perl","status":"publish","type":"post","link":"https:\/\/www.linuxpro.com.br\/en\/2026\/09\/go-glpi-agent-inventario-para-glpi-10-sem-perl\/","title":{"rendered":"go-glpi-agent: inventory for GLPI 10+ without Perl"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/09\/go-glpi-agent-inventario-glpi.webp\" alt=\"Mascote LinuxPro fazendo invent\u00e1rio de um rack com scanner ao lado de um cachorro caramelo\" width=\"1486\" height=\"856\" \/><\/p>\n<p>Asset inventory only works when the agent can run across the entire fleet, identify the machine in a stable way and deliver data that GLPI understands. The <a href=\"https:\/\/github.com\/jniltinho\/go-glpi-agent\" target=\"_blank\" rel=\"noopener\">go-glpi-agent<\/a> is a Go reimplementation of the FusionInventory\/GLPI ecosystem inventory agent: a static binary that collects local hardware and software and sends the result to GLPI 10+ \u2014 without Perl runtime, module tree, or SSH access to the endpoint.<\/p>\n<h2>What is go-glpi-agent<\/h2>\n<p>The project is not the official agent <code data-no-translation=\"\">glpi-agent<\/code>, nor does it try to overwrite it. It is a separate implementation, designed to coexist with the official agent and with the old <code data-no-translation=\"\">fusioninventory-agent<\/code>. The compatibility point is deliberate: it reads the format <code data-no-translation=\"\">agent.cfg<\/code> already used by the Perl agent and reuses existing identifiers, reducing the risk of a machine reappearing in GLPI as another asset after a migration.<\/p>\n<p>The flow is straightforward:<\/p>\n<ol>\n<li>the binary discovers local hardware, system, and software data;<\/li>\n<li>assembles the inventory in the project's internal model;<\/li>\n<li>attempts to send it to <code data-no-translation=\"\">\/front\/inventory.php<\/code> using GLPI's native JSON protocol;<\/li>\n<li>when necessary, it automatically falls back to the legacy OCS\/FusionInventory XML flow;<\/li>\n<li>GLPI associates the inventory with the computer identified by the agent.<\/li>\n<\/ol>\n<p>There is also a local mode: <code data-no-translation=\"\">go-glpi-agent run --local DIRET\u00d3RIO<\/code> saves the XML without sending it. This is the best first step to check what will be collected before pointing a fleet to production.<\/p>\n<h2>Why a Go binary changes operations<\/h2>\n<ul>\n<li><strong>Simple deployment:<\/strong> the project publishes native packages for Linux, plus files for Windows, FreeBSD, and macOS. For an infrastructure team, this reduces dependencies on the host.<\/li>\n<li><strong>One code, four systems:<\/strong> the same codebase covers Linux amd64, Windows amd64, FreeBSD amd64 and macOS 13+ on Apple Silicon; Intel Mac requires compilation on an Intel host.<\/li>\n<li><strong>Predictable schedule:<\/strong> on Linux, the package installs a <em>timer<\/em> systemd per hour with random delay. On Windows, version 0.6.0 switched to using a Windows service instead of the previous scheduled task.<\/li>\n<li><strong>Operational compatibility:<\/strong> the configuration file and the import of identity dumps make the switch less disruptive for existing installations.<\/li>\n<\/ul>\n<p>Don't confuse \u201csingle binary\u201d with \u201cmagic inventory.\u201d The agent still needs permissions, the correct endpoint, valid TLS, and a verification routine in GLPI.<\/p>\n<h2>What it collects<\/h2>\n<p>Coverage depends on the operating system, because each platform exposes the hardware differently. On Linux, the agent uses sources such as <code data-no-translation=\"\">\/sys<\/code>, <code data-no-translation=\"\">\/proc<\/code>, <code data-no-translation=\"\">dmidecode<\/code>, <code data-no-translation=\"\">lsblk<\/code>, <code data-no-translation=\"\">lvs<\/code> and the package managers\". <code data-no-translation=\"\">dpkg<\/code>, <code data-no-translation=\"\">rpm<\/code> and <code data-no-translation=\"\">pacman<\/code>. On Windows, it combines WMI, Registry, and gopsutil; on FreeBSD, it uses <code data-no-translation=\"\">kenv<\/code>, <code data-no-translation=\"\">pkg<\/code>, <code data-no-translation=\"\">geom<\/code>, <code data-no-translation=\"\">sysctl<\/code> and <code data-no-translation=\"\">usbconfig<\/code>; on macOS, it uses <code data-no-translation=\"\">system_profiler<\/code>, <code data-no-translation=\"\">ioreg<\/code>, <code data-no-translation=\"\">sysctl<\/code> and <code data-no-translation=\"\">sw_vers<\/code>.<\/p>\n<table>\n<thead>\n<tr>\n<th>Category<\/th>\n<th>Data examples<\/th>\n<th>Note<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Identity and system<\/td>\n<td>hostname, domain, distribution\/version, timezone<\/td>\n<td>Serial values known as junk are filtered out; in some VMs the UUID may become a fallback.<\/td>\n<\/tr>\n<tr>\n<td>Hardware<\/td>\n<td>CPU, memory and slots, BIOS, motherboard, chassis, disks, file systems, LVM, USB and network<\/td>\n<td>Some fields, such as memory slots and disk serial, require administrative privileges.<\/td>\n<\/tr>\n<tr>\n<td>Software<\/td>\n<td>dpkg\/rpm\/pacman packages on Linux; uninstall keys on Windows; <code data-no-translation=\"\">pkg<\/code> on FreeBSD<\/td>\n<td>on Windows, the project avoids <code data-no-translation=\"\">Win32_Product<\/code>, which is slow and can trigger MSI repair.<\/td>\n<\/tr>\n<tr>\n<td>Optional inventory<\/td>\n<td>running processes<\/td>\n<td>disabled by default; enable only if it makes sense for your inventory policy.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Installation on Ubuntu and Debian<\/h2>\n<p>Use a package from the <a href=\"https:\/\/github.com\/jniltinho\/go-glpi-agent\/releases\/tag\/v0.6.0\" target=\"_blank\" rel=\"noopener\">release v0.6.0<\/a>. The example below is for <code data-no-translation=\"\">amd64<\/code>; confirm the architecture with <code data-no-translation=\"\">dpkg --print-architecture<\/code> before downloading.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo apt update\nsudo apt install -y curl\n\nVER=0.6.0\ncurl -fLO \"https:\/\/github.com\/jniltinho\/go-glpi-agent\/releases\/download\/v${VER}\/go-glpi-agent_${VER}_amd64.deb\"\nsudo apt install \".\/go-glpi-agent_${VER}_amd64.deb\"\n\n\/opt\/go-glpi-agent\/go-glpi-agent version\nsystemctl cat go-glpi-agent.service<\/code><\/pre>\n<p>The package places the binary and configuration in <code data-no-translation=\"\">\/opt\/go-glpi-agent\/<\/code> and the units in <code data-no-translation=\"\">\/lib\/systemd\/system\/<\/code>. Do not copy over the <code data-no-translation=\"\">agent.cfg<\/code> during an upgrade: the package was designed to preserve the operator's configuration.<\/p>\n<h2>Configure the destination and test without sending anything<\/h2>\n<p>Edit <code data-no-translation=\"\">\/opt\/go-glpi-agent\/agent.cfg<\/code>. The minimum is your GLPI inventory endpoint. Use HTTPS in production and keep certificate validation enabled.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-ini\" data-no-translation=\"\"># \/opt\/go-glpi-agent\/agent.cfg\nserver = https:\/\/glpi.exemplo.com\/front\/inventory.php\ntag = datacenter-sp\n\n# Estado persistente: n\u00e3o apague sem planejar a consequ\u00eancia no invent\u00e1rio.\nvardir = \/opt\/go-glpi-agent\/var\n\n# Opcional: limita o invent\u00e1rio de processos e categorias.\nscan-processes = 0\n# no-category = printer,software\n\n# Se a CA for interna, informe a CA; n\u00e3o desative TLS em produ\u00e7\u00e3o.\n# ca-cert-file = \/etc\/ssl\/certs\/minha-ca.pem\n# proxy = http:\/\/proxy.exemplo.com:3128<\/code><\/pre>\n<p>Before the first upload, generate a local inventory. It allows you to open the XML, check hostname, serial, disks, and program list without creating or modifying a remote asset.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo install -d -m 0750 \/var\/tmp\/go-glpi-agent-inventory\nsudo \/opt\/go-glpi-agent\/go-glpi-agent run --local \/var\/tmp\/go-glpi-agent-inventory\nsudo find \/var\/tmp\/go-glpi-agent-inventory -maxdepth 1 -type f -printf '%f\\n'<\/code><\/pre>\n<p>When the output looks right, run it once against GLPI with debugging. Then verify the creation or update of the computer in the GLPI interface.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo \/opt\/go-glpi-agent\/go-glpi-agent run \\\n  --conf-file \/opt\/go-glpi-agent\/agent.cfg \\\n  --debug<\/code><\/pre>\n<p><strong>Avoid <code data-no-translation=\"\">no-ssl-check = 1<\/code> in production.<\/strong> If a private CA fails, install the correct chain or use <code data-no-translation=\"\">ca-cert-file<\/code>\/<code data-no-translation=\"\">ca-cert-dir<\/code>. Disabling verification turns a certificate error into an interception risk.<\/p>\n<h2>Schedule with systemd<\/h2>\n<p>The recommended mode for Linux is a one-shot hourly execution, triggered by the timer. The unit uses a random delay of up to ten minutes to prevent all hosts from calling GLPI at the same second.<\/p>\n<pre data-no-translation=\"\"><code class=\"language-bash\" data-no-translation=\"\">sudo systemctl enable --now go-glpi-agent.timer\nsystemctl status go-glpi-agent.timer --no-pager\nsystemctl list-timers go-glpi-agent.timer\njournalctl -u go-glpi-agent.service -n 100 --no-pager<\/code><\/pre>\n<p>There is also <code data-no-translation=\"\">go-glpi-agent-daemon.service<\/code>, for the long-running process that respects <code data-no-translation=\"\">delaytime<\/code> the configuration file. Choose <strong>timer or daemon<\/strong> for the same purpose; enabling both can duplicate inventories and load the server unnecessarily.<\/p>\n<h2>How to maintain asset identity<\/h2>\n<p>The biggest mistake in a migration is making GLPI see a known computer as a new machine. The project adopts the device ID format of the Perl agent and, on first run, can import existing dumps from FusionInventory\/GLPI Agent. Also preserve the directory <code data-no-translation=\"\">vardir<\/code>: state and persistent identifiers are kept there.<\/p>\n<p>In a controlled swap, run a pilot: select a few hosts, compare the asset before and after in GLPI, validate serial\/UUID\/hostname, and only then enable the timer on the rest. In virtual machines, extra attention to generic serial; the project documents fallback to UUID when SMBIOS returns values like <code data-no-translation=\"\">0<\/code>.<\/p>\n<h2>Useful settings and their values<\/h2>\n<table>\n<thead>\n<tr>\n<th>Name<\/th>\n<th>Value\/example<\/th>\n<th>Use<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code data-no-translation=\"\">server<\/code><\/td>\n<td><code data-no-translation=\"\">https:\/\/glpi.exemplo.com\/front\/inventory.php<\/code><\/td>\n<td>remote inventory destination.<\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">local<\/code><\/td>\n<td><code data-no-translation=\"\">\/var\/tmp\/inventario<\/code><\/td>\n<td>writes XML locally instead of sending.<\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">tag<\/code><\/td>\n<td><code data-no-translation=\"\">datacenter-sp<\/code><\/td>\n<td>classifies assets in GLPI.<\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">delaytime<\/code><\/td>\n<td><code data-no-translation=\"\">3600<\/code><\/td>\n<td>interval in seconds used by daemon mode.<\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">lazy<\/code><\/td>\n<td><code data-no-translation=\"\">1<\/code><\/td>\n<td>does not send if the server does not request.<\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">force<\/code><\/td>\n<td><code data-no-translation=\"\">1<\/code><\/td>\n<td>forces sending; use only when you know the operational effect.<\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">scan-processes<\/code><\/td>\n<td><code data-no-translation=\"\">0<\/code> or <code data-no-translation=\"\">1<\/code><\/td>\n<td>includes processes in the inventory; evaluate privacy and volume.<\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">no-category<\/code><\/td>\n<td><code data-no-translation=\"\">printer,software<\/code><\/td>\n<td>skips categories separated by comma.<\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">backend-collect-timeout<\/code><\/td>\n<td><code data-no-translation=\"\">180<\/code><\/td>\n<td>limit per collector, in seconds.<\/td>\n<\/tr>\n<tr>\n<td><code data-no-translation=\"\">ca-cert-file<\/code><\/td>\n<td><code data-no-translation=\"\">\/etc\/ssl\/certs\/minha-ca.pem<\/code><\/td>\n<td>Private CA for TLS.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Other operating systems<\/h2>\n<ul>\n<li><strong>RHEL, Rocky, Alma, Fedora, and openSUSE:<\/strong> the release includes an amd64 RPM; install it using the distribution's package manager.<\/li>\n<li><strong>Arch Linux:<\/strong> a package is available <code data-no-translation=\"\">.pkg.tar.zst<\/code> for installation with <code data-no-translation=\"\">pacman -U<\/code>.<\/li>\n<li><strong>Windows:<\/strong> the release provides ZIP and MSI. Since v0.6.0, the installer registers the service <code data-no-translation=\"\">go-glpi-agent<\/code>, started automatically under LocalSystem; configuration and executable are in <code data-no-translation=\"\">C:\\Program Files\\go-glpi-agent<\/code>, while state and logs are stored in <code data-no-translation=\"\">C:\\ProgramData<\/code>.<\/li>\n<li><strong>FreeBSD 14 amd64:<\/strong> use the tarball and the <code data-no-translation=\"\">INSTALL.md<\/code> included; there is an option for rc.d or cron.<\/li>\n<li><strong>macOS 13+ Apple Silicon:<\/strong> the release includes <code data-no-translation=\"\">.pkg<\/code> and <code data-no-translation=\"\">.dmg<\/code>. For Mac Intel, the documentation guides compiling on the Intel host itself.<\/li>\n<\/ul>\n<h2>Known limits: where not to overpromise<\/h2>\n<p>The project covers local inventory, not the entire Perl agent catalog. The documentation lists as gaps, among others: GPUs, monitors via EDID, printers, PCI\/RAID\/IPMI controllers, network discovery and inventory, deploy, Wake-on-LAN, ESX, and Snap, Flatpak, Nix, or Gentoo inventories. This is not a hidden defect: it is a criterion to decide whether it fits your environment or whether the official agent remains necessary on part of the fleet.<\/p>\n<p>It is also not a monitoring tool. For metrics and alerts, complement the inventory with <a href=\"\/en\/2026\/09\/monitorando-servidores-linux-com-prometheus\/\">Prometheus and Node Exporter<\/a>; for the history of ITSM and inventory on the server, see <a href=\"\/en\/2026\/09\/a-historia-do-glpi\/\">the history of GLPI<\/a>. Inventory answers \u201cwhat exists\u201d; monitoring answers \u201cwhat is happening now\u201d.<\/p>\n<h2>Current version and adoption roadmap<\/h2>\n<p>The current release, <strong>v0.6.0<\/strong>, was published on 10 July 2026. It replaces the Windows scheduled task with a real service and keeps the configuration next to the executable on upgrades. The previous series also recorded fixes for the GLPI native protocol 11; therefore it is worth following the release and changelog instead of copying old commands from tutorials.<\/p>\n<ol>\n<li>make a backup and choose five pilot machines;<\/li>\n<li>generate a local inventory and review identity and categories;<\/li>\n<li>point it to a test GLPI or to a pilot entity;<\/li>\n<li>confirm that the assets were updated, not duplicated;<\/li>\n<li>enable the timer gradually and monitor the journal and GLPI queues;<\/li>\n<li>document the disabled categories and the CA used, so that the operation is reproducible.<\/li>\n<\/ol>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"https:\/\/github.com\/jniltinho\/go-glpi-agent\" target=\"_blank\" rel=\"noopener\">go-glpi-agent \u2014 repository and README<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/jniltinho\/go-glpi-agent\/blob\/main\/docs\/REFERENCE.md\" target=\"_blank\" rel=\"noopener\">Technical reference: collectors, configuration, and installation<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/jniltinho\/go-glpi-agent\/releases\/tag\/v0.6.0\" target=\"_blank\" rel=\"noopener\">Release v0.6.0<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/jniltinho\/go-glpi-agent\/blob\/main\/CHANGELOG.md\" target=\"_blank\" rel=\"noopener\">Project changelog<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/glpi-project\/glpi-agent\" target=\"_blank\" rel=\"noopener\">Official GLPI Agent<\/a><\/li>\n<\/ul>\n<p>The go-glpi-agent does not replace an inventory policy; it makes that policy easier to distribute. Once the pilot confirms identity, TLS, and collection coverage, the single binary becomes a practical alternative to keep GLPI fed across Linux, Windows, FreeBSD, and macOS environments.<\/p>","protected":false},"excerpt":{"rendered":"<p>Asset inventory only works when the agent can run across the entire fleet, reliably identify each machine, and deliver data that GLPI understands. go-glpi-agent is a Go reimplementation of the FusionInventory\/GLPI ecosystem's inventory agent: a static binary that collects hardware and software information locally and sends the results to \u2026 <a title=\"go-glpi-agent: inventory for GLPI 10+ without Perl\" class=\"read-more\" href=\"https:\/\/www.linuxpro.com.br\/en\/2026\/09\/go-glpi-agent-inventario-para-glpi-10-sem-perl\/\" aria-label=\"Read more about go-glpi-agent: invent\u00e1rio para GLPI 10+ sem Perl\">Read more<\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46,2,120],"tags":[317,31,320,126],"class_list":["post-1543","post","type-post","status-publish","format-standard","hentry","category-devops","category-linux","category-servidores","tag-glpi","tag-golang","tag-inventario","tag-monitoramento"],"_links":{"self":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/1543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/comments?post=1543"}],"version-history":[{"count":1,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/1543\/revisions"}],"predecessor-version":[{"id":1545,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/posts\/1543\/revisions\/1545"}],"wp:attachment":[{"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/media?parent=1543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/categories?post=1543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxpro.com.br\/en\/wp-json\/wp\/v2\/tags?post=1543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}