User's Guide
Reference Manual
Release Notes
PDF
Top

Simple Network Management Protocol (SNMP)
Reference Manual
Version 4.22

Expand All
Contract All

Table of Contents

- snmp
  - Top of manual page
  - config/0
  - start/0
  - start/1
  - start_agent/0
  - start_agent/1
  - start_manager/0
  - start_manager/1
  - date_and_time/0
  - date_and_time_to_universal_time_dst/1
  - date_and_time_to_string/1
  - date_and_time_to_string/2
  - date_and_time_to_string2/1
  - local_time_to_date_and_time_dst/1
  - universal_time_to_date_and_time/1
  - validate_date_and_time/1
  - validate_date_and_time/2
  - passwd2localized_key/3
  - octet_string_to_bits/1
  - bits_to_octet_string/1
  - read_mib/1
  - log_to_txt/5
  - log_to_txt/6
  - log_to_txt/7
  - log_to_io/4
  - log_to_io/5
  - log_to_io/6
  - change_log_size/2
  - print_version_info/0
  - print_version_info/1
  - versions1/0
  - versions2/0
  - print_versions/1
  - print_versions/2
  - enable_trace/0
  - disable_trace/0
  - set_trace/1
  - reset_trace/1
  - set_trace/2
- snmp (App)
- snmpa
  - Top of manual page
  - add_agent_caps/2
  - del_agent_caps/1
  - get_agent_caps/0
  - get/2
  - get/3
  - get_next/2
  - get_next/3
  - backup/1
  - backup/2
  - info/0
  - info/1
  - old_info_format/1
  - load_mibs/1
  - load_mibs/2
  - unload_mibs/1
  - unload_mibs/2
  - which_mibs/0
  - which_mibs/1
  - whereis_mib/1
  - whereis_mib/2
  - current_request_id/0
  - current_context/0
  - current_community/0
  - current_address/0
  - enum_to_int/2
  - enum_to_int/3
  - int_to_enum/2
  - int_to_enum/3
  - name_to_oid/1
  - name_to_oid/2
  - oid_to_name/1
  - oid_to_name/2
  - which_aliasnames/0
  - which_tables/0
  - which_variables/0
  - which_notifications/0
  - log_to_txt/1
  - log_to_txt/2
  - log_to_txt/3
  - log_to_txt/4
  - log_to_txt/5
  - log_to_txt/6
  - log_to_txt/7
  - log_to_io/1
  - log_to_io/2
  - log_to_io/3
  - log_to_io/4
  - log_to_io/5
  - log_to_io/6
  - change_log_size/1
  - set_log_type/1
  - set_log_type/2
  - mib_of/1
  - mib_of/2
  - me_of/1
  - me_of/2
  - invalidate_mibs_cache/0
  - invalidate_mibs_cache/1
  - enable_mibs_cache/0
  - enable_mibs_cache/1
  - disable_mibs_cache/0
  - disable_mibs_cache/1
  - which_mibs_cache_size/0
  - which_mibs_cache_size/1
  - gc_mibs_cache/0
  - gc_mibs_cache/1
  - gc_mibs_cache/1
  - gc_mibs_cache/2
  - gc_mibs_cache/2
  - gc_mibs_cache/3
  - enable_mibs_cache_autogc/0
  - enable_mibs_cache_autogc/1
  - disable_mibs_cache_autogc/0
  - disable_mibs_cache_autogc/1
  - update_mibs_cache_age/1
  - update_mibs_cache_age/2
  - update_mibs_cache_gclimit/1
  - update_mibs_cache_gclimit/2
  - register_notification_filter/3
  - register_notification_filter/4
  - register_notification_filter/4
  - register_notification_filter/5
  - unregister_notification_filter/1
  - unregister_notification_filter/2
  - which_notification_filter/0
  - which_notification_filter/1
  - set_request_limit/1
  - set_request_limit/2
  - register_subagent/3
  - unregister_subagent/2
  - send_notification2/3
  - send_notification/3
  - send_notification/4
  - send_notification/5
  - send_notification/6
  - send_notification/7
  - discovery/2
  - discovery/3
  - discovery/3
  - discovery/4
  - discovery/4
  - discovery/5
  - discovery/6
  - convert_config/1
  - restart_worker/0
  - restart_worker/1
  - restart_set_worker/0
  - restart_set_worker/1
  - print_mib_info/0
  - print_mib_tables/0
  - print_mib_variables/0
  - verbosity/2
