How do I link the SNMP MIB module search path to Visual Studio Code in Windows?

73 Views Asked by At

I have a Python script that uses SNMP and imports the PySNMP.hlAPI package. This script gives the following error message: "NoSNMP response received before timeout" when run in the Visual Studio Code on Windows.

The script runs well on Linux (Ubuntu 20.04 (Focal Fossa)).

It seems Visual Studio Code possibly needs to know some path to search the SNMP MIBs. How can I point Visual Studio Code to the SNMP MIB modules?

1

There are 1 best solutions below

1
On

I would start using the ovw GUI, select the node and start the MIB browser.

Try to get the system object ID or something basic first. The Windows SNMP agent may consist of subagent for specific MIB parts. For example, for GroupWise a subagent is responding to the SNMP request for the GroupWise MIB part. Sometimes the subagents have problems and the main SNMP agent is working properly.

In the MIB browser you can override the 'default' community string you defined in NNM (OVW window: options -> SNMP).

Check:

  • you have already added the node to the map?
  • SNMP settings on the windows server. There are several tabs: Security tab: check community string, allow SNMP packets from all. TRAPS tab: check community string and trap destination.
  • reboot the server if possible. At least restart SNMP services after making modifications.
  • your firewall rules Please note that you are testing 2 mechanisms: 1. the Windows server sending traps to the NNM server and 2. using SNMP requests to get some info from the Windows SNMP agent.