Fusioninventory agent linux config

fusioninventory-agent(1) — Linux man page

fusioninventory-agent — FusionInventory agent For Linux/UNIX, Windows and MacOSX

Synopsis

fusioninventory-agent [ . ] [ —server server | —local /tmp ].

Examples

Description

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: Windows (since Windows 2000) GNU/Linux MacOSX Solaris FreeBSD NetBSD OpenBSD AIX HP-UX GNU/kFreeBSD

Installation

PREREQUISITES Minimum perl version: 5.8

The which command on UNIX/Linux/MacOSX system.

Additional mandatory perl modules: Digest::MD5 XML::Simple LWP Net::IP UNIVERSAL::require Mac::SysProfile (MacOs only) Additional optional perl modules: Compress::Zlib, for message compression HTTP::Daemon, for web interface Net::CUPS (v0.60 minimum), for printers detection File::ShareDir, for automatic data directory determination Proc::Daemon, for daemon mode (Unix only) Proc::PID::File, for daemon mode (Unix only) Additional optional programs: nmap or ipdiscover, for network discovery dmidecode (linux or bsd) for hardware inventory lspci (linux or bsd) for hardware inventory

PROCEDURE Once the archive is unpacked, use these commands: 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.

SYSTEM-SPECIFIC INFORMATIONS Solaris

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

If you don’t want to use the installer for Windows you can follow the installation process avalaible there:

POST-INSTALLATION Run ./fusioninventory-agent-config for automatic configuration.

Ocs Inventory Protocol

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).

First, The PROLOG 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:

Module execution 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)

Windows service or Deamon mode 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.

Options

Most of the options are available in a short form and a long form. For example, the two lines below are all equivalent: —backend-collect-timeout=SECONDS_BEFORE_KILL Time before the agent kills modules processing which don’t end before the timeout. —basevardir= DIR Indicate the place where the agent should store its files. —color Display color on the terminal. This feature is disabled on Windows. -d, —daemon Launch fusioninventory-agent as daemon in background. Proc::Daemon is needed. -D, —daemon-no-fork Launch fusioninventory-agent in daemon but do fork in background. —ca-cert-dir= PATH 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. —ca-cert-file= FILE The path to the public certificate (e.g: /etc/ssl/certs/cacert.pem). If —ca-cert-file is used, —ca-cert-dir is ignored.

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. —conf-file= FILE 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

Читайте также:  Переустановить windows форматировать диск

Or on Windows 64bit machine: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\FusionInventory-Agent —debug Turn the debug mode on. —devlib 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. —delaytime=SECONDS_TO_WAIT 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). —disable-perllib-envvar Do not use PERL5LIB and PERLLIB environment variable to find Perl library path.

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. -f, —force 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. —html Save the local inventory requested by —local in HTML . -i, —info Turn the verbose mode on. The flag is ignored if —debug is enable. —lazy 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. -l, —local= DIR Write an inventory in the DIR directory. A new file will be created if needed. —logfile= FILE Log message in FILE and turn off STDERR —logfile-maxsize= FILE 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. —logger= LOGGER: 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: —no-deploy Disable the software deployment (new module). —no-esx Disable the ESX inventory task. —no-ocsdeploy Disable the software deployment ( OCS compatible module). —no-inventory Do not generate inventory. —no-wakeonlan Do not use the wakeonlan. —no-printer Do not inventory the printer. —no-software Do not inventory the software installed on the machine. —no-p2p For OCS Inventory software deployment. Do not use peer 2 peer to download files. -p, —password= PASSWORD Use PASSWORD for an HTTP authentification with the server. -P, —proxy= PROXY Use PROXY to specify a proxy HTTP server. By default, the agent uses HTTP_PROXY environment variable. -r, —realm= REALM 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. —rpc-ip= IP 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. —rpc-port= PORT 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’. —rpc-trust-localhost Allow local users to access to http://127.0.0.1:62354/now to force an inventory immediately. —scan-homedirs Should the agent scan the user directories to inventory their virtual machines ?. -s, —server= URI 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: If you want to use https or another virtual directory (e.g: /ocsinventory2) you need to enter the full path.

Читайте также:  Cisco network assistant linux

You can declare more than one server if you use the ‘,’ delimiter. In general, OCS Inventory server URL have this format: and FusionInventory for GLPI this one: —server is ignored if —local is in use. —share-dir 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. —stdout Print the inventory on stdout. —scan-homedirs Authorize the agent to scan home directories to help with the Virtual Machines inventory. —tag= TAG 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. —no-ssl-check 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. -u USER , —user= USER Use USER for the server authentication. —version Print the version and exit. -w DURATION , —wait= DURATION Wait during a random period between 0 and DURATION second before initializing the connexion with the server.

Config File

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.

Security

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.

Authors

The maintainer is Goneri LE BOUDER

Please read the AUTHORS , Changes and THANKS files to see who is behind FusionInventory.

See Also

• project Forge:

• The source code of the agent is available on:

• The mailing lists:

• 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 В© 2006-2010 OCS Inventory contributors Copyright В© 2010-2012 FusionInventory Team The memconf script is maintained by Tom Schmidt http://myweb.cableone.net/4schmidts/memconf.html Copyright AX 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:

Источник

Fusioninventory agent linux config

fusioninventory-agent — FusionInventory agent For Linux/UNIX, Windows and MacOSX

fusioninventory-agent [options] [—server server|—local directory|—sdout]

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.

  • Windows (since Windows 2000)
  • GNU/Linux
  • MacOSX
  • Solaris
  • FreeBSD
  • NetBSD
  • OpenBSD
  • AIX
  • HP-UX
  • GNU/kFreeBSD

OCS INVENTORY PROTOCOL

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).

First, The PROLOG

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:

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)

Читайте также:  Как узнать модель bluetooth linux

Server mode (Windows service or Unix daemon)

In server 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:

Target definition options

  • -s, —server=URI

Send results of tasks execution to given server.

If URI doesn’t start with http:// or https://, the agent assume the parameter is a hostname and rewrite it as:

In general, OCS Inventory server URL have this format:

and FusionInventory for GLPI this one:

Multiple values can be specified, using comma as a separator.

  • -l, —local=DIR

Write the results of tasks execution to given directory.

Write the results of tasks execution on stdout.

Target scheduling options

Set an initial delay before the first target, whose value is computed randomly between LIMIT / 2 and LIMIT seconds. This setting is ignored for server targets after the initial contact, in favor of server-specified parameter (PROLOG_FREQ).

Set a delay between each targets, whose value is computed randomly between 0 and LIMIT seconds.

Do not contact the target before next scheduled time.

This option is only available when the agent is not run as a server.

Task selection options

Disable the given task

List available tasks and exit

Inventory task specific options

  • —no-category=CATEGORY

Do not list given category items in inventory. It can be:

Allow the agent to scan home directories for virtual machines.

Save the inventory as HTML.

This is only used for local inventories.

  • -f, —force

Send an inventory to the server, even if this last one doesn’t ask for it.

Mark the machine with given tag.

Timeout for inventory modules execution.

Package deployment task specific options

Do not use peer to peer to download files.

Server target specific options

  • -P, —proxy=PROXY

Use PROXY as HTTP proxy.

By default, the agent uses HTTP_PROXY environment variable.

Use USER for server authentication.

  • -p, —password=PASSWORD

Use PASSWORD for server authentication.

Path to the CA certificates directory.

Path to the CA certificates file.

Do not check server SSL certificates.

Hint: you can set HTTPS_DEBUG environment variable to get SSL error messages in the console.

Web interface options

Disable the embedded web server.

The network interface to use for the embedded web server (all available interfaces).

The network port to use for the embedded web server (62354).

Trust requests from given range without authentication token (false).

For example: «192.168.0.0/24», «192.68.168.0.5» or an IP range like «20.34.101.207 — 201.3.9.99». See Net::IP documentation to get more example.

Logger backend to use. It can be:

Multiple values can be specified, using comma as a separator.

Log message in FILE (implies File logger backend)

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.

Syslog facility to use (default LOG_USER)

Display color on the terminal, when the Stderr backend is used.

This options is ignored on Windows.

Use FILE as configuration file (implies file configuration backend)

Configuration backend to use. It can be:

Execution mode options

  • -d, —daemon

Run the agent as a daemon.

Don’t fork in background.

This is only useful when running as a daemon.

Turn the debug mode on.

Print the agent setup directories and exit.

Print the version and exit.

The agent is able to use multiple configuration backends. The registry backend is the default on Windows platform, and the file backend is the default everywhere else. Another backend can be specified using the —config option.

The file backend reads configuration directives from a configuration file, whose default location is determined at installation time as PREFIX/etc/agent.cfg. An alternative location can also be given with —conf-file option.

The registry backend reads configuration directives from the Windows registry, with an arch-dependant location:

  • HKEY\_LOCAL\_MACHINE\\SOFTWARE\\FusionInventory-Agent for 32 bits machines
  • HKEY\_LOCAL\_MACHINE\\SOFTWARE\\Wow6432Node\\FusionInventory-Agent for 64 bits machines

The none backend doesn’t read any configuration directive at all, allowing to isolate the agent execution from any installed configuration.

Источник

Оцените статью