snmp_notification_mib(3)
π snmp_notification_mib β the Erlang module definition, bestie π
okay so this is snmp_notification_mib(3), an Erlang module definition, and no cap it's genuinely iconic once you get what it does.
β¨ NAME β¨
snmp_notification_mib β the instrumentation functions for SNMP-NOTIFICATION-MIB πΈ
π¦ DESCRIPTION π¦
so the module snmp_notification_mib is out here implementing the instrumentation functions for the SNMP-NOTIFICATION-MIB, plus the functions you need to configure the database. it's giving backend main character energy fr fr.
the configuration files? they're described in the SNMP User's Manual, so go check that for the full tea π«
π DATA TYPES π
notify_name()::snmp_framework_mib:admin_string(). which is anSnmpAdminStringwithSIZE(1..32)β so like, one to thirty-two characters, keep it cute and short bestie.notify_tag()::snmp_target_mib:tag_value().notify_type()::trap | inform. literally just these two options, that's it, that's the vibe.
π FUNCTIONS π
add_notify(Name, Tag, Type) -> {ok, Key} | {error, Reason}
with the types, exactly like this:
when
Name :: notify_name(),
Tag :: notify_tag(),
Type :: notify_type(),
Key :: term(),
Reason :: term().
adds a notify definition to the agent config. it's equivalent to writing exactly one line in the notify.conf file. slay π
configure(ConfDir) -> snmp:void()
when ConfDir :: string().
this function gets called from the supervisor at system start-up β the supervisor is the one knocking on the door, not you.
it inserts all the data in the configuration files into the database, and it destroys all old rows with StorageType volatile. the rows created from the configuration file will have StorageType nonVolatile. periodt.
if an error is found in the configuration file, it's reported using the function config_err/2 of the error report module, and the function fails with reason configuration_error. π
ConfDir is a string which points to the directory where the configuration files are found.
the configuration file read is: notify.conf. π
delete_notify(Key) -> ok | {error, Reason}
when Key :: term(), Reason :: term().
deletes a notify definition from the agent config. bye boo πβ¨
reconfigure(ConfDir) -> snmp:void()
when ConfDir :: string().
inserts all the 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. okay so yeah, it really does wipe the nonVolatile ones too, that's not a typo, that's the whole point. π«Ά
thus, the data in the SNMP-NOTIFICATION-MIB, after this function has been called, is from the configuration files. so fresh, so clean.
if an error is found in the configuration file, it's reported using the function config_err/2 of the error report module, and the function fails with reason configuration_error. π
ConfDir is a string which points to the directory where the configuration files are found.
the configuration file read is: notify.conf. π
heads up bestie: bothconfigure/1andreconfigure/1will fail with reasonconfiguration_errorif the config file has a problem, andreconfigure/1is the one that nukesnonVolatilerows too. read twice, run once. π
and that's the whole page, no cap. brought to you by Ericsson AB, version snmp 5.20.5, and this lil page is literally named snmp_notification_mib(3). mwah π go configure something iconic β¨π
π¦ 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