On Mon, May 18, 2020 at 04:16:05PM +0100, Stuart Henderson wrote:
> On 2020/05/18 15:31, Richard Chivers wrote:
> > Hi,
> > 
> > We could do with exposing certain metrics from bgpd, ospfd and pf.
> > 
> > I was considering a couple of approaches and really was just
> > interested in what would make most sense in general.
> > 
> > Has anyone else considered this at all?
> > 
> > Would this be useful to anyone else?
> 
> It would be useful.
> 
> I think the method which fits best with the rest of the system would
> be to export these via agentx -> snmpd, where possible using standard
> MIBs e.g. for BGP that would be BGP4-MIB/CISCO-BGP4-MIB.
> 
> IIRC it has been looked at a bit, but I'm not sure of the current state
> of any of it.
> 
> Data can be picked up from SNMP directly by some existing tools,
> for Prometheus it could be sent via snmp_exporter.

I'm totally torn by this. agentx support sounds great but then you realize
how complex and cumbersome it is to implement those mibs inside the
daemons (even if abstracted away there are various snmp specific getters
to be implemented which looks like a lot of code).

bgpctl show terse and show neighbor <x> terse was created to do simple
monitoring scripts. Also part of the reason for JSON support was to
provide a machine readable output for monitoring systems. I would not mind
to actually add special commands similar to terse for this.

Prometheus is a bit of a special snow-flake since it formats the metric
pages in its own special format. So you would need to write a translation
wrapper.

Last note, please do not try to directly talk to the daemons always pass
via the *ctl program. The API used between for example bgpd and bgpctl
is not public and also not stable. It requires that both tools are in
sync.

-- 
:wq Claudio

Reply via email to