What is Go SNMP API?
Go SNMP API is a set of libraries developed in Go language for writing the network management applications to monitor network devices such as switches, routers, modems, etc.
What can I do with this product?
This package can be used to develop SNMP management applications to manage SNMPv1, SNMPv2c, and SNMPv3 agents and talk to agent systems using any of the three versions at the same time.

What are the platforms supported?
  • Windows XP or later - amd64, 386
  • Linux 2.6.23 or later with glibc - amd64, 386, arm
How do I start using this package?

WebNMS SNMP API Go Edition distribution consists of the following,

SNMP API - a set of source codes developed using Golang to build SNMP management applications.

The product distribution also includes various example applications and executables (obtained when executing the build script, setEnv.sh or setEnv.bat that is present in the conf folder). It provides a hierarchy of golang packages for SNMP low-level, high-level, variables, etc, which helps in developing various non-UI applications.

Where can I find the example files? How do I run those example application?
The product distribution includes various example applications in the following directories.


Example applications included are asyncget, get, getnext, getbulk, inform, informd, set, trapd, trapv1, trapv2 & walk.

You can use them to query information from the SNMP agents on your network. All the applications that are used to query an agent have identical syntax. In general, all the command line tools gives help information when you type the following.

go run filename.go

For example, to get help information on the command snmpgetnext, type:

go run snmpgetnext.go

All the example applications can be executed by setting the proper Go environment variables (setenv.sh or setenv.bat) available in the conf directory.

What versions of SNMP are supported by Go SNMP API?
Go SNMP API supports the below three stable SNMP versions,
  • SNMPv1,
  • SNMPv2C and
  • SNMPv3
How do I make use of the database support in my application?

Go SNMP API makes use of the Go lang's database/sql package (A package that provides a generic interface around SQL (or SQL-like) databases.) for database feature.

The above package has to be used in conjunction with a database driver, (i.e) you should download a database driver from the list of available drivers and import the same in your application. This is a prerequisite to use the Go SNMP API's database feature.

For the list of database drivers, see https://github.com/golang/go/wiki/SQLDrivers

After installing the driver, go through Database Support topic for further clarifications.

Go SNMP API libraries obtained after compiling the sources works only for the version of Go lang from which it is compiled. Why is it not compatible with any other Go lang versions?

Golang guarantees compatibilty only at the source level. It does not guarentees compatibility for compiled packages between releases. So after every release (including minor release), Go sources has to be re-compiled to make it compatibile with the new release fo Go lang. See the link for more information regarding this.

I do not see support for loading/unloading MIBs, so How should I manipulate the OIDs in my application?

As of now support for loading / unloading MIBs is not provided with this version. Manipulating OIDs should be done manually by hard-coding the OIDs to the application. However we are working on the MIBs support for our next release and it is very well in our future roadmap.

How should I report bug in the product?

It is to be noted that the sources of the product are distributed under strict license. Users should report the bug to the support team - snmp-support@webnms.com.

How will I get the fix for the reported bug?

If the reported issue is known to be a bug, it will be fixed by the snmp support team, and will be released in the next immediate minor release (whole sources in cumulative fashion as a zip). Based on the severity of the bug, issue will be fixed and minor release will happen. Customer specific patches will not be provided. So, if the fix is available in a latest release, the customer has to migrate to the latest version.

For example, the initial version of the product is 1.0 and as the new issues are reported and fixed, new minor releases will happen as 1.1, 1.2, 1.3 etc. Each minor releases may contain fix for a single issue or set of issues.
So, if the customer who is in version 1.1 and needs a fix that is present in the latest release say 1.6, he has to move to 1.6 because no customer specific patches will be provided over version 1.1. Or else if it is a new issue, it will be fixed and released as new minor release as version 1.7.