snmpm_conf (snmp v5.9.1)

The module snmpm_conf contains various utility functions to used for manipulating (write/append/read) the config files of the SNMP manager.

Link to this section Summary

Functions

  • UserId = term()
  • TargetName = string()
  • Comm = string()
  • Domain = transportDomain()
  • Addr = transportAddress()
  • EngineID = string()
  • Timeout = integer()
  • MaxMessageSize = integer()
  • Version = v1 | v2 | v3
  • SecModel = v1 | v2c | usm
  • SecName = string()
  • SecLevel = noAuthNoPriv | authNoPriv | authPriv
  • agents_entry() = term()

Create an entry for the manager agents config file, agents.conf.

  • Dir = string()
  • Conf = [agents_entry()]

Append the agents config to the current manager agents config file.

  • Dir = string()
  • Conf = [manager_entry()]

Append the config to the current manager config file.

  • Dir = string()
  • Conf = [users_entry()]

Append the users config to the current manager users config file.

  • Dir = string()
  • Conf = [usm_entry()]

Append the usm config to the current manager usm config file.

  • Tag = address | port | engine_id | max_message_size
  • Val = term()
  • manager_entry() = term()

Create an entry for the manager config file, manager.conf.

  • Dir = string()
  • Conf = [agents_entry()]

Read the current manager agents config file.

  • Dir = string()
  • Conf = [manager_entry()]

Read the current manager config file.

  • Dir = string()
  • Conf = [users_entry()]

Read the current manager users config file.

  • Dir = string()
  • Conf = [usm_entry()]

Read the current manager usm config file.

  • UserId = term()
  • UserMod = atom()
  • UserData = term()
  • standard_entry() = term()

Create an entry for the manager users config file, users.conf.

  • EngineID = string()
  • UserName = string()
  • SecName = string()
  • AuthP = usmNoAuthProtocol | usmHMACMD5AuthProtocol | usmHMACSHAAuthProtocol
  • AuthKey = [integer()]
  • PrivP = usmNoPrivProtocol | usmDESPrivProtocol | usmAesCfb128Protocol
  • PrivKey = [integer()]
  • usm_entry() = term()

Create an entry for the agent community config file, community.conf.

  • Dir = string()
  • Hdr = string()
  • Conf = [_entry()]

Write the manager agents config to the manager agents config file.

  • Dir = string()
  • Hdr = string()
  • Conf = [manager_entry()]

Write the manager config to the manager config file.

  • Dir = string()
  • Hdr = string()
  • Conf = [users_entry()]

Write the manager users config to the manager users config file.

  • Dir = string()
  • Hdr = string()
  • Conf = [usm_entry()]

Write the manager usm config to the manager usm config file.

Link to this section Functions

Link to this function

agents_entry(UserId, TargetName, Comm, Domain, Addr, EngineID, Timeout, MaxMessageSize, Version, SecModel, SecName, SecLevel) -> agents_entry()

  • UserId = term()
  • TargetName = string()
  • Comm = string()
  • Domain = transportDomain()
  • Addr = transportAddress()
  • EngineID = string()
  • Timeout = integer()
  • MaxMessageSize = integer()
  • Version = v1 | v2 | v3
  • SecModel = v1 | v2c | usm
  • SecName = string()
  • SecLevel = noAuthNoPriv | authNoPriv | authPriv
  • agents_entry() = term()

Create an entry for the manager agents config file, agents.conf.

See Agents for more info.

Link to this function

append_agents_config(Dir, Conf) -> ok

  • Dir = string()
  • Conf = [agents_entry()]

Append the agents config to the current manager agents config file.

Dir is the path to the directory where to store the config file.

See Agents for more info.

Link to this function

append_manager_config(Dir, Conf) -> ok

  • Dir = string()
  • Conf = [manager_entry()]

Append the config to the current manager config file.

Dir is the path to the directory where to store the config file.

See Manager Information for more info.

Link to this function

append_users_config(Dir, Conf) -> ok

  • Dir = string()
  • Conf = [users_entry()]

Append the users config to the current manager users config file.

