prom: basic builtin prometheus stats exporter

This is a vpp builtin alternative, not a replacement, for the existing
vpp_prometheus_exporter.

The plugin works by registering with http_static as a url handler for
stats.prom and handles requests by scraping the stats segment in the
main thread. It will therefore consume vpp process cpu cycles.

By default the plugin is disabled. To enable, first start the http
static server an then use "prom enable" cli.

Type: feature

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: If6888e965d1b2361f6a5546586068213d37079d1
This commit is contained in:
Florin Coras
2022-01-31 16:16:13 -08:00
parent c556fa49b4
commit 7285be2aab
7 changed files with 662 additions and 0 deletions

417
src/plugins/prom/prom.c Normal file

File diff suppressed because it is too large Load Diff