• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SNMP / Netdiscovery scans
#1
Hi all,

I can't seem to figure out how to get the agent to run either the NetDiscovery or SNMP scans. I have a fresh install of GLPI 0.78.2 and the three fusion inventory beta plugins installed:

FusionInventory 2.3.0 Enabled David DURIEUX & Vincent MAZZONI Deactivate Uninstall
FusionInventory INVENTORY 2.3.0-1 Enabled David DURIEUX & Vincent MAZZONI Deactivate Uninstall
FusionInventory SNMP 2.3.0-1 Enabled David DURIEUX & Vincent MAZZONI Deactivate Uninstall

In the setup area for fusion inventory I have activation off by default, but the host I want to do the scans is in the exception list for both SNMP and netdiscovery.

I have configured the IP range and agents, and created jobs using the agent explicitly in the action area.

I have selected the snmpquery and netdiscovery activation in the agent config.

The agent (2.1.7-2 for RHEL) is pointed at the glpi url and the normal inventory is working as expected. I do not have OCS installed. Every time the agent runs in debug mode I get these messages:

[debug] FusionInventory unified agent for UNIX, Linux, Windows and MacOSX 2.1.7-2
[debug] Log system initialised (2)
[debug] FusionInventory SNMPQuery module 1.2
[debug] No SNMPQuery. Exiting...
[debug] [task] end of SNMPQuery
[debug] cmd is: '"/usr/local/src/fusioninventory-agent_rhel-5.5-x86_64_2.1.7-2/perl/bin/perl" -e "@INC=qw(/usr/local/src/fusioninventory-agent_rhel-5.5-x86_64_2.1.7-2/perl/lib/5.12.1 /usr/local/src/fusioninventory-agent_rhel-5.5-x86_64_2.1.7-2/perl/lib/site_perl/5.12.1 /usr/local/src/fusioninventory-agent_rhel-5.5-x86_64_2.1.7-2/perl/lib/5.12.1/x86_64-linux-thread-multi /usr/local/src/fusioninventory-agent_rhel-5.5-x86_64_2.1.7-2/perl/lib/site_perl/5.12.1/x86_64-linux-thread-multi ); eval 'use FusionInventory::Agent::Task::NetDiscovery;'; FusionInventory::Agent::Task::NetDiscovery::main();" -- "/var/lib/fusioninventory-agent/http:__localhost_glpi_plugins_fusioninventory_front_plugin_fusioninventory.communication.php"'
[debug] FusionInventory unified agent for UNIX, Linux, Windows and MacOSX 2.1.7-2
[debug] Log system initialised (2)
[debug] FusionInventory NetDiscovery module 1.2
[debug] No NETDISCOVERY. Exiting...
[debug] [task] end of NetDiscovery
[debug] cmd is: '"/usr/local/src/fusioninventory-agent_rhel-5.5-x86_64_2.1.7-2/perl/bin/perl" -e "@INC=qw(/usr/local/src/fusioninventory-agent_rhel-5.5-x86_64_2.1.7-2/perl/lib/5.12.1 /usr/local/src/fusioninventory-agent_rhel-5.5-x86_64_2.1.7-2/perl/lib/site_perl/5.12.1 /usr/local/src/fusioninventory-agent_rhel-5.5-x86_64_2.1.7-2/perl/lib/5.12.1/x86_64-linux-thread-multi /usr/local/src/fusioninventory-agent_rhel-5.5-x86_64_2.1.7-2/perl/lib/site_perl/5.12.1/x86_64-linux-thread-multi ); eval 'use FusionInventory::Agent::Task::Ping;'; FusionInventory::Agent::Task::Ping::main();" -- "/var/lib/fusioninventory-agent/http:__localhost_glpi_plugins_fusioninventory_front_plugin_fusioninventory.communication.php"'
[debug] FusionInventory unified agent for UNIX, Linux, Windows and MacOSX 2.1.7-2
[debug] Log system initialised (2)
[debug] [task] end of Ping
[debug] [http://localhost/glpi/plugins/fusioninventory/front/plugin_fusioninventory.communication.php] Next server contact has just been planned for Tue Feb 22 09:49:07 2011

Am I missing a step or is something else going on? Any help would be appreciated.

Thanks!
  Reply
#2
You must use GLPI cron or in action > automatic actions > scheduledtask, clic on "execute" link to run task

for snmpquery, not work on BETA1, I have fixed, you can test with source version : http://prebuilt.fusioninventory.org/fusi...lpi/devel/ (you must reinstall plugins)
Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com
  Reply
#3
ddurieux Wrote:You must use GLPI cron or in action > automatic actions > scheduledtask, clic on "execute" link to run task

for snmpquery, not work on BETA1, I have fixed, you can test with source version : http://prebuilt.fusioninventory.org/fusi...lpi/devel/ (you must reinstall plugins)


Ok, that is a start... at least now it is trying to execute. Now I am getting this in the log file:
[Tue Feb 22 11:21:29 2011][debug] [RPC] 192.168.10.46 request /status
[Tue Feb 22 11:21:29 2011][debug] [RPC] 192.168.10.46 request /now/XUTHAEIX
[Tue Feb 22 11:21:29 2011][debug] token is: XUTHAEIX
[Tue Feb 22 11:21:29 2011][debug] [RPC] 'now' catched
[Tue Feb 22 11:21:29 2011][debug] token is: LRNVIWIB
[Tue Feb 22 11:21:29 2011][debug] Force run now
[Tue Feb 22 11:21:29 2011][debug] [RPC] 192.168.10.46 request /status
[Tue Feb 22 11:21:29 2011][debug] [RPC] 192.168.10.46 request /status
[Tue Feb 22 11:21:29 2011][debug] [RPC] 192.168.10.46 request /now/XUTHAEIX
[Tue Feb 22 11:21:29 2011][debug] token is: XUTHAEIX
[Tue Feb 22 11:21:29 2011][debug] [RPC] 'now' catched
[Tue Feb 22 11:21:29 2011][debug] token is: LRNVIWIB
[Tue Feb 22 11:21:29 2011][debug] Force run now
[Tue Feb 22 11:21:36 2011][debug] Compress::Zlib is available.
[Tue Feb 22 11:21:36 2011][debug] token is: LRNVIWIB
[Tue Feb 22 11:21:36 2011][debug] sending XML
[Tue Feb 22 11:21:36 2011][error] Deflating problem
[Tue Feb 22 11:21:36 2011][error] No anwser from the server


The web server does not report any requests being made to it between the log entry of "sending xml" and "deflating problem" so I have no idea what the error is here...
  Reply
#4
You have a problem on server, have you errors in files in glpi/files/_log/ ?
Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com
  Reply
#5
There are 15 or so of these generated after I execute the task:

2011-02-22 12:13 [@projects.thejockeyclub.net]
Warning(2): SimpleXMLElement::addAttribute() [<a href='function.SimpleXMLElement-addAttribute'>function.SimpleXMLElement-addAttribute</a>]: Attribute name and value are required
Backtrace :
/var/www/glpi/inc/common.function.php:313 userErrorHandlerNormal()
/var/www/glpi/plugins/fusinvsnmp/inc/communicationsnmp.class.php:81 SimpleXMLElement->addAttribute()
/var/www/glpi/plugins/fusinvsnmp/inc/netdiscovery.class.php:318 PluginFusinvsnmpCommunicationSNMP->addAuth()
/var/www/glpi/plugins/fusioninventory/inc/communication.class.php:257 PluginFusinvsnmpNetdiscovery->run()
/var/www/glpi/plugins/fusioninventory/front/communication.php:108 PluginFusioninventoryCommunication->getTaskAgent()
/var/www/glpi/plugins/fusioninventory/front/plugin_fusioninventory.communication.php:39 include_once()
  Reply
#6
Humm, do you use SNMP authentication in FILE instead DATABASE ? (http://127.0.0.1/glpi/plugins/fusioninve...n.form.php in tab FusionINventory SNMP)
Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com
  Reply
#7
SNMP authentication is set to Database, and I have two v2c communities defined.
  Reply
#8
With same community ? or 2 communities different?
Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com
  Reply
#9
Two different communities, both v2c
  Reply
#10
Okay, can you send me complete log to my mail : d.durieux@siprossii.com

With all these informations, I think I will fix this problem
Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com
  Reply
#11
Did you receive the logs I sent last week? I can resend them if you did not.
  Reply
#12
oh sorry, I haven't yet the time to see, can you send me the screenshot of your communities in the communities search list ?
Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com
  Reply
#13
Actually, I think I figured out something... I had deleted the v1 community and it showed marked as deleted in the database. It was not configured with a snmp username / password, and neither were my two new snmp communities. I added a username and password to both of my new ones and manually purged the deleted one from the database:

mysql> select * from glpi_plugin_fusinvsnmp_configsecurities
-> ;
+----+----------------------+-------------+-----------+----------+----------------+-----------------+------------+-----------------+------------+
| id | name | snmpversion | community | username | authentication | auth_passphrase | encryption | priv_passphrase | is_deleted |
+----+----------------------+-------------+-----------+----------+----------------+-----------------+------------+-----------------+------------+
| 1 | Public community v1 | 1 | public | | 0 | | 0 | | 1 |
| 2 | Public community v2c | 2 | public | test | 1 | test | 1 | test | 0 |
| 3 | Jaguar9 v2c | 2 | Jaguar9 | test | 1 | test | 1 | test | 0 |
+----+----------------------+-------------+-----------+----------+----------------+-----------------+------------+-----------------+------------+
3 rows in set (0.01 sec)

mysql> delete from glpi_plugin_fusinvsnmp_configsecurities where is_deleted = '1';

and the netdiscovery ran... It found 71 devices in the scan, but did not import any... now how do i get it to import items that it discovers?
  Reply
#14
I will try with it.

You have deleted in GLPI, but you must purge after (in the trash)

To import you must set a type of device
Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com
  Reply
#15
I have try but don't have same problem, try to use version more update (http://prebuilt.fusioninventory.org/fusi...lpi/devel/) and reinstall plugins (I have made same modifications in MySQL)
Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com
  Reply
#16
I guess I don't know where to purge things in the glpi interface... can you point me to where that is?

To set the device type, do I need to go through the unknown devices list or can it be done automatically?
  Reply
#17
You have a trash in search form in top of list, click on picture "trash" and you see all trash elements

Depends, sometimes agent have identify your device, sometimes no and in this case you must set type in GLPI interface
Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com
  Reply
#18
I just cleaned and reinstalled the plugins that you sent. Now the "update" button on the agent tab is missing where one associates the agent with the computer, and the check boxes are missing on the agent listing....
  Reply
#19
Ok fixed that one too... the entities_id got set to -1 in glpi_plugin_fusioninventory_agents instead of 0.
  Reply
#20
Ok, so here's where I am with this so far:

netdiscovery and snmp scans seem to be running
none of the devices found by netdiscovery have a MAC address associated with them
All of the devices are defaulting to snmp model 713572
none of the devices are being imported as there is no type detected
snmp scans are not updating ports on network switches, even though I've set the correct snmp model and the agent spits out xml enumerating the ports and descriptions
I've found several items have had their entities_id set to -1
A few devices that respond to ping and snmpwalk haven't shown up in the scans at all
several devices are showing up with no ip, no description, no mac and just a number in parenthesis as the name.
The task schedule seems to randomly push the task to any live agent, regardless of whether it is configured to a specific agent, auto manage, or auto manage on the same subnet.

Most of the equipment I am looking at are either servers, desktop machines or various bits of cisco gear.

I'll let you know as I see more/ fix things...
  Reply
#21
I've just installed the latest beta (completely removed and reconfigured the fusioninventory plugins) and I am still getting this error on my snmp plugins:

Warning(2): SimpleXMLElement::addAttribute() [<a href='function.SimpleXMLElement-addAttribute'>function.SimpleXMLElement-addAttribute</a>]: Attribute name and value are required
Backtrace :
/var/www/glpi/inc/common.function.php:313 userErrorHandlerNormal()
/var/www/glpi/plugins/fusinvsnmp/inc/communicationsnmp.class.php:81 SimpleXMLElement->addAttribute()
/var/www/glpi/plugins/fusinvsnmp/inc/netdiscovery.class.php:318 PluginFusinvsnmpCommunicationSNMP->addAuth()
/var/www/glpi/plugins/fusioninventory/inc/communication.class.php:255 PluginFusinvsnmpNetdiscovery->run()
/var/www/glpi/plugins/fusioninventory/front/communication.php:103 PluginFusioninventoryCommunication->getTaskAgent()
/var/www/glpi/plugins/fusioninventory/front/plugin_fusioninventory.communication.php:39 include_once()

It starts working when I populate all of the fields for snmp with random text/entries (user string, encryption, etc) even though its only v1 or v2c communities.
  Reply
#22
Can you send me your snmp authentications because I have problem to have this error.
Table : glpi_plugin_fusinvsnmp_configsecurities
Co-leader, official developper
DCS official PARTNER: dcs.glpi@dcsit-group.com
  Reply
#23
It seems the snmp community problem has gone away somewhere in upgrading versions, I'm now not having that problem.

I do seem to having an issue where netdiscovery is refusing to run however, and I can't find anything in the logs that tells me why:
[Mon Apr 4 11:50:15 2011][debug] $VAR1 = '<?xml version="1.0" encoding="UTF-8"?>
<REPLY>
</REPLY>
';
[Mon Apr 4 11:50:15 2011][debug] =END=SERVER RET======
[Mon Apr 4 11:50:15 2011][debug] [task] end of SNMPQuery
[Mon Apr 4 11:50:15 2011][debug] cmd is: '"/home/jmo/fusioninventory-agent_rhel-5.5-x86_64_2.1.8_rc1-1/perl/bin/perl" -e "@INC=qw(/home/jmo/fusioninventory-agent_rhel-5.5-x86_64_2.1.8_rc1-1/perl/lib/5.12.1 /home/jmo/fusioninventory-agent_rhel-5.5-x86_64_2.1.8_rc1-1/perl/lib/site_perl/5.12.1 /home/jmo/fusioninventory-agent_rhel-5.5-x86_64_2.1.8_rc1-1/perl/lib/5.12.1/x86_64-linux-thread-multi /home/jmo/fusioninventory-agent_rhel-5.5-x86_64_2.1.8_rc1-1/perl/lib/site_perl/5.12.1/x86_64-linux-thread-multi ); eval 'use FusionInventory::Agent::Task::NetDiscovery;'; FusionInventory::Agent::Task::NetDiscovery::main();" -- "/var/lib/fusioninventory-agent/https:__glpi_plugins_fusioninventory_front_plugin_fusioninventory.communication.php"'
[Mon Apr 4 11:50:16 2011][debug] FusionInventory unified agent for UNIX, Linux, Windows and MacOSX 2.1.8_rc1-1
[Mon Apr 4 11:50:16 2011][debug] Log system initialised (2)
[Mon Apr 4 11:50:16 2011][debug] FusionInventory NetDiscovery module 1.2
[Mon Apr 4 11:50:16 2011][debug] No NETDISCOVERY. Exiting...
[Mon Apr 4 11:50:16 2011][debug] [task] end of NetDiscovery
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)