Re: ospfctl json support

2020-08-21 Thread Richard Chivers
Hi, Any chance someone could take a look at this, we have written a prometheus exporter for bgp and ospf, which we would like to share, but it relies on having this json support in place. I have re-attached the original diff. Thanks Richard On Mon, Jun 1, 2020 at 7:52 AM Richard Chivers

Re: ospfctl json support

2020-06-01 Thread Richard Chivers
Hi, Just a quick bump, wondering if someone could take a look at the diff, conscious there appears to have been a lot going on recently! I want to do some more detailed work on the json output, but would ideally get this first iteration in first. Richard On Sat, May 23, 2020 at 9:28 AM Richard

ospfctl json support

2020-05-23 Thread Richard Chivers
Hi, I have attached the first iteration of the ospf json support. Sorry about the large commit, but it had to come in one go, if we didn't want a broken implementation. I will go back and update output.c and output_json.c to remove the detail flag and instead pass through the cli parse_result as

Re: Prometheus core metrics for bgpd and ospfd approach ideas

2020-05-18 Thread Richard Chivers
Thanks for the comments, some good things to think about. Out of interest, can anyone think of some good examples of daemons which call ctl commands, just wanting to review the patterns and approach, and what is the best, best practice examples today. On Mon, 18 May 2020, 16:46 Theo de Raadt,

Prometheus core metrics for bgpd and ospfd approach ideas

2020-05-18 Thread Richard Chivers
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? Also just to say I am not

Re: ospfctl json support

2020-05-18 Thread Richard Chivers
; > - lasttype = RIB_RTR; > > - break; > > - default: > > - errx(1, "unknown route type"); > > - } > > - printf(&q

Re: ospfctl json support

2020-05-15 Thread Richard Chivers
t; On Thu, May 14, 2020 at 07:15:41PM +0100, Richard Chivers wrote: > > Shall I effectively fix issues in the original code at this stage, or only > > where I have moved and refactored? > > > > Thanks. Limit the changes to what is relative to json support. The diff is >

Re: ospfctl json support

2020-05-14 Thread Richard Chivers
a good look through and come back over the next couple of days. Shall I effectively fix issues in the original code at this stage, or only where I have moved and refactored? Cheers Rich On Thu, 14 May 2020, 18:47 Denis Fondras, wrote: > On Thu, May 14, 2020 at 05:51:58PM +0100, Richard Chiv

Re: ospfctl json support

2020-05-14 Thread Richard Chivers
rks for you. Thanks Rich On Thu, May 14, 2020 at 8:03 AM Denis Fondras wrote: > > Please provide a properly formatted diff. > > On Thu, May 14, 2020 at 07:16:31AM +0100, Richard Chivers wrote: > > Hi, > > > > I have done the work to implement ospfctl jso

Re: ospfctl json support

2020-05-14 Thread Richard Chivers
f("%llu KBit/s", baudrate / IF_Kbps(1)); + snprintf(buf, sizeof(buf), "%llu KBit/s", baudrate / IF_Kbps(1)); else - printf("%llu Bit/s", baudrate); + snprintf(buf, sizeof(buf), "%llu Bit/s", baudrate); + return (buf); } -int -show_fib_interface_msg(struct imsg *

Re: ospfctl json support

2020-05-11 Thread Richard Chivers
heers Richard > On 11 May 2020, at 13:52, Claudio Jeker wrote: > > On Mon, May 11, 2020 at 12:38:38PM +0100, Richard Chivers wrote: >> Hi, >> >> I have done some work over the last few days to implement json support >> into ospfctl following the work done

ospfctl json support

2020-05-11 Thread Richard Chivers
Hi, I have done some work over the last few days to implement json support into ospfctl following the work done recently in bgpctl. I have some queries, hoping to get some help with. The change involves a refactor of ospfctl, but reuses the recent json.c written by Claudio, that is in the

Re: JSON support for bgpctl(8)

2020-05-07 Thread Richard Chivers
Hi, Great to hear about the json support for bgpctl. Will bgpctl latest work with 6.6 bgpd, so we can compile a bgpctl_latest with the json support for testing, without upgrading the rest of bgpd on our boxes? I am tempted to have a go at an ospfctl json implementation, following your lead on