- snmpa_conf
  - Top of manual page
  - agent_entry/2
  - write_agent_config/2
  - write_agent_config/3
  - append_agent_config/2
  - read_agent_config/1
  - standard_entry/2
  - write_standard_config/2
  - write_standard_config/3
  - append_standard_config/2
  - read_standard_config/1
  - context_entry/1
  - write_context_config/2
  - write_context_config/3
  - append_context_config/2
  - read_context_config/1
  - community_entry/1
  - community_entry/5
  - write_community_config/2
  - write_community_config/3
  - append_community_config/2
  - read_community_config/1
  - target_addr_entry/5
  - target_addr_entry/6
  - target_addr_entry/8
  - target_addr_entry/10
  - target_addr_entry/11
  - write_target_addr_config/2
  - write_target_addr_config/3
  - append_target_addr_config/2
  - read_target_addr_config/1
  - target_params_entry/2
  - target_params_entry/4
  - target_params_entry/5
  - write_target_params_config/2
  - write_target_params_config/3
  - append_target_params_config/2
  - read_target_params_config/1
  - vacm_s2g_entry/3
  - vacm_acc_entry/8
  - vacm_vtf_entry/2
  - vacm_vtf_entry/4
  - write_vacm_config/2
  - write_vacm_config/3
  - append_vacm_config/2
  - read_vacm_config/1
  - usm_entry/1
  - usm_entry/13
  - write_usm_config/2
  - write_usm_config/3
  - append_usm_config/2
  - read_usm_config/1
  - notify_entry/3
  - write_notify_config/2
  - write_notify_config/3
  - append_notify_config/2
  - read_notify_config/1
- snmpa_discovery_handler
  - Top of manual page
  - stage1_finish/3
- snmpa_error_report
  - Top of manual page
  - config_err/2
  - user_err/2
- snmpa_error
  - Top of manual page
  - config_err/2
  - user_err/2
- snmpa_error_io
  - Top of manual page
  - config_err/2
  - user_err/2
- snmpa_error_logger
  - Top of manual page
  - config_err/2
  - user_err/2
- snmpa_local_db
  - Top of manual page
  - dump/0
  - match/2
  - print/0
  - print/1
  - print/2
  - table_create/1
  - table_create_row/3
  - table_delete/1
  - table_delete_row/2
  - table_exists/1
  - table_get_row/2
- snmpa_mpd
  - Top of manual page
  - init/1
  - process_packet/6
  - process_packet/7
  - generate_response_msg/5
  - generate_response_msg/6
  - generate_msg/5
  - generate_msg/6
  - discarded_pdu/1
- snmpa_network_interface
  - Top of manual page
  - start_link/4
  - info/1
  - verbosity/2
  - get_log_type/1
  - set_log_type/2
- snmpa_network_interface_filter
  - Top of manual page
  - accept_recv/2
  - accept_send/2
  - accept_recv_pdu/3
  - accept_send_pdu/2
- snmpa_notification_delivery_info_receiver
  - Top of manual page
  - delivery_targets/3
  - delivery_info/4
- snmpa_notification_filter
  - Top of manual page
  - handle_notification/2
- snmpa_supervisor
  - Top of manual page
  - start_sub_sup/1
  - start_master_sup/1
  - start_sub_agent/3
  - stop_sub_agent/1
- snmp_community_mib
  - Top of manual page
  - configure/1
  - reconfigure/1
  - add_community/5
  - add_community/6
  - delete_community/1
- snmp_framework_mib
  - Top of manual page
  - configure/1
  - init/0
  - add_context/1
  - delete_context/1
- snmp_generic
  - Top of manual page
  - get_status_col/2
  - get_status_col/2
  - get_index_types/1
  - get_table_info/2
  - table_func/2
  - table_func/4
  - table_get_elements/3
  - table_next/2
  - table_row_exists/2
  - table_set_elements/3
  - variable_func/2
  - variable_func/3
  - variable_get/1
  - variable_set/2
