Closed bud4 closed 1 year ago
Hi @bud4 ,
Since the release of the SNMP Scan (in version 2.8.1), you must use a newer Unix Agent (> 2.8.1) for it to work correctly. Like as see on your XML content, this is a old SNMP XML format.
To use SNMP Scan, we recommend to install an agent with a version close to the server.
Best regards, Charlene
@charleneauger OCS AGENT is > 2.8.1 Name : ocsinventory-agent Version : 2.9.3 Rilascio : 1.el8 Architecture : x86_64 Size : 28 k Sorgente : ocsinventory-agent-2.9.3-1.el8.src.rpm Repository : epel
Hi @bud4 ,
OK, can you send me the content of the agent module file ? (/etc/ocsinventory/modules.conf)
Regards, Charlene
@charleneauger
cat /etc/ocsinventory/modules.conf modules.conf.txt
use Ocsinventory::Agent::Modules::Download; use Ocsinventory::Agent::Modules::SnmpScan;
1;
Hi @bud4 ,
Do you have other UNIX agents installed ?
Regards, Charlene
@charleneauger
Yes but I don't understand why the snmp scan doesn't start on the other agent, yet I configured it.
Is there an agent parameter to force snmp scan?
Do windows agents allow snmp scanning?
Hi @bud4 ,
Please, disable SNMP scan from agent < 2.8.1 because the old SNMP scan is not compatible with server versions > 2.8. The XML you provided in the issue description matches the old SNMP scan.
The SNMP scan feature requires SSL configuration to work.
Have you configured SNMP from Configuration > SNMP configuration
?
SNMP scan has been removed from Windows agent. Now scans are only performed by UNIX agents.
Best regards, Charlene
@charleneauger Not linux agents less than 2.9 SSL is active. In fact, the deployment is working. SNMP is on .
@charleneauger . This is my /var/lib/ocsinventory-agent var_lib_ocsinventory-agent.tar.zip
This is the log of ocsagent :
<RESPONSE>NO_ACCOUNT_UPDATE</RESPONSE> </REPLY> '; [Mon Apr 3 13:12:17 2023][debug] =END=SERVER RET====== [Mon Apr 3 13:12:17 2023][debug] Calling handlers :
end_handler'
[Mon Apr 3 13:12:17 2023][debug] [download] Calling download_end_handler
[Mon Apr 3 13:12:17 2023][debug] [snmpscan] Calling snmp_end_handler
[Mon Apr 3 13:12:17 2023][info] [download] Beginning work. I am 4115059.
[Mon Apr 3 13:12:17 2023][info] [download] No more package to download.
[Mon Apr 3 13:12:17 2023][debug] [download] End of work...
`
@bud4 , Are these following log lines present (they are at the beginning of the aget log file) ?
[Mon Apr 3 14:07:16 2023][debug] [snmpscan] Calling snmp_start_handler
[Mon Apr 3 14:07:16 2023][debug] - Net::SNMP loaded
yes. lines are present.
@charleneauger
EDIT: Now I have this error
could not parse 172.30.18.0/24 172.30.81.00/24 172.30.81.0/24 172.30.76.0/24 at /usr/local/share/perl5/Ocsinventory/Agent/Modules/SnmpScan.pm line 372.
Is it possible to force the SNMP scan or does the server decide how often to launch it? Log file: ocsinventory.zip
@bud4, if you want to scan multiple networks, you should set the SNMP_NETWORK like this 172.30.18.0/24, 172.30.81.0/24, 172.30.76.0/24
.
If SNMP scanning is enabled on a machine, it runs on every inventory. An Agent must be Ipdiscover elected (or forced manually) to be able to make SNMP scan.
Tanks
@bud4 , can i close this issue ? :)
@charleneauger . Yes ! Tanks a lot.
General informations
Operating system : CentOS Stream 8
Server informations
Perl version : perl 5, version 26, subversion 3 (v5.26.3) built for x86_64-linux-thread-multi Mariadb version : 10.3.28
OCS Inventory informations
Ocs server version : 2.9.2
Problem's description
DBD::mysql::st execute failed: Table 'ocs_db.DEVICE' doesn't exist at /usr/local/share/perl5/Apache/Ocsinventory/Server/Capacities/Snmp/Inventory.pm line 146 Install from OCSNG_UNIX_SERVER-2.9.2.tar.gz
Non snmp inventory data . Agent send data but no data on server Could it depend on the xml sent by the client? Look down ` [Wed Mar 22 12:11:35 2023][debug] sending: <?xml version="1.0" encoding="UTF-8"?>