[Fusioninventory-user] Working with SNMP...

Marco Gaiarin gaio at sv.lnf.it
Tue Oct 28 10:20:38 UTC 2014


Mandi! Guillaume Rousse
  In chel di` si favelave...

> >  Oct 27 17:59:29 kaa fusinv-agent[3804]: [http server] HTTPD service started at http://localhost:62354
> >	(this is wrong, 'netstat' correcly say that is listening to 0.0.0.0:62354 and i can telnet in)
> It is wrong if you're intepreting it as 'listening on localhost
> only', indeed. Feel free to suggest a better alternative.

...boh, i think it depend; if your goal is to provide a valud URL,
probably http://`hostname -f`:62354 is a better alternative.
But if the goal is only to provide feedback that internal HTTPD server
was started, a simpler 'HTTPD service started on port 62354' will
suffices.

> >then i've defined a task to poll a switch in that network. manual poll works:
[...]
> >but still does nothing (eg, task complete OK but no data get imported).
> That's expected, this tool just output its result on stdout. If you
> want to upload this result in GLPI, you have to use another tool.

Sorry, i was late and i was really unclear.
I meant that manual run works, but if i create a task and run it
(manuial start) task run, complete but provide no data. Sorry.


> Just make sure your device is assigned the SNMPv2 credential, not
> the SNMPv1 one.

A-HA! I'm starting to understand how Fi works... i try to summarize.

1) we need to add to GLPI a network device (or a printer), add some
 info like IP addesses (i think needed to have some IP to scan, right?)
and in 'FI SNMP' tab associate it to the right SNMP auth schema.
Probably this task can be done automagically with network discovery.

2) we can check SNMP inventory doing a ''manual'' scan, eg running:
	fusioninventory-netinventory --verbose --credentials version:2c,community:public --host m110-1
 so we can look ad the data the task will get from the device.

3) then we have to create a task (clearly, set to active) in the
 actions we have to specify the module used (SNMP inventory), specify
an actor (a host that have FI agent running as a daemon) and one or
more target.

When the task run (scheduled or manually forced) GLPI contact the
agent/actor and run the actions specified.


> However, your issue here is not SNMPv1 vs SNMPv2, rather than the
> task you've scheduled on GLPI doesn't seem to run. Just try to force
> its execution, from GLPI.

No, i've binded the targets to the correct SNMP auth and now:

 Oct 28 09:58:26 kaa fusinv-agent[63961]: running task NetInventory in process 63961
 Oct 28 09:58:26 kaa fusinv-agent[63961]: FusionInventory NetInventory task 2.2.0
 Oct 28 09:58:26 kaa fusinv-agent[63961]: [http client] Using Compress::Zlib for compression
 Oct 28 09:58:26 kaa fusinv-agent[63961]: Thread 1 created in PAUSE state
 Oct 28 09:58:27 kaa fusinv-agent[63961]: Thread 1 switched to RUN state
 Oct 28 09:58:27 kaa fusinv-agent[63961]: thread 1: scanning 55
 Oct 28 09:58:30 kaa fusinv-agent[63961]: thread 1: scanning 198
 Oct 28 09:58:31 kaa fusinv-agent[63961]: thread 1: scanning 94
 Oct 28 09:58:44 kaa fusinv-agent[63961]: Thread 1 switched to EXIT state

note that i've defined 4 targets, but effectively one of the target have
no IP defined. After that, i've redefined the task, using instead of
one action with 4 target, 4 actions with one target each.

 Oct 28 11:10:54 kaa fusinv-agent[4538]: running task NetInventory in process 4538
 Oct 28 11:10:54 kaa fusinv-agent[4538]: FusionInventory NetInventory task 2.2.0
 Oct 28 11:10:54 kaa fusinv-agent[4538]: [http client] Using Compress::Zlib for compression
 Oct 28 11:10:54 kaa fusinv-agent[4538]: Thread 1 created in PAUSE state
 Oct 28 11:10:55 kaa fusinv-agent[4538]: Thread 1 switched to RUN state
 Oct 28 11:10:55 kaa fusinv-agent[4538]: thread 1: scanning 198
 Oct 28 11:10:56 kaa fusinv-agent[4538]: thread 1: scanning 94
 Oct 28 11:11:10 kaa fusinv-agent[4538]: thread 1: scanning 55
 Oct 28 11:11:13 kaa fusinv-agent[4538]: thread 1: scanning 90
 Oct 28 11:11:15 kaa fusinv-agent[4538]: Thread 1 switched to EXIT state

but nothing changed, no data get imported.

-- 
dott. Marco Gaiarin				        GNUPG Key ID: 240A3D66
  Associazione ``La Nostra Famiglia''                    http://www.sv.lnf.it/
  Polo FVG   -   Via della Bontà, 7 - 33078   -   San Vito al Tagliamento (PN)
  marco.gaiarin(at)lanostrafamiglia.it   t +39-0434-842711   f +39-0434-842797

		Dona il 5 PER MILLE a LA NOSTRA FAMIGLIA!
	   http://www.lanostrafamiglia.it/chi_siamo/5xmille.php
	(cf 00307430132, categoria ONLUS oppure RICERCA SANITARIA)



More information about the Fusioninventory-user mailing list