- snmp_index
  - Top of manual page
  - delete/1
  - delete/2
  - get/2
  - get_last/1
  - get_next/2
  - insert/3
  - key_to_oid/2
  - new/1
- snmp_notification_mib
  - Top of manual page
  - configure/1
  - reconfigure/1
  - add_notify/3
  - delete_notify/1
- snmp_pdus
  - Top of manual page
  - dec_message/1
  - dec_message_only/1
  - dec_pdu/1
  - dec_scoped_pdu/1
  - dec_scoped_pdu_data/1
  - dec_usm_security_parameters/1
  - enc_encrypted_scoped_pdu/1
  - enc_message/1
  - enc_message_only/1
  - enc_pdu/1
  - enc_scoped_pdu/1
  - enc_usm_security_parameters/1
- snmp_standard_mib
  - Top of manual page
  - configure/1
  - inc/1
  - inc/2
  - reconfigure/1
  - reset/0
  - sys_up_time/0
- snmp_target_mib
  - Top of manual page
  - configure/1
  - reconfigure/1
  - set_target_engine_id/2
  - add_addr/10
  - add_addr/11
  - delete_addr/1
  - add_params/5
  - delete_params/1
- snmp_user_based_sm_mib
  - Top of manual page
  - configure/1
  - reconfigure/1
  - add_user/13
  - delete_user/1
- snmp_view_based_acm_mib
  - Top of manual page
  - configure/1
  - reconfigure/1
  - add_sec2group/3
  - delete_sec2group/1
  - add_access/8
  - delete_access/1
  - add_view_tree_fam/4
  - delete_view_tree_fam/1
- snmpc
  - Top of manual page
  - compile/1
  - compile/2
  - is_consistent/1
  - mib_to_hrl/1
- snmpc(command)
- snmpm
  - Top of manual page
  - monitor/0
  - demonitor/1
  - notify_started/1
  - cancel_notify_started/1
  - register_user/3
  - register_user/4
  - register_user_monitor/3
  - register_user_monitor/4
  - unregister_user/1
  - which_users/0
  - register_agent/3
  - unregister_agent/2
  - agent_info/2
  - update_agent_info/3
  - update_agent_info/4
  - which_agents/0
  - which_agents/1
  - register_usm_user/3
  - unregister_usm_user/2
  - usm_user_info/3
  - update_usm_user_info/4
  - which_usm_users/0
  - which_usm_users/1
  - sync_get2/3
  - sync_get2/4
  - sync_get/3
  - sync_get/4
  - sync_get/4
  - sync_get/5
  - sync_get/6
  - async_get2/3
  - async_get2/4
  - async_get/3
  - async_get/4
  - async_get/4
  - async_get/5
  - async_get/6
  - sync_get_next2/3
  - sync_get_next2/4
  - sync_get_next/3
  - sync_get_next/4
  - sync_get_next/4
  - sync_get_next/5
  - sync_get_next/6
  - async_get_next2/3
  - async_get_next2/4
  - async_get_next/3
  - async_get_next/4
  - async_get_next/4
  - async_get_next/5
  - async_get_next/6
  - sync_set2/3
  - sync_set2/4
  - sync_set/3
  - sync_set/4
  - sync_set/4
  - sync_set/5
  - sync_set/6
  - async_set2/3
  - async_set2/4
  - async_set/3
  - async_set/4
  - async_set/4
  - async_set/5
  - async_set/6
  - sync_get_bulk2/5
  - sync_get_bulk2/6
  - sync_get_bulk/5
  - sync_get_bulk/6
  - sync_get_bulk/6
  - sync_get_bulk/7
  - sync_get_bulk/8
  - async_get_bulk2/5
  - async_get_bulk2/6
  - async_get_bulk/5
  - async_get_bulk/6
  - async_get_bulk/6
  - async_get_bulk/7
  - async_get_bulk/8
  - cancel_async_request/2
  - log_to_txt/2
  - log_to_txt/3
  - log_to_txt/4
  - log_to_txt/5
  - log_to_txt/6
  - log_to_txt/7
  - log_to_io/1
  - log_to_io/2
  - log_to_io/2
  - log_to_io/3
  - log_to_io/4
  - log_to_io/5
  - log_to_io/6
  - change_log_size/1
  - set_log_type/1
  - load_mib/1
  - unload_mib/1
  - which_mibs/0
  - name_to_oid/1
  - oid_to_name/1
  - oid_to_type/1
  - backup/1
  - info/0
  - verbosity/2
  - format_reason/1
  - format_reason/2
