snmp_target_mib(3)

NAME
snmp_target_mib - Instrumentation Functions for SNMP-TARGET-MIB

DESCRIPTION

The module snmp_target_mib implements the instrumentation functions for the SNMP-TARGET-MIB, and functions for configuring the database.

The configuration files are described in the SNMP User's Manual.

Legacy API functions add_addr/10 that does not specify transport domain, and add_addr/11 that has got separate IpAddr and PortNumber arguments still work as before for backwards compatibility reasons.

  DATA TYPES

See the data types in snmpa_conf.

DATA TYPES

mms() :: 484..65535.

    NOTE: "The maximum message size value associated with an entry in the snmpTargetAddrTable.".

    Integer32 (484..65535)
name() :: snmp_framework_mib:admin_string().

    NOTE: "The locally arbitrary, but unique identifier associated with this snmpTargetAddrEntry."

    SnmpAdminString (SIZE(1..32))
params() :: snmp_framework_mib:admin_string().

    NOTE: "The value of this object identifies an entry in the snmpTargetParamsTable."

    SnmpAdminString (SIZE(1..32))
retry_count() :: 0..255.

    NOTE: "This object specifies a default number of retries to be attempted when a response is not received for a generated message."

    Integer32 (0..255)
tag_list() :: string().

    NOTE: "An octet string containing a list of tag values. Tag values are preferably in human-readable form." "To facilitate internationalization, this information is represented using the ISO/IEC IS 10646-1 character set, encoded as an octet string using the UTF-8 character encoding scheme described in RFC 2279."

    OCTET STRING (SIZE (0..255))
tag_value() :: string().

    NOTE: "An octet string containing a tag value. Tag values are preferably in human-readable form."

    OCTET STRING (SIZE (0..255))
tmask() :: snmpa_conf:transportAddressMask().

    NOTE: "The mask value associated with an entry in the snmpTargetAddrTable. The value of this object must have the same length as the corresponding instance of snmpTargetAddrTAddress, or must have length 0."

    OCTET STRING (SIZE (0..255))

FUNCTIONS

add_addr(Name, TDomain, TAddr, Timeout, Retry, TagList, Params, EngineId, TMask, MMS) -> {ok, Key} | {error, Reason} when Name :: name(), TDomain :: snmpa_conf:transportDomain(), TAddr :: snmpa_conf:transportAddress(), Timeout :: snmp:time_interval(), Retry :: integer(), TagList :: tag_list(), Params :: params(), EngineId :: snmp_framework_mib:engine_id(), TMask :: tmask(), MMS :: snmp_framework_mib:max_message_size(), Key :: term(), Reason :: term(); (Name, Ip, Port, Timeout, Retry, TagList, Params, EngineId, TMask, MMS) -> {ok, Key} | {error, Reason} when Name :: name(), Ip :: snmpa_conf:transportAddressWithoutPort(), Port :: inet:port_number(), Timeout :: snmp:time_interval(), Retry :: integer(), TagList :: tag_list(), Params :: params(), EngineId :: snmp_framework_mib:engine_id(), TMask :: tmask(), MMS :: snmp_framework_mib:max_message_size(), Key :: term(), Reason :: term().

    Adds a target address definition to the agent config. Equivalent to one line in the target_addr.conf file.
add_params(Name, MPModel, SecModel, SecName, SecLevel) -> {ok, Key} | {error, Reason} when Name :: name(), MPModel :: snmp_framework_mib:message_processing_model(), SecModel :: snmp_framework_mib:security_model(), SecName :: snmp_framework_mib:admin_string(), SecLevel :: snmp_framework_mib:security_level(), Key :: term(), Reason :: term().

    Adds a target parameter definition to the agent config. Equivalent to one line in the target_params.conf file.
configure(ConfDir) -> snmp:void() when ConfDir :: string().

    This function is called from the supervisor at system start-up.

    Inserts all data in the configuration files into the database and destroys all old rows with StorageType volatile. The rows created from the configuration file will have StorageType nonVolatile.

    All snmp counters are set to zero.

    If an error is found in the configuration file, it is reported using the function config_err/2 of the error report module, and the function fails with the reason configuration_error.

    ConfDir is a string which points to the directory where the configuration files are found.

    The configuration files read are: target_addr.conf and target_params.conf.
delete_addr(Key) -> ok | {error, Reason} when Key :: term(), Reason :: term().

    Delete a target address definition from the agent config.
delete_params(Key) -> ok | {error, Reason} when Key :: term(), Reason :: term().

    Delete a target parameter definition from the agent config.
reconfigure(ConfDir) -> snmp:void() when ConfDir :: string().

    Inserts all data in the configuration files into the database and destroys all old data, including the rows with StorageType nonVolatile. The rows created from the configuration file will have StorageType nonVolatile.

    Thus, the data in the SNMP-TARGET-MIB, after this function has been called, is the data from the configuration files.

    All snmp counters are set to zero.

    If an error is found in the configuration file, it is reported using the function config_err/2 of the , and the function fails with the reason configuration_error.

    ConfDir is a string which points to the directory where the configuration files are found.

    The configuration files read are: target_addr.conf and target_params.conf.
set_target_engine_id(TargetAddrName, EngineId) -> boolean() when TargetAddrName :: name(), EngineId :: snmp_framework_mib:engine_id().

    Changes the engine id for a target in the snmpTargetAddrTable. If notifications are sent as Inform requests to a target, its engine id must be set.