Dear DRBD users, version 1.3.0 of drbd-reactor might be interesting not only for the current drbd-reactor users, but also for the ones that were looking for DRBD device monitoring via SNMP.
Supporting SNMP with its different versions and capabilities (2c vs. 3) is not that trivial as the Rust library support (for all versions in a single crate) was not that great. But there is AgentX, a protocol that is standardized and which can be used between the snmpd and a subagent such as ours. While still being a horrible binary protocol from the early 2000s, it is ways easier to write a subagent talking AgentX than using SNMP directly. This resulted in a AgentX library for Rust - there has not been one so far - that supports all the PDU types and encodings the standard defines, so if you ever need that for one of your projects on the daemon or client side, this is the place to go [1]. With the new library we could write an AgentX/SNMP plugin for reactor that exposes the usual DRBD metrics. These metrics are defined in a MIB as usual [2], a user friendlier "snmptranslate" representation can be found here [3]. Users should copy the MIB to a place where their tools can find them, like ~/.snmp/mibs/ . Older LINBIT MIBs should be deleted. Then you need to configure snmpd to allow AgentX connections and allow access to the LINBIT tree. This is actually the most complicated part. It is always snmpd configuration/permissions, almost never drbd-reactor if things look correct but the tree is not accessible... A config snippet for net-snmpd as shipped in RHEL is given in [3]. Don't forget to systemctl reload/restart the snmp daemon. Adding/enabling the plugin on the host is trivial, just do a: $ drbd-reactorctl edit -t agentx agentx and save the config, there are not too many options. After that you should be able to display the tree with the usual tools: $ snmptable -m ALL -v 2c -c public $host enterprises.linbit.1.2 | less -S For further information see the MIB [2] and snmptranslate [3]. Thanks to Lars for all the snmp talk and Moritz for input/review on the agentx library and the plugin. Regards, rck Changelog: [ Roland Kammerer ] * core,events2: fix str_to_bool * core,daemon: don't start if tty * agentx: implement plugin [ Joel Colledge ] * ci: upgrade virter and vmshed versions GIT: https://github.com/LINBIT/drbd-reactor/commit/88a2350c101e8c2c75ebd7811d87ec154b7189ee TGZ: https://pkg.linbit.com//downloads/drbd/utils/drbd-reactor-1.3.0.tar.gz PPA: https://launchpad.net/~linbit/+archive/ubuntu/linbit-drbd9-stack [1] https://docs.rs/agentx/latest/agentx/index.html [2] https://github.com/LINBIT/drbd-reactor/blob/master/example/LINBIT-DRBD-MIB.mib [3] https://github.com/LINBIT/drbd-reactor/blob/master/doc/agentx.md
signature.asc
Description: PGP signature
_______________________________________________ Star us on GITHUB: https://github.com/LINBIT drbd-user mailing list drbd-user@lists.linbit.com https://lists.linbit.com/mailman/listinfo/drbd-user