Architecture - Configuration

FriendlySNMP agent is configured using properties object. This properties object must contain at least three absolutely required entries while the rest entries are optional. All optional configuration parameters are using default values. See description of all required and optional configuration parameters below.

Additional FriendlySNMP flexibility could be achieved using advanced configuration.

Example configuration
The SNMP agent configuration is defined in a properties file. This file must have at least the following three entries:

snmp.address.get-set=127.0.0.1/161
snmp.address.send-notification=127.0.0.1/162
snmp.v2.community=public
Update localhost 127.0.0.1 addresses and ports in the example above to valid values. Use SNMP credentials v2/public at first and modify them later as required when your SNMP agent becomes functional.

There are many other optional configuration parameters discussed below for the SNMP agent fine tuning.

The java.util.Properties object could be generated at runtime programmatically or loaded from a properties file. It is very convenient to have a single properties file and properties object for all application initialization including SNMP agent initialization.

Viewing agent configuration properties
All agent configuration properties including all default values could be viewed in the MIB browser using the table appConfigTable declared in the MIB FRIENDLY-SNMP-MIB.

Note, some of the values in this table are defined as SET nodes and might be overwritten by MIB browser and persist between sessions.

Properties
See also org.friendlysnmp.FConstant for a full list of configuration entries and their default values (if applicable).

The entries below are listed in alphabetical order.

snmp.address.get-set
Address of the application's SNMP agent to respond on SET and GET requests. The port 161 might be already used by Windows SNMP service. This entry is required and it does not have a default value.

snmp.address.send-notification
Address to send notifications. This entry is required and it does not have a default value.

snmp.allow-boots-count-reset
Disallow application boots count reset. The entry is optional. Default value is true. Applications boots count is used in SNMPv3 protocol. The value could be reset from MIB browser if this configuration entry is set to true. See also Boots Counter.

snmp.console-uncaught
Uncaught exceptions are handled by the agent. The default JVM behavior to display uncaught runtime exceptions stack traces in a console could be enabled or disabled. Set this value to true in development environment to see exceptions stack traces in the console and to false in production to keep the console clean. The entry is optional. Default value is true.

snmp.engine-id
Local engine ID. The entry is optional. This value overrides default generated value. Note, this value for SNMPv3 must match target EngineID in MIB browser if it is set not empty.

snmp.ignore-update-ms
FriendlySNMP might receive multiple GET NEXT with subrequests for the same SNMP object in a short period of time. Each of these requests would fire update event. The application might want to coalesce duplicate update events into a single one. If identical update events are received in the following time frame only a single update event will be fired. Allowed values are 0 .. 10,000 ms. The entry is optional. Default value is 1000 ms.

snmp.notify.retry-count
Notification retry count. The entry is optional. Default value is 1 time.

snmp.notify.timeout-ms
Notification timeout. The entry is optional. Default value is 1000 ms.

snmp.oidroot.notify-view
snmp.oidroot.read-view
snmp.oidroot.write-view
Root OID for views. These entries are optional. Default values are "1.3".

snmp.persist.filename
Filename to store serialized default persistence storage. The entry is optional. Default filename is generated from the main application class name. See also Persistency.

snmp.persist.policy
Persistency policy. The entry is optional. Valid values are on_change and on_exit. Default value is on_change. Upper or lower case is ignored. See also Persistency.

snmp.plugin.xxx
The entry specifies optional plugin class. The entry could be repeated multiple times to specify multiple plugins. The suffix value xxx is not parsed but it must be unique within the properties entries. The default core plugin org.friendlysnmp.plugin.core.PluginCore is always present and cannot be replaced.

snmp.storage.community
snmp.storage.notify
snmp.storage.vacm.group
snmp.storage.vacm.access
snmp.storage.vacm.viewtree
Storage type. These values are used in SNMP-COMMUNITY-MIB, SNMP-NOTIFICATION-MIB and SNMP-VIEW-BASED-ACM-MIB tables. The Textual Convention StorageType is declared as: "Describes the memory realization of a conceptual row. A row which is volatile(2) is lost upon reboot. A row which either nonVolatile(3), permanent(4) or readOnly(5), is backed up by stable storage. A row which is permanent(4) can be changed but not deleted. A row which is readOnly(5) cannot be changed nor deleted. If the value of an object with this syntax is either permanent(4) or readOnly(5), it cannot be written. Conversely, if the value is either other(1), volatile(2) or nonVolatile(3), it cannot be modified to be permanent(4) or readOnly(5)." Upper or lower case is ignored. These entries are optional. All defaults are "readOnly".

snmp.thread-pool-size
Thread pool size. The entry is optional. Default value is 4.

snmp.transport
Transport. Valid values are: UDP or TCP. The entry is optional. Default value is UDP.

snmp.transport.domain
Transport domain. Valid values are: IPV4, IPV4Z, IPV6, IPV6Z. The entry is optional. Default value is IPV4

snmp.v1.community
snmp.v2.community
The SNMPv1/SNMPv2 community, e.g. "public". Multiple communities must be separated by spaces, e.g. "public snmp". The entry is optional. This entry specifies agent target(s). At least one target must be define for the agent.

snmp.v3.user
The SNMPv3 user, e.g. "friend". Multiple users must be separated by spaces, e.g. "john craig". The entry is optional. This entry specifies agent target(s). At least one target must be define for the agent. This entry must be accompanied with security declarations (see below).

snmp.v3.protocol.auth
snmp.v3.protocol.priv
snmp.v3.password.key
snmp.v3.password.auth
snmp.v3.password.priv
Security section for SNMPv3. These section is ignored if snmp.v3.user=.. entry is not specified. Valid auth protocols: none, MD5, SHA Valid priv protocols: none, DES, AES128, AES192, AES256 Default protocols are "none" or define empty value for "none". Authentication and privilege passwords (passphrases) should be encoded using the FriendlyPro tool with the specified or default key. The encoding obfuscates the actual key value in the properties file.

Advanced configuration

Fine agent credentials tuning could be achieved with custom target classes derived from org.friendlysnmp.target.TargetBase class or from any org.friendlysnmp.target.TargetV1 or org.friendlysnmp.target.TargetV2 or org.friendlysnmp.target.TargetV3 class. Custom target objects must be registered with the agent.

The default persistence implementation could be optionally replaced with custom class. This might be required for storing persistent values in a database. The custom class must be derived from abstract org.friendlysnmp.persist.PersistStorage and registered with the agent.