User's Guide
Reference Manual
Release Notes
PDF
Top

Simple Network Management Protocol (SNMP)
User's Guide
Version 4.21.1

Expand All
Contract All

Chapters

# 7 Definition of Manager Configuration Files

Configuration data may be included in configuration files that is located in the configuration directory. The name of this directory is given in the config_dir configuration parameter. These files are read at start-up.

The directory where the configuration files are found is given as a parameter to the manager.

The entry format in all files are Erlang terms, separated by a '.' and a newline. In the following sections, the formats of these terms are described. Comments may be specified as ordinary Erlang comments.

If syntax errors are discovered in these files they are reported with the function config_err/2 of the error report module at start-up.

### 7.1 Manager Information

The manager information should be stored in a file called manager.conf.

Each entry is a tuple of size two:

{Variable, Value}.

- Variable is one of the following:

  - address - which defines the IP address of the manager. Default is local host.

  - port - which defines which UDP port the manager uses for communicating with agents. Mandatory.

  - engine_id - The SnmpEngineID as defined in SNMP-FRAMEWORK-MIB. Mandatory.

  - max_message_size - The snmpEngineMaxMessageSize as defined in SNMP-FRAMEWORK-MIB. Mandatory.

- Value is the value for the variable.

The following example shows a manager.conf file:

    {address,          [141,213,11,24]}.
    {port,             5000}.
    {engine_id,        "mgrEngine"}.
    {max_message_size, 484}.

The value of engine_id is a string, which should have a very specific structure. See RFC 2271/2571 for details.

### 7.2 Users

For each manager user, the manager needs some information. This information is either added in the users.conf config file or by calling the register_user function in run-time.

Each row defines a manager user of the manager.

Each entry is a tuple of size four:

{UserId, UserMod, UserData, DefaultAgentConfig}.

- UserId is any term (used to uniquely identify the user).

- UserMod is the user callback module (atom).

- UserData is any term (passed on to the user when calling the UserMod.

- DefaultAgentConfig is a list of default agent config's. These values are used as default values when this user registers agents.

### 7.3 Agents

The information needed to handle agents should be stored in a file called agents.conf. It is also possible to add agents in run-time by calling the register_agent.

Each entry is a tuple:

{UserId, TargetName, Comm, Ip, Port, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel}.

- UserId is the identity of the manager user responsible for this agent (term).

- TargetName is a unique non-empty string.

- Comm is the community string (string).

- Ip is the ip address of the agent (a list of four integers).

- Port is the port number of the agent (integer).

- EngineID is the engine-id of the agent (string).

- Timeout is re-transmission timeout (infinity | integer).

- MaxMessageSize is the max message size for outgoing messages to this agent (integer).

- Version is the version (v1 | v2 | v3).

- SecModel is the security model (any | v1 | v2c | usm).

- SecName is the security name (string).

- SecLevel is security level (noAuthNoPriv | authNoPriv | authPriv).

### 7.4 Security data for USM

The information about Security data for USM should be stored in a file called usm.conf, which must be present if the manager wishes to use SNMPv3 when communicating with agents. It is also possible to add usm data in run-time by calling the register_usm_user.

The corresponding table is usmUserTable in the SNMP-USER-BASED-SM-MIB.

Each entry is a term:

{EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey}.
{EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey}.

The first case is when we have the identity-function (SecName = UserName).

- EngineID is a string.

- UserName is a string.

- SecName is a string.

- AuthP is a usmNoAuthProtocol, usmHMACMD5AuthProtocol or usmHMACSHAAuthProtocol.

- AuthKey is a list (of integer). This is the User's secret localized authentication key. It is not visible in the MIB. The length of this key needs to be 16 if usmHMACMD5AuthProtocol is used and 20 if usmHMACSHAAuthProtocol is used.

- PrivP is a usmNoPrivProtocol, usmDESPrivProtocol or usmAesCfb128Protocol.

- PrivKey is a list (of integer). This is the User's secret localized encryption key. It is not visible in the MIB. The length of this key needs to be 16 if usmDESPrivProtocol or usmAesCfb128Protocol is used.