- snmpm_conf
  - Top of manual page
  - manager_entry/2
  - write_manager_config/2
  - write_manager_config/3
  - append_manager_config/2
  - read_manager_config/1
  - users_entry/1
  - users_entry/2
  - users_entry/3
  - write_users_config/2
  - write_users_config/3
  - append_users_config/2
  - read_users_config/1
  - agents_entry/12
  - write_agents_config/2
  - write_agents_config/3
  - append_agents_config/2
  - read_agents_config/1
  - usm_entry/6
  - usm_entry/7
  - write_usm_config/2
  - write_usm_config/3
  - append_usm_config/2
  - read_usm_config/1
- snmpm_mpd
  - Top of manual page
  - init_mpd/1
  - process_msg/7
  - generate_msg/5
  - generate_response_msg/4
- snmpm_network_interface
  - Top of manual page
  - start_link/2
  - stop/1
  - send_pdu/7
  - inform_response/4
  - note_store/2
  - info/1
  - verbosity/2
  - get_log_type/1
  - set_log_type/2
- snmpm_user
  - Top of manual page
  - handle_error/3
  - handle_agent/5
  - handle_pdu/4
  - handle_trap/3
  - handle_inform/3
  - handle_report/3
- snmpm_network_interface_filter
  - Top of manual page
  - accept_recv/2
  - accept_send/2
  - accept_recv_pdu/3
  - accept_send_pdu/3

# snmp

### APPLICATION

snmp

### APPLICATION SUMMARY

The SNMP Application

### DESCRIPTION

This chapter describes the snmp application in OTP. The SNMP application provides the following services:

- a multilingual extensible SNMP agent

- a SNMP manager

- a MIB compiler

### Configuration

The following configuration parameters are defined for the SNMP application. Refer to application(3) for more information about configuration parameters.

The snmp part of the config file specifying the configuration parameters is basically the following tuple:

          {snmp, snmp_components_config()}

A minimal config file for starting a node with both a manager and an agent:

          [{snmp,
            [{agent, [{db_dir, "/tmp/snmp/agent/db"},
                      {config, [{dir, "/tmp/snmp/agent/conf"}]}]},
             {manager, [{config, [{dir, "/tmp/snmp/manager/conf"},
                                  {db_dir, "/tmp/snmp/manager/db"}]}]}]}
            ]
           }
          ].

