Mib generation

Nyirő Gergő gergo.nyiro@REDACTED
Tue Mar 10 22:34:25 CET 2020


Thanks for the advice. It made me think to get the mib file granted
and describe the systemd services and their oids in a separated
config,
so I only have to validate that the mib contains the required oid with
a proper type.
In this way the monitored systemd service can be renamed without any
change on the exposed mib file.

--
Gergo

On Tue, Mar 10, 2020 at 10:40 AM Dániel Szoboszlay
<dszoboszlay@REDACTED> wrote:
>
> Hi,
>
> I don't think there would be much tooling in Erlang for generating MIBs on the fly. I guess the standard way of solving this kind of problem is to write (manually) a static MIB that lists all dynamic information in tables. E.g. you could create a service status table where the key is the service name, and there are columns for each property to show about a service. Or, if there are dynamic properties, you could put them into a second table keyed with the service name and the property name (just like how you would store the data in a SQL DB).
>
> If you'd like to generate the MIB on the fly, you'd probably have to write the code for that on your own. But it doesn't seem to be very hard to do on top of some templating library like ErlyDTL or Mustache.
>
> Cheers,
> Daniel
>
>
> On Mon, 9 Mar 2020 at 23:18, Nyirő Gergő <gergo.nyiro@REDACTED> wrote:
>>
>> Dear list,
>>
>> I try to write a simple snmp agent, which could expose the status of the registered systemd services.
>>
>> The application config would contain a map of the required service name to the exported oids. I would like to generate a mib file from this oid list.
>>
>> Parsing a mib file seams an easy task in erlang, but I didn't find example for generating mib file.
>> Does anyone have any experience with mib generation with erlang?
>>
>> Thanks for any advice in advance,
>> Gergo


More information about the erlang-questions mailing list