20042009 Ericsson AB. All Rights Reserved. The contents of this file are subject to the Erlang Public License, Version 1.1, (the "License"); you may not use this file except in compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Definition of Manager Configuration Files snmp_manager_config_files.xml

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.

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.

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.

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).

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.