Each snmp component has its own set of configuration parameters, even though some of the types are common to both components.

          snmp_components_config() -> [snmp_component_config()]
          snmp_component_config() -> {agent, agent_options()} | {manager, manager_options()}
          agent_options() = [agent_option()]
          agent_option() = {restart_type,     restart_type()}     |
                           {agent_type,       agent_type()}       |
                           {agent_verbosity,  verbosity()}        |
                           {discovery,        agent_discovery()}  |
                           {versions,         versions()}         |
                           {gb_max_vbs,       gb_max_vbs()}       |
                           {priority,         priority()}         |
                           {multi_threaded,   multi_threaded()}   |
                           {db_dir,           db_dir()}           |
                           {db_init_error,    db_init_error()}    |
                           {local_db,         local_db()}         |
                           {net_if,           agent_net_if()}     |
                           {mibs,             mibs()}             |
                           {mib_storage,      mib_storage()}      |
                           {mib_server,       mib_server()}       |
                           {audit_trail_log,  audit_trail_log()}  |
                           {error_report_mod, error_report_mod()} |
                           {note_store,       note_store()}       |
                           {symbolic_store,   symbolic_store()}   |
                           {target_cache,     target_cache()}     |
                           {config,           agent_config()}
          manager_options() = [manager_option()]
          manager_option() = {restart_type,             restart_type()}    |
                             {net_if,                   manager_net_if()}  |
                             {server,                   server()}          |
                             {note_store,               note_store()}      |
                             {config,                   manager_config()}  |
                             {inform_request_behaviour, manager_irb()}     |
                             {mibs,                     manager_mibs()}    |
                             {priority,                 priority()}        |
                             {audit_trail_log,          audit_trail_log()} |
                             {versions,                 versions()}        |
                             {def_user_mod,             def_user_module()  |
                             {def_user_data,            def_user_data()}

Agent specific config options and types:

agent_type() = master | sub <optional>

  If master, one master agent is started. Otherwise, no agents are started.

  Default is master.

agent_discovery() = [agent_discovery_opt()] <optional>

  agent_discovery_opt() = {terminating, agent_terminating_discovery_opts()} | {originating, agent_originating_discovery_opts()}

  The terminating options effects discovery initiated by a manager.

  The originating options effects discovery initiated by this agent.

  For defaults see the options in agent_discovery_opt().

agent_terminating_discovery_opts() = [agent_terminating_discovery_opt()] <optional>

  agent_terminating_discovery_opt() = {enable, boolean()} | {stage2, discovery | plain} | {trigger_username, string()}

  These are options effecting discovery terminating in this agent (i.e. initiated by a manager).

  The default values for the terminating discovery options are:

  - enable: true
  - stage2: discovery
  - trigger_username: ""
agent_originating_discovery_opts() = [agent_originating_discovery_opt()] <optional>

  agent_originating_discovery_opt() = {enable, boolean()}

  These are options effecting discovery originating in this agent.

  The default values for the originating discovery options are:

  - enable: true
multi_threaded() = bool() <optional>

  If true, the agent is multi-threaded, with one thread for each get request.

  Default is false.

db_dir() = string() <mandatory>

  Defines where the SNMP agent internal db files are stored.

gb_max_vbs() = pos_integer() | infinity <optional>

  Defines the maximum number of varbinds allowed in a Get-BULK response.

  Default is 1000.

local_db() = [local_db_opt()] <optional>

  local_db_opt() = {repair, agent_repair()} | {auto_save, agent_auto_save()} | {verbosity, verbosity()}

  Defines options specific for the SNMP agent local database.

  For defaults see the options in local_db_opt().

agent_repair() = false | true | force <optional>

  When starting snmpa_local_db it always tries to open an existing database. If false, and some errors occur, a new database is created instead. If true, an existing file will be repaired. If force, the table will be repaired even if it was properly closed.

  Default is true.

agent_auto_save() = integer() | infinity <optional>

  The auto save interval. The table is flushed to disk whenever not accessed for this amount of time.

  Default is 5000.

agent_net_if() = [agent_net_if_opt()] <optional>

  agent_net_if_opt() = {module, agent_net_if_module()} | {verbosity, verbosity()} | {options, agent_net_if_options()}

  Defines options specific for the SNMP agent network interface entity.

  For defaults see the options in agent_net_if_opt().

agent_net_if_module() = atom() <optional>

  Module which handles the network interface part for the SNMP agent. Must implement the snmpa_network_interface behaviour.

  Default is snmpa_net_if.

agent_net_if_options() = [agent_net_if_option()] <optional>

  agent_net_if_option() = {bind_to, bind_to()} | {sndbuf, sndbuf()} | {recbuf, recbuf()} | {no_reuse, no_reuse()} | {req_limit, req_limit()} | {filter, agent_net_if_filter_options()}

  These options are actually specific to the used module. The ones shown here are applicable to the default agent_net_if_module().

  For defaults see the options in agent_net_if_option().

req_limit() = integer() | infinity <optional>

  Max number of simultaneous requests handled by the agent.

  Default is infinity.

agent_net_if_filter_options() = [agent_net_if_filter_option()] <optional>

  agent_net_if_filter_option() = {module, agent_net_if_filter_module()}

  These options are actually specific to the used module. The ones shown here are applicable to the default agent_net_if_filter_module().

  For defaults see the options in agent_net_if_filter_option().

agent_net_if_filter_module() = atom() <optional>

  Module which handles the network interface filter part for the SNMP agent. Must implement the snmpa_network_interface_filter behaviour.

  Default is snmpa_net_if_filter.

agent_mibs() = [string()] <optional>

  Specifies a list of MIBs (including path) that defines which MIBs are initially loaded into the SNMP master agent.

  Note that the following mibs will always be loaded:

  - version v1: STANDARD-MIB
  - version v2: SNMPv2
  - version v3: SNMPv2, SNMP-FRAMEWORK-MIB and SNMP-MPD-MIB

  Default is [].

mib_storage() = ets | {ets, Dir} | {ets, Dir, Action} | dets | {dets, Dir} | {dets, Dir, Action} | mnesia | {mnesia, Nodes} | {mnesia, Nodes, Action} <optional>

  Specifies how info retrieved from the mibs will be stored.

  If mib_storage is {ets, Dir}, the table will also be stored on file. If Dir is default, then db_dir will be used.

  If mib_storage is dets or if Dir is default, then db_dir will be used for Dir.

  If mib_storage is mnesia then erlang:nodes() will be used for Nodes.

  Default is ets.

  Dir = default | string(). Dir is the directory where the files will be stored. If default, then db_dir will be used.

  Nodes = visible | connected | [node()]. Nodes = visible is translated to erlang:nodes(visible). Nodes = connected is translated to erlang:nodes(connected). If Nodes = [] then the own node is assumed.

  Action = clear | keep. Default is keep. Action is used to specify what shall be done if the mnesia/dets table already exist.

mib_server() = [mib_server_opt()] <optional>

  mib_server_opt() = {mibentry_override, mibentry_override()} | {trapentry_override, trapentry_override()} | {verbosity, verbosity()} | {cache, mibs_cache()}

  Defines options specific for the SNMP agent mib server.

  For defaults see the options in mib_server_opt().

mibentry_override() = bool() <optional>

  If this value is false, then when loading a mib each mib- entry is checked prior to installation of the mib. The purpose of the check is to prevent that the same symbolic mibentry name is used for different oid's.

  Default is false.

trapentry_override() = bool() <optional>

  If this value is false, then when loading a mib each trap is checked prior to installation of the mib. The purpose of the check is to prevent that the same symbolic trap name is used for different trap's.

  Default is false.

mibs_cache() = bool() | mibs_cache_opts() <optional>

  Shall the agent utilize the mib server lookup cache or not.

  Default is true (in which case the mibs_cache_opts() default values apply).

mibs_cache_opts() = [mibs_cache_opt()] <optional>

  mibs_cache_opt() = {autogc, mibs_cache_autogc()} | {gclimit, mibs_cache_gclimit()} | {age, mibs_cache_age()}

  Defines options specific for the SNMP agent mib server cache.

  For defaults see the options in mibs_cache_opt().

mibs_cache_autogc() = bool() <optional>

  Defines if the mib server shall perform cache gc automatically or leave it to the user (see gc_mibs_cache/0,1,2,3).

  Default is true.

mibs_cache_age() = integer() > 0 <optional>

  Defines how old the entries in the cache will be allowed before they are GC'ed (assuming GC is performed). Each entry in the cache is "touched" whenever it is accessed.

  The age is defined in milliseconds.

  Default is 10 timutes.

mibs_cache_gclimit() = integer() > 0 | infinity <optional>

  When performing a GC, this is the max number of cache entries that will be deleted from the cache.

  The reason for having this limit is that if the cache is large, the GC can potentially take a long time, during which the agent is locked.

  Default is 100.

error_report_mod() = atom() <optional>

  Defines an error report module, implementing the snmpa_error_report behaviour. Two modules are provided with the toolkit: snmpa_error_logger and snmpa_error_io.

  Default is snmpa_error_logger.

symbolic_store() = [symbolic_store_opt()]

  symbolic_store_opt() = {verbosity, verbosity()}

  Defines options specific for the SNMP agent symbolic store.

  For defaults see the options in symbolic_store_opt().

target_cache() = [target_cache_opt()]

  target_cache_opt() = {verbosity, verbosity()}

  Defines options specific for the SNMP agent target cache.

  For defaults see the options in target_cache_opt().

agent_config() = [agent_config_opt()] <mandatory>

  agent_config_opt() = {dir, agent_config_dir()} | {force_load, force_load()} | {verbosity, verbosity()}

  Defines specific config related options for the SNMP agent.

  For defaults see the options in agent_config_opt().

agent_config_dir = dir() <mandatory>

  Defines where the SNMP agent configuration files are stored.

force_load() = bool() <optional>

  If true the configuration files are re-read during start-up, and the contents of the configuration database ignored. Thus, if true, changes to the configuration database are lost upon reboot of the agent.

  Default is false.

Manager specific config options and types:

server() = [server_opt()] <optional>

  server_opt() = {timeout, server_timeout()} | {verbosity, verbosity()}

  Specifies the options for the manager server process.

  Default is silence.

server_timeout() = integer() <optional>

  Asynchroneous request cleanup time. For every requests, some info is stored internally, in order to be able to deliver the reply (when it arrives) to the proper destination. If the reply arrives, this info will be deleted. But if there is no reply (in time), the info has to be deleted after the best before time has been passed. This cleanup will be performed at regular intervals, defined by the server_timeout() time. The information will have an best before time, defined by the Expire time given when calling the request function (see async_get, async_get_next and async_set).

  Time in milli-seconds.

  Default is 30000.

manager_config() = [manager_config_opt()] <mandatory>

  manager_config_opt() = {dir, manager_config_dir()} | {db_dir, manager_db_dir()} | {db_init_error, db_init_error()} | {repair, manager_repair()} | {auto_save, manager_auto_save()} | {verbosity, verbosity()}

  Defines specific config related options for the SNMP manager.

  For defaults see the options in manager_config_opt().

manager_config_dir = dir() <mandatory>

  Defines where the SNMP manager configuration files are stored.

manager_db_dir = dir() <mandatory>

  Defines where the SNMP manager store persistent data.

manager_repair() = false | true | force <optional>

  Defines the repair option for the persistent database (if and how the table is repaired when opened).

  Default is true.

manager_auto_save() = integer() | infinity <optional>

  The auto save interval. The table is flushed to disk whenever not accessed for this amount of time.

  Default is 5000.

manager_irb() = auto | user | {user, integer()} <optional>

  This option defines how the manager will handle the sending of response (acknowledgment) to received inform-requests.

  - auto - The manager will autonomously send response (acknowledgment> to inform-request messages.

  - {user, integer()} - The manager will send response (acknowledgment) to inform-request messages when the handle_inform function completes. The integer is the time, in milli-seconds, that the manager will consider the stored inform-request info valid.

  - user - Same as {user, integer()}, except that the default time, 15 seconds (15000), is used.

  See snmpm_network_interface, handle_inform and definition of the manager net if for more info.

  Default is auto.

manager_mibs() = [string()] <optional>

  Specifies a list of MIBs (including path) and defines which MIBs are initially loaded into the SNMP manager.

  Default is [].

manager_net_if() = [manager_net_if_opt()] <optional>

  manager_net_if_opt() = {module, manager_net_if_module()} | {verbosity, verbosity()} | {options, manager_net_if_options()}

  Defines options specific for the SNMP manager network interface entity.

  For defaults see the options in manager_net_if_opt().

manager_net_if_options() = [manager_net_if_option()] <optional>

  manager_net_if_option() = {bind_to, bind_to()} | {sndbuf, sndbuf()} | {recbuf, recbuf()} | {no_reuse, no_reuse()} | {filter, manager_net_if_filter_options()}

  These options are actually specific to the used module. The ones shown here are applicable to the default manager_net_if_module().

  For defaults see the options in manager_net_if_option().

manager_net_if_module() = atom() <optional>

  The module which handles the network interface part for the SNMP manager. It must implement the snmpm_network_interface behaviour.

  Default is snmpm_net_if.

manager_net_if_filter_options() = [manager_net_if_filter_option()] <optional>

  manager_net_if_filter_option() = {module, manager_net_if_filter_module()}

  These options are actually specific to the used module. The ones shown here are applicable to the default manager_net_if_filter_module().

  For defaults see the options in manager_net_if_filter_option().

manager_net_if_filter_module() = atom() <optional>

  Module which handles the network interface filter part for the SNMP manager. Must implement the snmpm_network_interface_filter behaviour.

  Default is snmpm_net_if_filter.

def_user_module() = atom() <optional>

  The module implementing the default user. See the snmpm_user behaviour.

  Default is snmpm_user_default.

def_user_data() = term() <optional>

  Data for the default user. Passed to the user module when calling the callback functions.

  Default is undefined.

Common config types:

restart_type() = permanent | transient | temporary

  See supervisor documentation for more info.

  Default is permanent for the agent and transient for the manager.

db_init_error() = terminate | create

  Defines what to do if the agent or manager is unable to open an existing database file. terminate means that the agent/manager will terminate and create means that the agent/manager will remove the faulty file(s) and create new ones.

  Default is terminate.

priority() = atom() <optional>

  Defines the Erlang priority for all SNMP processes.

  Default is normal.

versions() = [version()] <optional>

  version() = v1 | v2 | v3

  Which SNMP versions shall be accepted/used.

  Default is [v1,v2,v3].

verbosity() = silence | info | log | debug | trace <optional>

  Verbosity for a SNMP process. This specifies now much debug info is printed.

  Default is silence.

bind_to() = bool() <optional>

  If true, net_if binds to the IP address. If false, net_if listens on any IP address on the host where it is running.

  Default is false.

no_reuse() = bool() <optional>

  If true, net_if does not specify that the IP and port address should be reusable. If false, the address is set to reusable.

  Default is false.

recbuf() = integer() <optional>

  Receive buffer size.

  Default value is defined by gen_udp.

sndbuf() = integer() <optional>

  Send buffer size.

  Default value is defined by gen_udp.

note_store() = [note_store_opt()] <optional>

  note_store_opt() = {timeout, note_store_timeout()} | {verbosity, verbosity()}

  Specifies the start-up verbosity for the SNMP note store.

  For defaults see the options in note_store_opt().

note_store_timeout() = integer() <optional>

  Note cleanup time. When storing a note in the note store, each note is given lifetime. Every timeout the note_store process performs a GC to remove the expired note's. Time in milli-seconds.

  Default is 30000.

audit_trail_log() = [audit_trail_log_opt()] <optional>

  audit_trail_log_opt() = {type, atl_type()} | {dir, atl_dir()} | {size, atl_size()} | {repair, atl_repair()} | {seqno, atl_seqno()}

  If present, this option specifies the options for the audit trail logging. The disk_log module is used to maintain a wrap log. If present, the dir and size options are mandatory.

  If not present, audit trail logging is not used.

atl_type() = read | write | read_write <optional>

  Specifies what type of an audit trail log should be used. The effect of the type is actually different for the the agent and the manager.

  For the agent:

  - If write is specified, only set requests are logged.
  - If read is specified, only get requests are logged.
  - If read_write, all requests are logged.

  For the manager:

  - If write is specified, only sent messages are logged.
  - If read is specified, only received messages are logged.
  - If read_write, both outgoing and incoming messages are logged.

  Default is read_write.

atl_dir = dir() <mandatory>

  Specifies where the audit trail log should be stored.

  If audit_trail_log specifies that logging should take place, this parameter must be defined.

atl_size() = {integer(), integer()} <mandatory>

  Specifies the size of the audit trail log. This parameter is sent to disk_log.

  If audit_trail_log specifies that logging should take place, this parameter must be defined.

atl_repair() = true | false | truncate | snmp_repair <optional>

  Specifies if and how the audit trail log shall be repaired when opened. Unless this parameter has the value snmp_repair it is sent to disk_log. If, on the other hand, the value is snmp_repair, snmp attempts to handle certain faults on its own. And even if it cannot repair the file, it does not truncate it directly, but instead moves it aside for later off-line analysis.

  Default is true.

atl_seqno() = true | false <optional>

  Specifies if the audit trail log entries will be (sequence) numbered or not. The range of the sequence numbers are according to RFC 5424, i.e. 1 through 2147483647.

  Default is false.

### See Also

application(3), disk_log(3)