snmpa_conf(3)
πΈ snmpa_conf(3) β Erlang Module Definition πΈ
okay so this is the manual page for snmpa_conf, bestie, and it's literally the glow-up toolkit for your SNMP agent's config files. Erlang module, group-chat energy, let's go. β¨
π NAME π
snmpa_conf β utility functions for handling the agent config files. that's it, that's the vibe. π
π¦ DESCRIPTION π¦
so the module snmpa_conf is where all the little helper functions live β the ones you use to manipulate the config files of the SNMP agent. and by "manipulate" we mean write, read, and append. no cap. π
β¨ DATA TYPES β¨
ngl this section is giving "the lore drop" but it's important so stay with me. π«Ά
-opaque agent_entry()β an opaque term that represents an entry in the'agent'config.-opaque community_entry()β an opaque term that represents an entry in the'community'(agent) config.-opaque context_entry()β an opaque term that represents an entry in the'context'(agent) config.
extended_transport_address() is defined as:
extended_transport_address() :: {inet:ip_address(), port_info()}.
intAgentTransport() is defined as:
intAgentTransport() ::
{transportDomain(), transport_address()} |
{transportDomain(),
extended_transport_address(),
snmpa:transport_kind()} |
{transportDomain(),
extended_transport_address(),
transport_opts()} |
{transportDomain(),
extended_transport_address(),
snmpa:transport_kind(),
transport_opts()}.
ip_address() is defined as:
ip_address() :: inet:ip_address() | snmp_ip_address().
-opaque notify_entry()β an opaque term that represents an entry in the'notify'(agent) config.
port_info() is defined as:
port_info() :: inet:port_number() | system | range() | ranges().
β οΈ heads up bestie: port number 0 (zero) can't be specified directly β it's used internally β β so don't even try it. instead you use the atom 'system'. periodt. π
range() is defined as:
range() :: {Min :: inet:port_number(), Max :: inet:port_number()}.
and the rule is Min < Max. π
ranges() is defined as:
ranges() :: [inet:port_number() | range()].
snmp_ip_address() is defined as:
snmp_ip_address() :: [non_neg_integer()].
-opaque standard_entry()β an opaque term that represents an entry in the'standard'(agent) config.-opaque target_addr_entry()β an opaque term that represents an entry in the'target address'(agent) config.-opaque target_params_entry()β an opaque term that represents an entry in the'target parameters'(agent) config.
transportAddress() is defined as:
transportAddress() ::
transportAddressIPv4() | transportAddressIPv6().
transportAddressIPv4() is defined as:
transportAddressIPv4() ::
transportAddressIPv4WithPort() |
transportAddressIPv4WithoutPort().
transportAddressIPv4WithPort() is defined as:
transportAddressIPv4WithPort() ::
{transportAddressIPv4WithoutPort(), inet:port_number()} |
[byte()].
okay so the Erlang type language has limitations, bestie π β we literally cannot define this type in full detail. so instead, here's the description. the list variant is 4 bytes for address + 2 bytes for port:
[byte() x 4, byte() x 2]
transportAddressIPv4WithoutPort() is defined as:
transportAddressIPv4WithoutPort() :: inet:ip4_address() | [byte()].
again, Erlang type language limitations, we can't spell it out β so here's the description. the list variant is 4 bytes for address:
[byte() x 4]
transportAddressIPv6() is defined as:
transportAddressIPv6() ::
transportAddressIPv6WithPort() |
transportAddressIPv6WithoutPort().
transportAddressIPv6WithPort() is defined as:
transportAddressIPv6WithPort() ::
{transportAddressIPv6WithoutPort(), inet:port_number()} |
[word() | inet:port_number()] |
[word() | byte()] |
[byte()].
and you guessed it β Erlang type language limitations, so description time. β¨
- First list variant: 8 words for address + 1 word for port:
[word() x 8, inet:port_number()]
- Second list variant: 8 words for address + 2 bytes for port:
[word() x 8, byte() x 2]
- Third list variant: 16 bytes for address + 2 bytes for port:
[byte() x 16, byte() x 2]
transportAddressIPv6WithoutPort() is defined as:
transportAddressIPv6WithoutPort() ::
inet:ip6_address() | [word()] | [byte()].
once more for the people in the back β Erlang type language limitations, so:
- First list variant: 8 words for address:
[word() x 8]
- Second list variant: 16 bytes for address:
[byte() x 16]
transportAddressMask() is defined as:
transportAddressMask() :: [] | transportAddressWithPort().
transportAddressWithPort() is defined as:
transportAddressWithPort() ::
transportAddressIPv4WithPort() |
transportAddressIPv6WithPort().
transportAddressWithoutPort() is defined as:
transportAddressWithoutPort() ::
transportAddressIPv4WithoutPort() |
transportAddressIPv6WithoutPort().
transportDomain() is defined as:
transportDomain() :: snmp:tdomain().
transport_address() is defined as:
transport_address() ::
{ip_address(), inet:port_number()} | ip_address().
transport_opts() is defined as:
transport_opts() :: list().
-opaque usm_entry()β an opaque term that represents an entry in the'user based sm'(agent) config.-opaque vacm_acc_entry()β an opaque term that represents an (access) entry in the'vacm access'(agent) config.
vacm_entry() is defined as:
vacm_entry() ::
vacm_s2g_entry() | vacm_acc_entry() | vacm_vtf_entry().
basically an opaque term (well, basically opaque) that represents an entry in the 'view based acm' (agent) config. π
-opaque vacm_s2g_entry()β an opaque term that represents a (security to group) entry in the'vacm security to group'(agent) config.-opaque vacm_vtf_entry()β an opaque term that represents a (tree family) entry in the'vacm tree family'(agent) config.
word() is defined as:
word() :: 0..65535.
π₯ FUNCTIONS π₯
the main characters. let's meet them. π
π agent_entry(Tag, Val) -> AgentEntry
agent_entry(Tag, Val) -> AgentEntry
when
Tag ::
intAgentTransports | intAgentUDPPort |
snmpEngineMaxMessageSize | snmpEngineID,
Val :: term(),
AgentEntry :: agent_entry().
creates an entry for the agent config file, agent.conf. π«Ά
the type of Val depends on the value of Tag, so pay attention bestie:
intAgentTransports:[snmpa_conf:intAgentTransport()]<mandatory>intAgentUDPPort:inet:port_number()<optional>snmpEngineMaxMessageSize:snmp_framework_mib:max_message_size()<mandatory>snmpEngineID:snmp_framework_mib:engine_id()<mandatory>
see Agent Information for more info. β¨
π append_agent_config(Dir, Conf) -> ok
append_agent_config(Dir, Conf) -> ok
when
Dir :: snmp:dir(),
Conf :: [agent_entry()].
appends the config to the current agent config file. π¦
Dir is the path to the directory where you're storing the config file.
see Agent Information for more info. β¨
π append_community_config(Dir, Conf) -> ok
append_community_config(Dir, Conf) -> ok
when
Dir :: snmp:dir(),
Conf :: [community_entry()].
appends the community config to the current agent community config file. π
Dir is the path to the directory where you're storing the config file.
see Community for more info. β¨
π append_context_config(Dir, Conf) -> ok
append_context_config(Dir, Conf) -> ok
when
Dir :: snmp:dir(),
Conf :: [context_entry()].
appends the context config to the current agent context config file. πΈ
Dir is the path to the directory where you're storing the config file.
see Contexts for more info. β¨
π append_notify_config(Dir, Conf) -> ok
append_notify_config(Dir, Conf) -> ok
when
Dir :: snmp:dir(),
Conf :: [notify_entry()].
appends the notify config to the current agent notify config file. π (okay that emoji isn't on the list but you get the vibe) π
Dir is the path to the directory where you're storing the config file.
see Notify Definitions for more info. β¨
π append_standard_config(Dir, Conf) -> ok
append_standard_config(Dir, Conf) -> ok
when
Dir :: snmp:dir(),
Conf :: [standard_entry()].
appends the standard config to the current agent standard config file. β
Dir is the path to the directory where you're storing the config file.
see System Information for more info. β¨
π append_target_addr_config(Dir, Conf) -> ok
append_target_addr_config(Dir, Conf) -> ok
when
Dir :: snmp:dir(),
Conf :: [target_addr_entry()].
appends the target_addr config to the current agent target_addr config file. π―
Dir is the path to the directory where you're storing the config file.
see Target Address Definitions for more info. β¨
π append_target_params_config(Dir, Conf) -> ok
append_target_params_config(Dir, Conf) -> ok
when
Dir :: snmp:dir(),
Conf ::
[target_params_entry()].
appends the target_params config to the current agent target_params config file. π
Dir is the path to the directory where you're storing the config file.
see Target Parameters Definitions for more info. β¨
π append_usm_config(Dir, Conf) -> ok
append_usm_config(Dir, Conf) -> ok
when Dir :: snmp:dir(), Conf ::
[usm_entry()].
appends the usm config to the current agent usm config file. π
Dir is the path to the directory where you're storing the config file.
see Security data for USM for more info. β¨
π append_vacm_config(Dir, Conf) -> ok
append_vacm_config(Dir, Conf) -> ok
when
Dir :: snmp:dir(),
Conf :: [vacm_entry()].
appends the vacm config to the current agent vacm config file. π
Dir is the path to the directory where you're storing the config file.
see MIB Views for VACM for more info. β¨
π community_entry(CommIndex) -> CommunityEntry
community_entry(CommIndex) -> CommunityEntry
when
CommIndex ::
snmp_framework_mib:admin_string(),
CommunityEntry :: community_entry().
creates an entry for the agent community config file, community.conf. π
β οΈ CommunityIndex must be a non-empty string. don't come in here with an empty string bestie, it's not the vibe. π
this function only accepts the following values of CommIndex:
"public"β translates to the following call:
community_entry(CommunityIndex, CommunityIndex, "initial", "", "").
"all-rights"β translates to the following call:
community_entry(CommunityIndex, CommunityIndex, CommunityIndex, "", "").
see Community for more info. β¨
β¦and that's part 1 bestie, more chaos incoming π
π«Ά community_entry
community_entry(CommIndex, CommName, SecName, CtxName, TransportTag) ->
CommunityEntry
when
CommIndex :: snmp_community_mib:index(),
CommName :: snmp_community_mib:name(),
SecName :: snmp_community_mib:security_name(),
CtxName :: snmp_community_mib:context_name(),
TransportTag :: snmp_community_mib:transport_tag(),
CommunityEntry :: community_entry().
Okay so this one makes you an entry for the agent community config file, community.conf. β¨
Quick lil rule: CommunityIndex has to be a non-empty string, no blank vibes allowed bestie. π«
Wanna know more? Go peek at Community. π
π¦ context_entry
context_entry(Ctx) -> ContextEntry
when
Ctx :: snmp_community_mib:context_name(),
ContextEntry :: context_entry().
This builds you an entry for the agent context config file, context.conf. πΈ
More deets live in Contexts, go check it. π«Ά
π notify_entry
notify_entry(Name, Tag, Type) -> NotifyEntry
when
Name :: snmp_notification_mib:notify_name(),
Tag :: snmp_notification_mib:notify_tag(),
Type :: snmp_notification_mib:notify_type(),
NotifyEntry :: notify_entry().
Entry for the agent notify config file, notify.conf. π
And yeah β Name must be a non-empty string. Periodt. π
Full lore is under Notify Definitions. π
π read_agent_config
read_agent_config(Dir) -> {ok, Conf} | {error, Reason}
when
Dir :: snmp:dir(),
Conf :: [agent_entry()],
Reason :: term().
Reads the current agent config file, literally just grabs it for you. π
Dir is the path to the directory where the config file lives. ποΈ
See Agent Information for the tea. π«
π read_community_config
read_community_config(Dir) -> {ok, Conf} | {error, Reason}
when
Dir :: snmp:dir(),
Conf :: [community_entry()],
Reason :: term().
Reads the current agent community config file. π
Dir = the path to the directory where the config file is stored. ποΈ
Communities has the details, iykyk. β¨
π read_context_config
read_context_config(Dir) -> {ok, Conf} | {error, Reason}
when
Dir :: snmp:dir(),
Conf :: [context_entry()],
Reason :: term().
Reads the current agent context config file. πΈ
Dir is the path to the directory where the config file hangs out. ποΈ
Look at Contexts for more. π¦
π read_notify_config
read_notify_config(Dir) -> {ok, Conf} | {error, Reason}
when
Dir :: snmp:dir(),
Conf :: [notify_entry()],
Reason :: term().
Reads the current agent notify config file. π
Dir is the path to the directory where the config file is kept. ποΈ
See Notify Definitions for the full rundown. π
π read_standard_config
read_standard_config(Dir) -> {ok, Conf} | {error, Reason}
when
Dir :: snmp:dir(),
Conf :: [standard_entry()],
Reason :: term().
Reads the current agent standard config file. β
Dir is the path to the directory where the config file is stored. ποΈ
Check System Information for more. π
π read_target_addr_config
read_target_addr_config(Dir) -> {ok, Conf} | {error, Reason}
when
Dir :: snmp:dir(),
Conf :: [target_addr_entry()],
Reason :: term().
Reads the current agent target_addr config file. π―
Dir is the path to the directory where the config file lives. ποΈ
See Target Address Definitions for more. π₯
π read_target_params_config
read_target_params_config(Dir) -> {ok, Conf} | {error, Reason}
when
Dir :: snmp:dir(),
Conf :: [target_params_entry()],
Reason :: term().
Reads the current agent target_params config file. π―
Dir is the path to the directory where the config file sits. ποΈ
See Target Parameters Definitions for more. β¨
π read_usm_config
read_usm_config(Dir) -> {ok, Conf} | {error, Reason}
when
Dir :: snmp:dir(),
Conf :: [usm_entry()],
Reason :: term().
Reads the current agent usm config file. π
Dir is the path to the directory where the config file is parked. ποΈ
See Security data for USM for more. π
π read_vacm_config
read_vacm_config(Dir) -> {ok, Conf} | {error, Reason}
when
Dir :: snmp:dir(),
Conf :: [vacm_entry()],
Reason :: term().
Reads the current agent vacm config file. π‘οΈ
Dir is the path to the directory where the config file is chilling. ποΈ
See MIB Views for VACM for more. π
β standard_entry
standard_entry(Tag, Val) -> StandardEntry
when
Tag ::
sysDescr | sysObjectID | sysContact |
sysName | sysLocation | sysServices |
snmpEnableAuthenTraps,
Val :: term(),
StandardEntry :: standard_entry().
Makes an entry for the agent standard config file, standard.conf. π
Here's the thing bestie β the type of Val depends on what Tag you picked. So listen up: π§
sysDescr:string()<mandatory> β it's aDisplayString(SIZE(0..255))sysObjectID:snmp:oid()<mandatory> β it's anOBJECT IDENTIFIERsysContact:string()<mandatory> β it's aDisplayString(SIZE(0..255))sysName:string()<mandatory> β it's aDisplayString(SIZE(0..255))sysLocation:string()<mandatory> β it's aDisplayString(SIZE(0..255))sysLocation:non_neg_integer()<mandatory> β "A value which indicates the set of services that this entity primarily offers." It's anINTEGER(0..127)snmpEnableAuthenTraps:enabled | disabled<mandatory> β it's anINTEGER { enabled(1), disabled(2) }
Not me noticing that sysLocation shows up twice in that list π β I'm just reading the source, bestie, that's literally what it says. Don't come for me. π
See System Information for more. π
π― target_addr_entry / 6
target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId) ->
TargetAddrEntry
when
Name :: snmp_target_mib:name(),
Domain :: transportDomain(),
Addr :: transportAddress(),
TagList :: snmp_target_mib:tag_list(),
ParamsName :: snmp_target_mib:params(),
EngineId :: snmp_framework_mib:engine_id(),
TargetAddrEntry :: target_addr_entry();
(Name, IP, TagList, ParamsName, EngineId, TMask) ->
TargetAddrEntry
when
Name :: snmp_target_mib:name(),
IP :: inet:ip_address(),
TagList :: snmp_target_mib:tag_list(),
ParamsName :: snmp_target_mib:params(),
EngineId :: snmp_framework_mib:engine_id(),
TMask :: snmp_target_mib:tmask(),
TargetAddrEntry :: target_addr_entry().
Creates an entry for the agent target_addr config file, target_addr.conf. π―
And yes, Name must be a non-empty string. No empty names, we don't do that here. π
Real talk, here's the translation lore:
target_addr_entry/6(1) turns into this call, lowkey just with an empty mask list appended:
target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, [])
target_addr_entry/6(2) turns into this call β withDomainandAddrbuilt fromIPand the default port number:
target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask, 2048)
See Target Address Definitions for more. β¨
π― target_addr_entry / 7
target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask) ->
TargetAddrEntry
when
Name :: snmp_target_mib:name(),
Domain :: transportDomain(),
Addr :: transportAddress(),
TagList :: snmp_target_mib:tag_list(),
ParamsName :: snmp_target_mib:params(),
EngineId :: snmp_framework_mib:engine_id(),
TMask :: snmp_target_mib:tmask(),
TargetAddrEntry :: target_addr_entry();
(Name, IP, Port, TagList, ParamsName, EngineId, TMask) ->
TargetAddrEntry
when
Name :: snmp_target_mib:name(),
IP :: inet:ip_address(),
Port :: inet:port_number(),
TagList :: snmp_target_mib:tag_list(),
ParamsName :: snmp_target_mib:params(),
EngineId :: snmp_framework_mib:engine_id(),
TMask :: snmp_target_mib:tmask(),
TargetAddrEntry :: target_addr_entry().
Creates an entry for the agent target_addr config file, target_addr.conf. π₯
Name must be a non-empty string, same rule as always bestie. π
And target_addr_entry/7 (1) translates to this exact call, with that 2048 default port sliding in:
target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask, 2048)
target_addr_entry/7, clause (2) β she buildsDomainandAddrout ofIPandPortand then makes this call:target_addr_entry(Name, Domain, Addr, TagList, ParamsName, EngineId, TMask, 2048).
Peep Target Address Definitions for the full tea. π΅
π target_addr_entry/8
target_addr_entry(Name, Domain, Addr, TagList, ParamsName,
EngineId, TMask, MaxMessageSize) ->
TargetAddrEntry
when
Name :: snmp_target_mib:name(),
Domain :: transportDomain(),
Addr :: transportAddress(),
TagList :: snmp_target_mib:tag_list(),
ParamsName :: snmp_target_mib:params(),
EngineId ::
snmp_framework_mib:engine_id(),
TMask :: snmp_target_mib:tmask(),
MaxMessageSize :: snmp_target_mib:mms(),
TargetAddrEntry :: target_addr_entry();
(Name, IP, Port, TagList, ParamsName, EngineId,
TMask, MaxMessageSize) ->
TargetAddrEntry
when
Name :: snmp_target_mib:name(),
IP :: inet:ip_address(),
Port :: inet:port_number(),
TagList :: snmp_target_mib:tag_list(),
ParamsName :: snmp_target_mib:params(),
EngineId ::
snmp_framework_mib:engine_id(),
TMask :: snmp_target_mib:tmask(),
MaxMessageSize :: snmp_target_mib:mms(),
TargetAddrEntry :: target_addr_entry().
Ok so you're making an entry for the agent target_addr config file, target_addr.conf. π
Name must be a non-empty string, no cap. (Empty name? Not the vibe. π
ββοΈ)
target_addr_entry/8(1) translates to the following call:target_addr_entry(Name, Domain, Addr, 1500, 3, TagList, ParamsName, EngineId, TMask, MaxMessageSize).target_addr_entry/8(2) translates to the following call (withDomainandAddrbuilt fromIPandPort):target_addr_entry(Name, Domain, Addr, 1500, 3, TagList, ParamsName, EngineId, TMask, MaxMessageSize).
Target Address Definitions has the rest, bestie. β¨
π target_addr_entry/11 β the whole entire thing
target_addr_entry(Name, Domain, Addr, Timeout, RetryCount,
TagList, ParamsName, EngineId, TMask,
MaxMessageSize) ->
TargetAddrEntry
when
Name :: snmp_target_mib:name(),
Domain :: transportDomain(),
Addr :: transportAddress(),
Timeout :: snmp:time_interval(),
RetryCount ::
snmp_target_mib:retry_count(),
TagList :: snmp_target_mib:tag_list(),
ParamsName ::
snmp_framework_mib:admin_string(),
EngineId ::
snmp_framework_mib:engine_id(),
TMask :: snmp_target_mib:tmask(),
MaxMessageSize :: snmp_target_mib:mms(),
TargetAddrEntry :: target_addr_entry().
Making an entry for the agent target_addr config file, target_addr.conf. π¦
Name must be a non-empty string β that part is non-negotiable, fr fr.
Target Address Definitions got you if you want the deep lore. π
πΈ target_params_entry/2
target_params_entry(Name, Vsn) -> TargetParamsEntry
when
Name :: snmp_target_mib:name(),
Vsn :: snmp:version(),
TargetParamsEntry ::
target_params_entry().
Making an entry for the agent target_params config file, target_params.conf. π«Ά
Name must be a non-empty string, periodt.
target_params_entry/2 translates to the following call:
target_params_entry(Name, Vsn, "initial", noAuthNoPriv)
Target Parameters Definitions for more, iykyk. β
π§ target_params_entry/4
target_params_entry(Name, Vsn, SecName, SecLevel) ->
TargetParamsEntry
when
Name :: snmp_target_mib:name(),
Vsn :: snmp:version(),
SecName ::
snmp_framework_mib:admin_string(),
SecLevel ::
snmp_framework_mib:security_level(),
TargetParamsEntry ::
target_params_entry().
Making an entry for the agent target_params config file, target_params.conf. π
Name must be a non-empty string. We been knew.
Vsn translates into MPModel and SecModel like this:
Vsn = v1 => MPModel = v1, SecModel = v1
Vsn = v2 => MPModel = v2c, SecModel = v2c
Vsn = v3 => MPModel = v3, SecModel = usm
And target_params_entry/4 translates to the following call:
target_params_entry(Name, MPModel, SecModel, SecName, SecLevel)
Where MPModel and SecModel is mapped from Vsn, see above. π
Target Parameters Definitions for the full breakdown. π
π₯ target_params_entry β the deluxe five-arg version
target_params_entry(Name, MPModel, SecModel, SecName, SecLevel) ->
TargetParamsEntry
when
Name :: snmp_target_mib: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(),
TargetParamsEntry ::
target_params_entry().
Making an entry for the agent target_params config file, target_params.conf. π
Name must be a non-empty string β yes, again. π
Target Parameters Definitions if you wanna read up. β¨
π usm_entry/1
usm_entry(EngineID) -> UsmEntry
when
EngineID :: snmp_framework_mib:engine_id(),
UsmEntry :: usm_entry().
Making an entry for the agent usm config file, usm.conf. π¦
usm_entry/1 translates to the following call:
usm_entry(EngineID,
"initial", "initial", zeroDotZero,
usmNoAuthProtocol, "", "",
usmNoPrivProtocol, "", "",
"", "", "")
Security data for USM has more, bestie. π
π usm_entry β the big one
usm_entry(EngineID, UserName, SecName, Clone, AuthP, AuthKeyC,
OwnAuthKeyC, PrivP, PrivKeyC, OwnPrivKeyC, Public,
AuthKey, PrivKey) ->
UsmEntry
when
EngineID :: snmp_framework_mib:engine_id(),
UserName :: snmp_user_based_sm_mib:name(),
SecName :: snmp_framework_mib:admin_string(),
Clone :: snmp_user_based_sm_mib:clone_from(),
AuthP :: snmp_user_based_sm_mib:auth_protocol(),
AuthKeyC :: snmp_user_based_sm_mib:key_change(),
OwnAuthKeyC ::
snmp_user_based_sm_mib:key_change(),
PrivP :: snmp_user_based_sm_mib:priv_protocol(),
PrivKeyC :: snmp_user_based_sm_mib:key_change(),
OwnPrivKeyC ::
snmp_user_based_sm_mib:key_change(),
Public :: snmp_user_based_sm_mib:public(),
AuthKey :: snmp_user_based_sm_mib:auth_key(),
PrivKey :: snmp_user_based_sm_mib:priv_key(),
UsmEntry :: usm_entry().
Making an entry for the agent usm config file, usm.conf. π
Security data for USM β go read it, it's giving reference material. β
πΊ vacm_acc_entry
vacm_acc_entry(GroupName, Prefix, SecModel, SecLevel, Match, RV,
WV, NV) ->
VacmAccEntry
when
GroupName ::
snmp_framework_mib:admin_string(),
Prefix ::
snmp_view_based_acm_mib:context_prefix(),
SecModel ::
snmp_framework_mib:security_model(),
SecLevel ::
snmp_framework_mib:security_level(),
Match ::
snmp_view_based_acm_mib:context_match(),
RV :: snmp_framework_mib:admin_string(),
WV :: snmp_framework_mib:admin_string(),
NV :: snmp_framework_mib:admin_string(),
VacmAccEntry :: vacm_acc_entry().
Making an (access) entry for the agent vacm config file, vacm.conf. π
MIB Views for VACM for the details, obviously. π
π¦ vacm_s2g_entry
vacm_s2g_entry(SecModel, SecName, GroupName) -> VacmS2GEntry
when
SecModel ::
snmp_framework_mib:security_model(),
SecName ::
snmp_view_based_acm_mib:security_name(),
GroupName ::
snmp_framework_mib:admin_string(),
VacmS2GEntry :: vacm_s2g_entry().
Making a (security to group) entry for the agent vacm config file, vacm.conf. πΈ
MIB Views for VACM β yeah you know where to look at this point. π«Ά
β¨ vacm_vtf_entry(ViewName, ViewSubtree) -> VacmVtfEntry β¨
vacm_vtf_entry(ViewName, ViewSubtree) -> VacmVtfEntry
when
ViewName ::
snmp_framework_mib:admin_string(),
ViewSubtree :: snmp:oid(),
VacmVtfEntry :: VacmVtfEntry.
okay bestie, this one builds you an (view tree family) entry for the agent vacm config file, vacm.conf π
and the way that vacm_vtf_entry/2 is literally just a shortcut for this call, no cap:
vacm_vtf_entry(ViewIndex, ViewSubtree, included, null).
for the full tea, go peek at MIB Views for VACM π«Ά
β¨ vacm_vtf_entry(ViewName, ViewSubtree, ViewType, ViewMask) -> VacmVtfEntry β¨
vacm_vtf_entry(ViewName, ViewSubtree, ViewType, ViewMask) ->
VacmVtfEntry
when
ViewName ::
snmp_framework_mib:admin_string(),
ViewSubtree :: snmp:oid(),
ViewType ::
snmp_view_based_acm_mib:view_type(),
ViewMask ::
null |
snmp_view_based_acm_mib:view_mask(),
VacmVtfEntry :: VacmVtfEntry.
same deal, cutie: makes an (view tree family) entry for the agent vacm config file, vacm.conf π β this is the version where you actually get to hand over the ViewType and ViewMask yourself π
again, MIB Views for VACM has all the details β¨
β¨ write_agent_config(Dir, Hdr, Conf) -> ok β¨
write_agent_config(Dir, Hdr, Conf) -> ok
when
Dir :: snmp:dir(),
Hdr :: string(),
Conf :: [agent_entry()].
writes the agent config to the agent config file π
Dirβ the path to the directory where to store the config file ποΈHdrβ an optional file header (heads up, this text is written to the file as is, so no funny business π)
see Agent Information for more info π
β¨ write_community_config(Dir, Hdr, Conf) -> ok β¨
write_community_config(Dir, Hdr, Conf) -> ok
when
Dir :: snmp:dir(),
Hdr :: string(),
Conf :: [community_entry()].
writes the agent community config to the agent community config file π«Ά
Dirβ the path to the directory where to store the config file ποΈHdrβ an optional file header (written to the file as is, fr fr) π
see Community for more info πΈ
β¨ write_context_config(Dir, Hdr, Conf) -> ok β¨
write_context_config(Dir, Hdr, Conf) -> ok
when
Dir :: snmp:dir(),
Hdr :: string(),
Conf :: [context_entry()].
writes the agent context config to the agent context config file π
Dirβ the path to the directory where to store the config file ποΈHdrβ an optional file header (and yes, it goes in as is) π
see Contexts for more info π
β¨ write_notify_config(Dir, Hdr, Conf) -> ok β¨
write_notify_config(Dir, Hdr, Conf) -> ok
when
Dir :: snmp:dir(),
Hdr :: string(),
Conf :: [notify_entry()].
writes the agent notify config to the agent notify config file π
Dirβ the path to the directory where to store the config file ποΈHdrβ an optional file header (copy-pasted to the file as is) π
see Notify Definitions for more info β¨
β¨ write_standard_config(Dir, Hdr, Conf) -> ok β¨
write_standard_config(Dir, Hdr, Conf) -> ok
when
Dir :: snmp:dir(),
Hdr :: string(),
Conf :: [standard_entry()].
writes the agent standard config to the agent standard config file β
Dirβ the path to the directory where to store the config file ποΈHdrβ an optional file header (written to the file as is, iykyk) π
see System Information for more info π
β¨ write_target_addr_config(Dir, Hdr, Conf) -> ok β¨
write_target_addr_config(Dir, Hdr, Conf) -> ok
when
Dir :: snmp:dir(),
Hdr :: string(),
Conf :: [target_addr_entry()].
writes the agent target_addr config to the agent target_addr config file π―
Dirβ the path to the directory where to store the config file ποΈHdrβ an optional file header (yep, straight into the file as is) π
see Target Address Definitions for more info π
β¨ write_target_params_config(Dir, Hdr, Conf) -> ok β¨
write_target_params_config(Dir, Hdr, Conf) -> ok
when
Dir :: snmp:dir(),
Hdr :: string(),
Conf :: [target_params_entry()].
writes the agent target_params config to the agent target_params config file π―
Dirβ the path to the directory where to store the config file ποΈHdrβ an optional file header (as is, bestie) π
see Target Parameters Definitions for more info π¦
β¨ write_usm_config(Dir, Hdr, Conf) -> ok β¨
write_usm_config(Dir, Hdr, Conf) -> ok
when
Dir :: snmp:dir(),
Hdr :: string(),
Conf :: [usm_entry()].
writes the agent usm config to the agent usm config file π
Dirβ the path to the directory where to store the config file ποΈHdrβ an optional file header (written as is) π
see Security data for USM for more info π₯
β¨ write_vacm_config(Dir, Hdr, Conf) -> ok β¨
write_vacm_config(Dir, Hdr, Conf) -> ok
when
Dir :: snmp:dir(),
Hdr :: string(),
Conf :: [vacm_entry()].
writes the agent vacm config to the agent vacm config file π
Dirβ the path to the directory where to store the config file ποΈHdrβ an optional file header (into the file as is, periodt) π
see MIB Views for VACM for more info β¨
and that's the whole page, bestie!! ππ this lil' manual is brought to you by Ericsson AB, from snmp 5.20.5, and it says hi as snmpa_conf(3) π go forth and config your agent, you absolute icon ππ
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms