Simple Network Management Protocol (SNMP) for monitoring

Written by hannes
Published: 2018-01-05 (last updated: 2018-02-15)

MirageOS 3 uses logging (via the logs library, exfiltrating on console or via syslog). But there is no monitoring solution for MirageOS.

From an abstract view, a small library for MirageOS, which lets device and protocol implementors describe counter and gauge names and values (independent of the wire format) together with libraries transforming these values into specific wire formats (SNMP, munin, json, mrtg, prometheus (OCaml library), ..) would fit well into MirageOS. This allows a device or protocol implementor to describe data, but the operator to decide whether and how to use the data.

Both the small library and extending wire format support with SNMP would be nice to have for MirageOS. Both libraries should be lightweight (effect-free, minimal dependencies) developed purely in OCaml with a reasonable sized test suite and fuzz-based testing.

The SNMP library on its own could come with some demonstration samples, such as snmpwalk.

The asn1-combinators library is a good start for SNMP marshalling.

An extension for SNMP is to use a TLS transport (in RFC 6353), which is useful for an open environment and for setting configuration values after successful authentication.

If you're interested in starting this project, please drop a mail to or mail hannes directly.