fusioninventory-agent - FusionInventory agent For Linux/UNIX, Windows and MacOSX
fusioninventory-agent [ ... ] [ --server server | --local /tmp ]...
% fusioninventory-agent --server localhost # send an inventory to the OCS server % fusioninventory-agent --server http://localhost/ocsinventory2 # send an inventory over http to a server with a non standard # virtual directory % fusioninventory-agent --server https://localhost/ocsinventory # send an inventory over https to the OCS server % fusioninventory-agent --local /tmp # write an inventory in the /tmp directory % fusioninventory-agent --local /tmp --html # Use the --html parameter to generate a HTML file % fusioninventory-agent --server localhost --user=toto --password=pw --realm="Restricted Area" # send a report to a server protected by a basic authentication % fusioninventory-agent --lazy # send an inventory only if a random delay between 0 and PROLOG_FREQ had been run over. % fusioninventory-agent --delaytime 60 -d # If NO PROLOG_FREQ has been preset, pick a time between execution and --delaytime for the agent to contact the server [default is 3600 seconds]
fusioninventory-agent is an agent for OCS Inventory server and FusionInventory for GLPI servers. It creates local inventory of the machines (hardware and software) and send it to the server. It can also write it in a local XML file. This agent is the successor of the former linux_agent which was released with OCS 1.01 and prior. It also replaces the Solaris/AIX/BSD unofficial agents.
Supported systems:
Minimum perl version: 5.8
The which command on UNIX/Linux/MacOSX system.
Additional mandatory perl modules:
Additional optional perl modules:
Additional optional programs:
Once the archive is unpacked, use these commands:
perl Makefile.PL make make install
You can also run the agent from the tarball directory. In this case, use the --devlib flag to load the library from the local directory.
Sun Studio seems to be needed to build the dependency. The generated Makefile needs gmake to be executed. The default installation will install the binary in /usr/perl5/5.XXXXX/bin, set you $PATH variable according to that.
On Solaris/SPARC, you must install sneep and record the Serial Number with it. Download it from http://www.sun.com/download/products.xml?id=4304155a
If you don't want to use the installer for Windows you can follow the installation process avalaible there: http://forge.fusioninventory.org/projects/fusioninventory-agent/wiki/RunAgentWin32
Run ./fusioninventory-agent-config for automatic configuration.
FusionInventory Agent uses OCS Inventory protocol and is compatible with OCS Inventory server. The agent uses the same protocol with the FusionInventory For GLPI plugin.
The OCS protocol is basicly an exchange of XML file done over HTTP(S).
The agent send a first message to give it's ID (DEVICEID). The server send back to the agent an XML file with a list of parameter. It's the PROLOG RESP. You can see it if you're in Debug mode. In this PROLOG, the server send the PROLOG_FREQ. The agent will use it to know when it need to contact the server for the next time.
The agent compute the next query date this way:
PROLOG_FREQ/2+RANDOM(PROLOG_FREQ/2)
The agent will launch each modules and pass the list of options found in the PROLOG RESP as parameter. The module can send information directly to the server (inventory, SNMP scan result, etc)
In deamon mode, the agent wait during a period between the last PROLOG and PROLOG_FREQ. If PROLOG_FREQ is not set, it will use --delaytime value. The default value is 3600.
Most of the options are available in a short form and a long form. For example, the two lines below are all equivalent:
% fusioninventory-agent -s localhost % fusioninventory-agent --server localhost
Time before the agent kills modules processing which don't end before the timeout.
Indicate the place where the agent should store its files.
Display color on the terminal. This feature is disabled on Windows.
Launch fusioninventory-agent as daemon in background. Proc::Daemon is needed.
Launch fusioninventory-agent in daemon but do fork in background.
The directory where public SSL certificates are stored. In general it's /etc/ssl/certs.
You don't need to copy a public certificate on very agent if your private key is valide and was been signed by a valide certificate authority.
The path to the public certificate (e.g: /etc/ssl/certs/cacert.pem). If --ca-cert-file is used, --ca-cert-dir is ignored.
Load the configuration file from the given location. Ignored on Windows.
On Windows the settings are loaded from the registry. The information are stored there: HKEY_LOCAL_MACHINE\SOFTWARE\FusionInventory-Agent
Or on Windows 64bit machine: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\FusionInventory-Agent
Turn the debug mode on.
This option is designed for the developer. With it enabled, fusioninventory-agent won't try to load the Backend module installed on the system. Instead it will scan the ./lib directory. It may also be useful if you don't want to install the agent on your system.
This option can only be used as command line argument. It will be ignored if you set it in a config file or in Windows registry.
This option defaults to waiting a random() time between 0 and 3600 before initially contacting the server assuming NO PROLOG_FREQ has been set. Once PROLOG_FREQ has been set, it uses that number at the top end of it's random setting. Useful for pre-setting a deployed agent's initial start time (so you don't jam the server all at once, but don't have to wait an hour to make sure the deployment worked).
Do not use PERL5LIB and PERLLIB environment variable to find Perl library path.
The agent ask first the server if it should send an inventoroy of the machine. If the server doesn't know the machine or has outdated informations, it will request it. With this option, the agent ignore the server anwser and send an inventory.
Save the local inventory requested by --local in HTML.
Turn the verbose mode on. The flag is ignored if --debug is enable.
Do not contact the server more than one time during the PROLOG_FREQ and do an exit if there is nothing to do. Useful if you want to start the agent script regulary from the crontab but don't want to overload the server.
Write an inventory in the DIR directory. A new file will be created if needed.
Log message in FILE and turn off STDERR
Max logfile size in MB, default is unlimited. When the max size is reached, the file is truncated. This is only useful if there is no log rotation mechanism on the system.
The logger you want to use. It can be:
Stderr: print the messages directly in the console. Messages are lost in daemon mode (--daemon). You can use --color to turn color mode on.
File: log the error in a log file. Please use --logfile to set the location of your log file. --logfile turns this option on automatically
Syslog: use the local syslog server to log the messages.
You can use more than one parameter if you use ',' as delimiter. E.g:
% fusioinventory-agent --logger=Syslog,Stderr --local=/tmp
Disable the software deployment (new module).
Disable the ESX inventory task.
Disable the software deployment (OCS compatible module).
Do not generate inventory.
Do not use the wakeonlan.
Do not inventory the printer.
Do not inventory the software installed on the machine.
For OCS Inventory software deployment. Do not use peer 2 peer to download files.
Use PASSWORD for an HTTP authentification with the server.
Use PROXY to specify a proxy HTTP server. By default, the agent uses HTTP_PROXY environment variable.
Use REALM for an HTTP authentification with the server. For example, the value can be 'Restricted Area'. You can find it in the login popup of your Internet browser.
if no realm is passed and the auth fails, the agent will retry an authentification with the realm returned by the server.
The IP address of the interface to use for the P2P exchange. The default is 'all' the IP addresses with a 255.255.255.0 mask except 127.0.0.1.
The PORT of the interface to use for the embedded HTTP server used for the peer to peer data exchange and remote control. The default is '62354'.
Allow local users to access to http://127.0.0.1:62354/now to force an inventory immediately.
Should the agent scan the user directories to inventory their virtual machines ?.
The uri of the server. If URI doesn't start with http:// or https://, the agent assume the parameter is a hostname and rewrite it like that:
% --server=http://servername/ocsinventory
If you want to use https or another virtual directory (e.g: /ocsinventory2) you need to enter the full path.
You can declare more than one server if you use the ',' delimiter.
% --server=http://servername/ocsinventory,server2
In general, OCS Inventory server URL have this format:
http://servername/ocsinventory
and FusionInventory for GLPI this one:
http://servername/glpi/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
--server is ignored if --local is in use.
The directory where are stored the shared files. You probably don't need this option unless you don't want to use the Makefile.PL installation procedure or if File::ShareDir is not avalaible.
Print the inventory on stdout.
% fusioninventory-agent --stdout > /tmp/report.xml # prepare an inventory and write it in the /tmp/report.xml file. # A file will be created.
Authorize the agent to scan home directories to help with the Virtual Machines inventory.
Mark the machine with the TAG tag. Once the initial inventory is accepted by the server this value is ignored and you've to change the information directly on the server. The server do so in order to centralize the administration of the machine.
Do now validate HTTPS certificat with the servers. Please never use this option in production. This is just a very bad idea.
Hint: you can declare HTTPS_DEBUG to get SSL error messages in the console.
Use USER for the server authentication.
Print the version and exit.
Wait during a random period between 0 and DURATION second before initializing the connexion with the server.
% fusioninventory-agent --wait 5 --server localhost
The agent try to initialize the settings from the agent.cfg config file.
It looks for the file in these location:
/etc/fusioninventory/agent.cfg
/usr/local/etc/fusioninventory/agent.cfg
You can use the --conf-file=XXX parameter to load you own configuration file from a specific location. On Windows the settings are loaded from the Registry. The configuration file is ignored.
The command line parameters overwrite the configuration file.
Some modules like SNMPQuery needs to sent credential from the agent to the agent. We recommend to enable HTTPS support on the OCS or FusionInventory For GLPI server. We also recommend to use only trusted machine as agent in this case.
The FusionInventory project fusioninventory-devel@lists.alioth.debian.org
The maintainer is Goneri LE BOUDER <goneri@rulezlan.org>
Please read the AUTHORS, Changes and THANKS files to see who is behind FusionInventory.
FusionInventory website: http://www.FusionInventory.org/
project Forge: http://Forge.FusionInventory.org
The source code of the agent is available on:
Gitorious: http://gitorious.org/fusioninventory
Github: http://github.com/fusinv/fusioninventory-agent
The mailing lists:
http://lists.alioth.debian.org/mailman/listinfo/fusioninventory-devel
http://lists.alioth.debian.org/mailman/listinfo/fusioninventory-user
IRC: #FusionInventory on FreeNode IRC Network
Please, use the mailing lists as much as possible. You can also use the bugtracker on http://forge.fusionInventory.org
Copyright (C) 2006-2010 OCS Inventory contributors Copyright (C) 2010-2011 FusionInventory Team
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
The memconf script is maintained by Tom Schmidt http://myweb.cableone.net/4schmidts/memconf.html Copyright © 1996-2009 Tom Schmidt
memconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
FusionInventory::Agent::Backend::Virtualization::Vmsystem uses code from imvirt:
Authors: Thomas Liske <liske@ibh.de> Copyright Holder: 2008 (C) IBH IT-Service GmbH [http://www.ibh.de/] License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in '©'. Assuming UTF-8
To install FusionInventory::Agent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FusionInventory::Agent
CPAN shell
perl -MCPAN -e shell install FusionInventory::Agent
For more information on module installation, please visit the detailed CPAN module installation guide.