From: claudio Date: Mon, 17 Oct 2022 15:42:19 +0000 (+0000) Subject: Document /metrics endpoint and use bgpctl show metrics as command. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fe299990964fadb241ad2336f6a9a5a9f1c3891c;p=openbsd Document /metrics endpoint and use bgpctl show metrics as command. OK tb@ --- diff --git a/usr.sbin/bgplgd/bgplgd.8 b/usr.sbin/bgplgd/bgplgd.8 index 5ee6c266ae2..5b493045479 100644 --- a/usr.sbin/bgplgd/bgplgd.8 +++ b/usr.sbin/bgplgd/bgplgd.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bgplgd.8,v 1.3 2022/07/17 10:32:45 jsg Exp $ +.\" $OpenBSD: bgplgd.8,v 1.4 2022/10/17 15:42:19 claudio Exp $ .\" .\" Copyright (c) 2021 Claudio Jeker .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: July 17 2022 $ +.Dd $Mdocdate: October 17 2022 $ .Dt BGPLGD 8 .Os .Sh NAME @@ -90,6 +90,8 @@ Unless further specified the endpoints do not take any parameters: Show the interface states. .It Pa /memory Show RIB memory statistics. +.It Pa /metrics +Output various statistics in OpenMetrics format. .It Pa /neighbors Show detailed neighbors information. The output can be limited with the following parameters: diff --git a/usr.sbin/bgplgd/bgplgd.c b/usr.sbin/bgplgd/bgplgd.c index db1278a6633..e66da1672cd 100644 --- a/usr.sbin/bgplgd/bgplgd.c +++ b/usr.sbin/bgplgd/bgplgd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgplgd.c,v 1.2 2022/10/17 13:23:31 claudio Exp $ */ +/* $OpenBSD: bgplgd.c,v 1.3 2022/10/17 15:42:19 claudio Exp $ */ /* * Copyright (c) 2020 Claudio Jeker * @@ -44,7 +44,7 @@ const struct cmd { { "/rtr", { "show", "rtr", NULL }, 0 }, { "/sets", { "show", "sets", NULL }, 0 }, { "/summary", { "show", NULL }, 0 }, - { "/metrics", { "show", "metric", NULL }, 0, 0, OMETRIC_TYPE }, + { "/metrics", { "show", "metrics", NULL }, 0, 0, OMETRIC_TYPE }, { NULL } };