📜 ⬆️ ⬇️

GLPI + Fusion Inventory

It took me to collect information about the configuration of computers in the working network. GLPI was chosen as the base. Because OCS Inventory has already been described in Habré and in comments to that article mentioned about Fusion Inventroy, then we will install it.
Main tasks:
  1. screw Fusion Inventory to GLPI, without using OCS Inventory;
  2. Start the script for collecting information manually, if necessary (so that nothing superfluous hangs in the memory);
  3. assemble the configuration of computers managing industrial equipment (they are not connected to the network);


The server should already have LAMP installed and configured (in my case, this is FAMP).

Install GLPI


# cd /usr/ports/www/glpi; make install clean 

Create a base and user (replace USER and PASSWORD with your own):
 # mysqladmin -uroot -p create glpi # mysql -uroot -p -e"GRANT ALL ON glpi.* TO USERNAME@localhost IDENTIFIED BY 'PASSWORD'" glpi 

Add apache to the settings (httpd.conf or httpd-vhosts.conf):
 Alias /glpi "/usr/local/www/glpi" <Directory /usr/local/www/glpi> AllowOverride Options FileInfo </Directory> 

Reboot Apache:
 # apachectl restart 

Go to the created site (http: // {host.domain} / glpi /) and select the installation language Russian, and then everything is clear.

Install FusionInventory (server)


Download the FusionInventory plugin and unpack it into the GLPI plugins folder:
 # cd ~ # fetch http://forge.fusioninventory.org/attachments/download/120/fusioninventory-for-glpi-2.2.2-release.tar.gz # cd /usr/local/www/glpi/plugins/ # rm remove.txt # tar -xzvf /root/fusioninventory-for-glpi-2.2.2-release.tar.gz 

Check the folder structure, it should look like this:
 |--- glpi |--- plugins |--- fusioninventory |--- fusioninventory | |--- index.php | |--- hook.php | |--- front | |--- inc | |--- fusininventory | |--- ... | |--- fusinvsnmp |--- ... etc... 

Go to GLPI under the admin account, menu “settings” -> “add-ons” -> in the field “FusionInventory” -> “update / install” -> “enable”. “Install”, and then include all parts of the plugin in this order:
  1. Fusioninventory
  2. FusionInventory INVENTORY
  3. FusionInventory SNMP

')

Install FusionInventory (client)


Download and install the client:
forge.fusioninventory.org/projects/fusioninventory-agent/wiki/Agent_supportedplateforms
During the installation, we indicate the path to the server (in the Win version, the settings are set during installation):
 http://server_ip/glpi/plugins/fusioninventory/front/plugin_fusioninventory.communication.php 

If DNS is used, then:
 http://glpi.mydomain/plugins/fusioninventory/front/plugin_fusioninventory.communication.php 

For Active Directory:
 http://AD_DOMAIN\user:password@serverip/glpi/plugins/fusioninventory/front/plugin_fusioninventory.communication.php 

You may have to specify additional settings (proxy, etc) - checkbox "Advanced" during installation.
After installing the client, go to the web interface GLPI -> “Add-ons” -> “FusionInventory” -> “Agent Management” and see if the computer appears in the list.
So that the agent does not hang permanently in memory, after installation:

Windows

  1. Copy the folder of the installed Fusion-Inventory
  2. In it create a save_net.cmd file with the following content:

 set PATH=%CD%\perl\;%CD%\perl\bin;%PATH% perl.exe %CD%\perl\bin\fusioninventory-agent --debug -f --no-wakeonlan --scan-homedirs --logfile=%CD%agent-log.txt --share-dir=%CD%share —server=http://glpi.mydomain/plugins/fusioninventory/front/plugin_fusioninventory.communication.php 

Do not forget to change "glpi.mydomain" to your name / ip.
For inventory / update, run the generated script, and to save the computer configuration (on which there is no network) to a file, create the “xml” directory and the save_local.cmd file with the following contents in the folder with Fusion-Inventory:
 set PATH=%CD%\perl\;%CD%\perl\bin;%PATH% perl.exe %CD%\perl\bin\fusioninventory-agent --debug -f --no-wakeonlan --scan-homedirs --local=%CD%\xml --logfile=%CD%\agent-log.txt --share-dir=%CD%\share 

After running this script, the configuration will be saved in the “xml” directory. To import the configuration into the database, go to glpi -> "Add-ons" -> "FusionInventory" -> "Import agent XML file" and select the desired file from the xml folder.
As a result, we get a portable version of Fusion Inventory, which can be run from a flash drive. The main thing is to be sure that no one has any living creatures on the computer.

FreeBSD / Linux



PS If you remove the hardware / computer / etc from the list, and then send the agent information about it to the server, then it will not appear in the corresponding list - you need to cancel the deletion (“Show deleted objects” -> “Restore”)

Source: https://habr.com/ru/post/134190/


All Articles