prometheus-docs-gen

command module
v0.0.0-...-5d2f1c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

README

Instructions

Generate an asciidoc file for the example metrics endpoint response in sample_metrics.pef For grouping purposes, a csv file with metric prefixes and the group title text to use is expected. For example:

go run ./prometheus_format.go -f sample_metrics.pef -c format_tables.csv > generated_metrics.adoc

To make it easier to keep any generated docs up to date, you may want to add a job to your CI that runs your service, scrapes metrics, generates the doc and then does a git diff to ensure the checked in doc is up to date. For example:

curl http://myservice/metrics > /tmp/metrics.pef
go run ./prometheus_format.go -f /tmp/metrics.pef -c format_tables.csv > generated_metrics.adoc
git diff --exit-code

Contributing

Feel free to open a PR with any suggested changes or features.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL