1FUSIONINVENTORY-AGENT(1U)ser Contributed Perl DocumentatiFoUnSIONINVENTORY-AGENT(1)
2
3
4
6 fusioninventory-agent - FusionInventory agent For Linux/UNIX, Windows
7 and MacOSX
8
10 fusioninventory-agent [ ... ] [ --server server | --local /tmp ]...
11
13 % fusioninventory-agent --server localhost
14 # send an inventory to the OCS server
15
16 % fusioninventory-agent --server http://localhost/ocsinventory2
17 # send an inventory over http to a server with a non standard
18 # virtual directory
19
20 % fusioninventory-agent --server https://localhost/ocsinventory
21 # send an inventory over https to the OCS server
22
23 % fusioninventory-agent --local /tmp
24 # write an inventory in the /tmp directory
25
26 % fusioninventory-agent --local /tmp --html
27 # Use the --html parameter to generate a HTML file
28
29 % fusioninventory-agent --server localhost --user=toto --password=pw --realm="Restricted Area"
30 # send a report to a server protected by a basic authentication
31 % fusioninventory-agent --lazy
32 # send an inventory only if a random delay between 0 and PROLOG_FREQ had been run over.
33
34 % fusioninventory-agent --delaytime 60 -d
35 # 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]
36
38 fusioninventory-agent is an agent for OCS Inventory server and
39 FusionInventory for GLPI servers. It creates local inventory of the
40 machines (hardware and software) and send it to the server. It can also
41 write it in a local XML file. This agent is the successor of the
42 former linux_agent which was released with OCS 1.01 and prior. It also
43 replaces the Solaris/AIX/BSD unofficial agents.
44
45 Supported systems:
46
47 Windows (since Windows 2000)
48 GNU/Linux
49 MacOSX
50 Solaris
51 FreeBSD
52 NetBSD
53 OpenBSD
54 AIX
55 HP-UX
56 GNU/kFreeBSD
57
59 PREREQUISITES
60 Minimum perl version: 5.8
61
62 Additional mandatory perl modules:
63
64 Digest::MD5
65 XML::Simple
66 LWP
67 Net::IP
68 UNIVERSAL::require
69 Mac::SysProfile (MacOs only)
70
71 Additional optional perl modules:
72
73 Compress::Zlib, for message compression
74 HTTP::Daemon, for web interface
75 Net::CUPS (v0.60 minimum), for printers detection
76 File::ShareDir, for automatic data directory determination
77 Proc::Daemon, for daemon mode (Unix only)
78 Proc::PID::File, for daemon mode (Unix only)
79
80 Additional optional programs:
81
82 nmap or ipdiscover, for network discovery
83 dmidecode (linux or bsd) for hardware inventory
84 lspci (linux or bsd) for hardware inventory
85
86 PROCEDURE
87 Once the archive is unpacked, use these commands:
88
89 perl Makefile.PL
90 make
91 make install
92
93 You can also run the agent from the tarball directory. In this case,
94 use the --devlib flag to load the library from the local directory.
95
96 SYSTEM-SPECIFIC INFORMATIONS
97 Solaris
98
99 Sun Studio seems to be needed to build the dependency. The generated
100 Makefile needs gmake to be executed. The default installation will
101 install the binary in /usr/perl5/5.XXXXX/bin, set you $PATH variable
102 according to that.
103
104 On Solaris/SPARC, you must install sneep and record the Serial Number
105 with it. Download it from
106 <http://www.sun.com/download/products.xml?id=4304155a>
107
108 Windows
109
110 If you don't want to use the installer for Windows you can follow the
111 installation process avalaible there:
112 http://forge.fusioninventory.org/projects/fusioninventory-agent/wiki/RunAgentWin32
113 <http://forge.fusioninventory.org/projects/fusioninventory-
114 agent/wiki/RunAgentWin32>
115
116 POST-INSTALLATION
117 Run ./fusioninventory-agent-config for automatic configuration.
118
120 FusionInventory Agent uses OCS Inventory protocol and is compatible
121 with OCS Inventory server. The agent uses the same protocol with the
122 FusionInventory For GLPI plugin.
123
124 The OCS protocol is basicly an exchange of XML file done over HTTP(S).
125
126 First, The PROLOG
127 The agent send a first message to give it's ID (DEVICEID). The server
128 send back to the agent an XML file with a list of parameter. It's the
129 PROLOG RESP. You can see it if you're in Debug mode. In this PROLOG,
130 the server send the PROLOG_FREQ. The agent will use it to know when it
131 need to contact the server for the next time.
132
133 The agent compute the next query date this way:
134
135 PROLOG_FREQ/2+RANDOM(PROLOG_FREQ/2)
136
137 Module execution
138 The agent will launch each modules and pass the list of options found
139 in the PROLOG RESP as parameter. The module can send information
140 directly to the server (inventory, SNMP scan result, etc)
141
142 Windows service or Deamon mode
143 In deamon mode, the agent wait during a period between the last PROLOG
144 and PROLOG_FREQ. If PROLOG_FREQ is not set, it will use --delaytime
145 value. The default value is 3600.
146
148 Most of the options are available in a short form and a long form. For
149 example, the two lines below are all equivalent:
150
151 % fusioninventory-agent -s localhost
152 % fusioninventory-agent --server localhost
153
154 --backend-collect-timeout=SECONDS_BEFORE_KILL
155 Time before the agent kills modules processing which don't end
156 before the timeout.
157
158 --basevardir=DIR
159 Indicate the place where the agent should store its files.
160
161 --color
162 Display color on the terminal. This feature is disabled on Windows.
163
164 -d, --daemon
165 Launch fusioninventory-agent as daemon in background. Proc::Daemon
166 is needed.
167
168 -D, --daemon-no-fork
169 Launch fusioninventory-agent in daemon but do fork in background.
170
171 --ca-cert-dir=PATH
172 The directory where public SSL certificates are stored. In general
173 it's /etc/ssl/certs.
174
175 You don't need to copy a public certificate on very agent if your
176 private key is valide and was been signed by a valide certificate
177 authority.
178
179 --ca-cert-file=FILE
180 The path to the public certificate (e.g:
181 /etc/ssl/certs/cacert.pem). If --ca-cert-file is used,
182 --ca-cert-dir is ignored.
183
184 You don't need to copy a public certificate on very agent if your
185 private key is valide and was been signed by a valide certificate
186 authority.
187
188 --conf-file=FILE
189 Load the configuration file from the given location. Ignored on
190 Windows.
191
192 On Windows the settings are loaded from the registry. The
193 information are stored there:
194 HKEY_LOCAL_MACHINE\SOFTWARE\FusionInventory-Agent
195
196 Or on Windows 64bit machine:
197 HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\FusionInventory-Agent
198
199 --debug
200 Turn the debug mode on.
201
202 --devlib
203 This option is designed for the developer. With it enabled,
204 fusioninventory-agent won't try to load the Backend module
205 installed on the system. Instead it will scan the ./lib directory.
206 It may also be useful if you don't want to install the agent on
207 your system.
208
209 This option can only be used as command line argument. It will be
210 ignored if you set it in a config file or in Windows registry.
211
212 --delaytime=SECONDS_TO_WAIT
213 This option defaults to waiting a random() time between 0 and 3600
214 before initially contacting the server assuming NO PROLOG_FREQ has
215 been set. Once PROLOG_FREQ has been set, it uses that number at
216 the top end of it's random setting. Useful for pre-setting a
217 deployed agent's initial start time (so you don't jam the server
218 all at once, but don't have to wait an hour to make sure the
219 deployment worked).
220
221 --disable-perllib-envvar
222 Do not use PERL5LIB and PERLLIB environment variable to find Perl
223 library path.
224
225 This option can only be used as command line argument. It will be
226 ignored if you set it in a config file or in Windows registry.
227
228 -f, --force
229 The agent ask first the server if it should send an inventoroy of
230 the machine. If the server doesn't know the machine or has outdated
231 informations, it will request it. With this option, the agent
232 ignore the server anwser and send an inventory.
233
234 --html
235 Save the local inventory requested by --local in HTML.
236
237 -i, --info
238 Turn the verbose mode on. The flag is ignored if --debug is enable.
239
240 --lazy
241 Do not contact the server more than one time during the PROLOG_FREQ
242 and do an exit if there is nothing to do. Useful if you want to
243 start the agent script regulary from the crontab but don't want to
244 overload the server.
245
246 -l, --local=DIR
247 Write an inventory in the DIR directory. A new file will be created
248 if needed.
249
250 --logfile=FILE
251 Log message in FILE and turn off STDERR
252
253 --logfile-maxsize=FILE
254 Max logfile size in MB, default is unlimited. When the max size is
255 reached, the file is truncated. This is only useful if there is no
256 log rotation mechanism on the system.
257
258 --logger=LOGGER:
259 The logger you want to use. It can be:
260
261 · Stderr: print the messages directly in the console. Messages
262 are lost in daemon mode (--daemon). You can use --color to turn
263 color mode on.
264
265 · File: log the error in a log file. Please use --logfile to set
266 the location of your log file. --logfile turns this option on
267 automatically
268
269 · Syslog: use the local syslog server to log the messages.
270
271 You can use more than one parameter if you use ',' as delimiter.
272 E.g:
273
274 % fusioinventory-agent --logger=Syslog,Stderr --local=/tmp
275
276 --no-deploy
277 Disable the software deployment (new module).
278
279 --no-esx
280 Disable the ESX inventory task.
281
282 --no-ocsdeploy
283 Disable the software deployment (OCS compatible module).
284
285 --no-inventory
286 Do not generate inventory.
287
288 --no-wakeonlan
289 Do not use the wakeonlan.
290
291 --no-printer
292 Do not inventory the printer.
293
294 --no-software
295 Do not inventory the software installed on the machine.
296
297 --no-p2p
298 For OCS Inventory software deployment. Do not use peer 2 peer to
299 download files.
300
301 -p, --password=PASSWORD
302 Use PASSWORD for an HTTP authentification with the server.
303
304 -P, --proxy=PROXY
305 Use PROXY to specify a proxy HTTP server. By default, the agent
306 uses HTTP_PROXY environment variable.
307
308 -r, --realm=REALM
309 Use REALM for an HTTP authentification with the server. For
310 example, the value can be 'Restricted Area'. You can find it in the
311 login popup of your Internet browser.
312
313 if no realm is passed and the auth fails, the agent will retry an
314 authentification with the realm returned by the server.
315
316 --rpc-ip=IP
317 The IP address of the interface to use for the P2P exchange. The
318 default is 'all' the IP addresses with a 255.255.255.0 mask except
319 127.0.0.1.
320
321 --rpc-port=PORT
322 The PORT of the interface to use for the embedded HTTP server used
323 for the peer to peer data exchange and remote control. The default
324 is '62354'.
325
326 --rpc-trust-localhost
327 Allow local users to access to http://127.0.0.1:62354/now to force
328 an inventory immediately.
329
330 --scan-homedirs
331 Should the agent scan the user directories to inventory their
332 virtual machines ?.
333
334 -s, --server=URI
335 The uri of the server. If URI doesn't start with http:// or
336 https://, the agent assume the parameter is a hostname and rewrite
337 it like that:
338
339 % --server=http://servername/ocsinventory
340
341 If you want to use https or another virtual directory (e.g:
342 /ocsinventory2) you need to enter the full path.
343
344 You can declare more than one server if you use the ',' delimiter.
345
346 % --server=http://servername/ocsinventory,server2
347
348 In general, OCS Inventory server URL have this format:
349
350 http://servername/ocsinventory
351
352 and FusionInventory for GLPI this one:
353
354 http://servername/glpi/plugins/fusioninventory/front/plugin_fusioninventory.communication.php
355
356 --server is ignored if --local is in use.
357
358 --share-dir
359 The directory where are stored the shared files. You probably don't
360 need this option unless you don't want to use the Makefile.PL
361 installation procedure or if File::ShareDir is not avalaible.
362
363 --stdout
364 Print the inventory on stdout.
365
366 % fusioninventory-agent --stdout > /tmp/report.xml
367 # prepare an inventory and write it in the /tmp/report.xml file.
368 # A file will be created.
369
370 --scan-homedirs
371 Authorize the agent to scan home directories to help with the
372 Virtual Machines inventory.
373
374 --tag=TAG
375 Mark the machine with the TAG tag. Once the initial inventory is
376 accepted by the server this value is ignored and you've to change
377 the information directly on the server. The server do so in order
378 to centralize the administration of the machine.
379
380 --no-ssl-check
381 Do now validate HTTPS certificat with the servers. Please never use
382 this option in production. This is just a very bad idea.
383
384 Hint: you can declare HTTPS_DEBUG to get SSL error messages in the
385 console.
386
387 -u USER, --user=USER
388 Use USER for the server authentication.
389
390 --version
391 Print the version and exit.
392
393 -w DURATION, --wait=DURATION
394 Wait during a random period between 0 and DURATION second before
395 initializing the connexion with the server.
396
397 % fusioninventory-agent --wait 5 --server localhost
398
400 The agent try to initialize the settings from the agent.cfg config
401 file.
402
403 It looks for the file in these location:
404
405 · /etc/fusioninventory/agent.cfg
406
407 · /usr/local/etc/fusioninventory/agent.cfg
408
409 You can use the --conf-file=XXX parameter to load you own configuration
410 file from a specific location. On Windows the settings are loaded from
411 the Registry. The configuration file is ignored.
412
413 The command line parameters overwrite the configuration file.
414
416 Some modules like SNMPQuery needs to sent credential from the agent to
417 the agent. We recommend to enable HTTPS support on the OCS or
418 FusionInventory For GLPI server. We also recommend to use only trusted
419 machine as agent in this case.
420
422 The FusionInventory project
423 fusioninventory-devel@lists.alioth.debian.org
424
425 The maintainer is Goneri LE BOUDER <goneri@rulezlan.org>
426
427 Please read the AUTHORS, Changes and THANKS files to see who is behind
428 FusionInventory.
429
431 · FusionInventory website: <http://www.FusionInventory.org/>
432
433 · project Forge: <http://Forge.FusionInventory.org>
434
435 · The source code of the agent is available on:
436
437 · Gitorious: <http://gitorious.org/fusioninventory>
438
439 · Github: http://github.com/fusinv/fusioninventory-agent
440 <http://github.com/fusinv/fusioninventory-agent>
441
442 · The mailing lists:
443
444 · http://lists.alioth.debian.org/mailman/listinfo/fusioninventory-devel
445 <http://lists.alioth.debian.org/mailman/listinfo/fusioninventory-
446 devel>
447
448 · http://lists.alioth.debian.org/mailman/listinfo/fusioninventory-user
449 <http://lists.alioth.debian.org/mailman/listinfo/fusioninventory-
450 user>
451
452 · IRC: #FusionInventory on FreeNode IRC Network
453
455 Please, use the mailing lists as much as possible. You can also use the
456 bugtracker on http://forge.fusionInventory.org
457
459 Copyright (C) 2006-2010 OCS Inventory contributors Copyright (C)
460 2010-2011 FusionInventory Team
461
462 This program is free software; you can redistribute it and/or modify
463 it under the terms of the GNU General Public License as published by
464 the Free Software Foundation; either version 2 of the License, or
465 (at your option) any later version.
466
467 This program is distributed in the hope that it will be useful,
468 but WITHOUT ANY WARRANTY; without even the implied warranty of
469 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
470 GNU General Public License for more details.
471
472 You should have received a copy of the GNU General Public License
473 along with this program; if not, write to the Free Software
474 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
475
476 The memconf script is maintained by Tom Schmidt
477 http://myweb.cableone.net/4schmidts/memconf.html Copyright AX 1996-2009
478 Tom Schmidt
479
480 memconf is free software; you can redistribute it and/or modify it
481 under the terms of the GNU General Public License as published by the
482 Free Software Foundation; either version 2 of the License, or (at your
483 option) any later version.
484
485 FusionInventory::Agent::Backend::Virtualization::Vmsystem uses code
486 from imvirt:
487
488 Authors:
489 Thomas Liske <liske@ibh.de>
490
491 Copyright Holder:
492 2008 (C) IBH IT-Service GmbH [http://www.ibh.de/]
493
494 License:
495 This program is free software; you can redistribute it and/or modify
496 it under the terms of the GNU General Public License as published by
497 the Free Software Foundation; either version 2 of the License, or
498 (at your option) any later version.
499
500 This program is distributed in the hope that it will be useful,
501 but WITHOUT ANY WARRANTY; without even the implied warranty of
502 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
503 GNU General Public License for more details.
504
505 You should have received a copy of the GNU General Public License
506 along with this package; if not, write to the Free Software
507 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
508 USA
509
510
511
512perl v5.12.3 2011-06-14 FUSIONINVENTORY-AGENT(1)