Hi, I'm using OpenBSD 7.8 and -current, and for a variety of reasons I'm
using Net-SNMPD instead of the built-in one. Previously I was
forwarding from net_snmpd using proxy to snmpd listening on localhost.
I recently discovered snmpd_metrics, which seems to do something similar
without worrying about which oids to forward.
If I add agentx to the net_snmpd config and run snmpd_metrics -d -v, it
works great and I can see all the queries. The documentation is a
little sparse, but I discovered in the initial commit message (end of
https://cvsweb.openbsd.org/log/src/libexec/snmpd/snmpd_metrics/mib.c,v)
that it needs to be run as a daemon.
Is a template available for rc.d? I can write one myself, but what user
should it run as?
I noticed if snmpd_metrics is running and net_snmpd restarts, it prints
[fd:4]: lost connection: Connection reset by peer
Failed to connect to snmpd: Permission denied
Failed to connect to snmpd: Permission denied
and never recovers. Is there a way to make snmpd_metrics "depend" on
net_snmpd so if net_ restarts it also restarts _metrics? (Or should it
be able to recover from that?)
Thanks.