Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Can't get SNMP checks working

Good Morning from Karlsruhe/Germany wink,

i'm doing my very best for days to get SNMP-Scan feature working properly, but I'm now at a point where I really can't go ahead.

I'm running Unix-Agent 2.10.0 on Debian (installed from packages). Inventory and IP-discovery works great. The SNMP checks are activated and the module is loaded properly. Ocsinventory is also telling me to do SNMP-scans, but actually it does nothingsad

[Mon Oct 30 09:56:41 2023][debug] [snmpscan] Calling snmp_start_handler
[Mon Oct 30 09:56:41 2023][debug]  - Net::SNMP loaded

[Mon Oct 30 09:56:41 2023][debug] [snmpscan] Calling snmp_prolog_reader

[Mon Oct 30 09:57:58 2023][debug] [snmpscan] Calling snmp_end_handler
[Mon Oct 30 09:57:58 2023][debug] [snmpscan] Snmp: Scanning network
[Mon Oct 30 09:57:58 2023][debug] [snmpscan] Snmp: Ending Scanning network
[Mon Oct 30 09:57:58 2023][debug] [snmpscan] Scanning 10.0.10.63 device
[Mon Oct 30 09:57:58 2023][debug] [snmpscan] Scanning 10.0.10.73 device
[Mon Oct 30 09:57:58 2023][debug] [snmpscan] Scanning 10.0.10.11 device
[Mon Oct 30 09:57:58 2023][debug] [snmpscan] Scanning 10.0.10.12 device
[Mon Oct 30 09:57:58 2023][info] [snmpscan] No more SNMP device to scan
[Mon Oct 30 09:57:58 2023][debug] [snmpscan] End snmp_end_handler :)

10.0.10.11 and 10.0.10.12 are definitely SNMP-devices which can be queried from the machine using snmpwalk.

I verified by using tcpdump on the machine that are are no snmp-calls done to the Hosts at all.


my setup:

I installed and configured everything as described in Using SNMP scan feature and Managing SNMP on Web Console however I noticed that documentation seems to be at least partially outdated. e.g. i found in newer threads saying snmp_com.txt is not used anymore and the documentation does not mention SNMP Type conditions at all. 

modules.conf:
# this list of module will be load by the at run time
# to check its syntax do:
# #perl modules.conf
# You must have NO error. Else the content will be ignored
# This mechanism goal is to launch agent extension modules
#use Ocsinventory::Agent::Modules::Download;
use Ocsinventory::Agent::Modules::SnmpScan;
# DO NOT REMOVE THE 1;
1;

ocsinventory-agent.cfg
basevardir=/var/lib/ocsinventory-agent
ssl=1
ca=/etc/ssl/certs/ca-certificates.crt
realm="OCS Inventory agent area"
server=https://ocs.<hidden>.net/ocsinventory
debug=1
user=YWdlbnQ=
password=<hidden>
logfile=/var/log/ocs_agent.log

localsnmp_communities_conf.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<COMMUNITIES>
<COMMUNITY VERSION="2c" NAME="public" USERNAME="" AUTHPASSWD="" LEVEL="" AUTHPROTO="" PRIVPASSWD="" PRIVPROTO="" TYPE="COMMUNITY" />
</COMMUNITIES>

localsnmp_scans_conf.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<CONFS>
<CONF NAME="SCAN_ARP_BANDWIDTH" IVALUE="256" TVALUE="" TYPE="CONF" />
<CONF NAME="SCAN_TYPE_IPDISCOVER" IVALUE="0" TVALUE="ICMP" TYPE="CONF" />
<CONF NAME="SCAN_TYPE_SNMP" IVALUE="0" TVALUE="ICMP" TYPE="CONF" />
</CONFS>

localsnmp_types_conf.xml:
<?xml version="1.0" encoding="UTF-8" ?>
<TYPES>
<TYPE TYPE_NAME="TestSwitch" CONDITION_OID="3.6.1.2.1.47.1.1.1.1.13.1" CONDITION_VALUE="JL720A" TABLE_TYPE_NAME="snmp_testswitch" LABEL_NAME="HP_Serial" OID="3.6.1.2.1.47.1.1.1.1.11.1" RECONCILIATION="Yes" TYPE="TYPE" />
<TYPE TYPE_NAME="TestSwitch" CONDITION_OID="3.6.1.2.1.47.1.1.1.1.13.1" CONDITION_VALUE="JL720A" TABLE_TYPE_NAME="snmp_testswitch" LABEL_NAME="HP_OS_VERSION" OID="3.6.1.2.1.47.1.1.1.1.10.1" RECONCILIATION="" TYPE="TYPE" />
</TYPES>

Further useful information:

Please let me know if you require any further information
I really appreciate any support!! heart

Sebastian

 

in OCS Inventory NG agent for Unix by (120 points)

1 Answer

0 votes
Even I have the same issue. SNMP auto discovery is not happening. Is there a way to add the snmp devices manually? Or any other workaround. TIA.
by (220 points)
 
Powered by Question2Answer
...