Dir is the path to the directory where to store the config file.

See Users for more info.

Link to this function

append_usm_config(Dir, Conf) -> ok

  • Dir = string()
  • Conf = [usm_entry()]

Append the usm config to the current manager usm config file.

Dir is the path to the directory where to store the config file.

See Security data for USM for more info.

Link to this function

manager_entry(Tag, Val) -> manager_entry()

  • Tag = address | port | engine_id | max_message_size
  • Val = term()
  • manager_entry() = term()

Create an entry for the manager config file, manager.conf.

The type of Val depends on the value of Tag, see Manager Information for more info.

Link to this function

read_agents_config(Dir) -> Conf

  • Dir = string()
  • Conf = [agents_entry()]

Read the current manager agents config file.

Dir is the path to the directory where to store the config file.

See Agents for more info.

Link to this function

read_manager_config(Dir) -> Conf

  • Dir = string()
  • Conf = [manager_entry()]

Read the current manager config file.

Dir is the path to the directory where to store the config file.

See Manager Information for more info.

Link to this function

read_users_config(Dir) -> Conf

  • Dir = string()
  • Conf = [users_entry()]

Read the current manager users config file.

Dir is the path to the directory where to store the config file.

See Users for more info.

Link to this function

read_usm_config(Dir) -> Conf

  • Dir = string()
  • Conf = [usm_entry()]

Read the current manager usm config file.

Dir is the path to the directory where to store the config file.

See Security data for USM for more info.

Link to this function

users_entry(UserId) -> users_entry()

  • UserId = term()
  • UserMod = atom()
  • UserData = term()
  • standard_entry() = term()

Create an entry for the manager users config file, users.conf.

users_entry(UserId) translates to the following call: users_entry(UserId, snmpm_user_default).

users_entry(UserId, UserMod) translates to the following call: users_entry(UserId, UserMod, undefined).

See Users for more info.

Link to this function

users_entry(UserId, UserMod) -> users_entry()

Link to this function

users_entry(UserId, UserMod, UserData) -> users_entry()

Link to this function

usm_entry(EngineID, UserName, AuthP, AuthKey, PrivP, PrivKey) -> usm_entry()

  • EngineID = string()
  • UserName = string()
  • SecName = string()
  • AuthP = usmNoAuthProtocol | usmHMACMD5AuthProtocol | usmHMACSHAAuthProtocol
  • AuthKey = [integer()]
  • PrivP = usmNoPrivProtocol | usmDESPrivProtocol | usmAesCfb128Protocol
  • PrivKey = [integer()]
  • usm_entry() = term()

Create an entry for the agent community config file, community.conf.

See Security data for USM for more info.

Link to this function

usm_entry(EngineID, UserName, SecName, AuthP, AuthKey, PrivP, PrivKey) -> usm_entry()

Link to this function

write_agents_config(Dir, Conf) -> ok

  • Dir = string()
  • Hdr = string()
  • Conf = [_entry()]

Write the manager agents config to the manager agents config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Agents for more info.

Link to this function

write_agents_config(Dir, Hdr, Conf) -> ok

Link to this function

write_manager_config(Dir, Conf) -> ok

  • Dir = string()
  • Hdr = string()
  • Conf = [manager_entry()]

Write the manager config to the manager config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Manager Information for more info.

Link to this function

write_manager_config(Dir, Hdr, Conf) -> ok

Link to this function

write_users_config(Dir, Conf) -> ok

  • Dir = string()
  • Hdr = string()
  • Conf = [users_entry()]

Write the manager users config to the manager users config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Users for more info.

Link to this function

write_users_config(Dir, Hdr, Conf) -> ok

Link to this function

write_usm_config(Dir, Conf) -> ok

  • Dir = string()
  • Hdr = string()
  • Conf = [usm_entry()]

Write the manager usm config to the manager usm config file.

Dir is the path to the directory where to store the config file.

Hdr is an optional file header (note that this text is written to the file as is).

See Security data for USM for more info.

Link to this function

write_usm_config(Dir, Hdr, Conf) -> ok