Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/onbjerg/promg

A small CLI tool to create a plot from a Prometheus query
https://github.com/onbjerg/promg

cli prometheus tool

Last synced: 4 months ago
JSON representation

A small CLI tool to create a plot from a Prometheus query

Awesome Lists containing this project

README

        

## promg

A small CLI tool to create a plot from a [Prometheus range query][prom-range-query].

### Usage

```
Generate a plot from a Prometheus range query

Usage: promg [OPTIONS] --query

Options:
-e, --endpoint
The Prometheus server endpoint

[default: http://localhost:9090]

--start
The start of the query range (UNIX timestamp)

Defaults to 24 hours ago.

[default: 1672122016]

--end
The end of the query range (UNIX timestamp)

Defaults to now.

[default: 1672208416]

--step
The range query step (in seconds)

[default: 60]

-t, --title
The title of the plot.

Multiple titles can be specified by passing the flag multiple times.

The number of titles must match the number of queries.

--live
Open the plot in the browser and live-reload it

--html
Write the plot as embeddable HTML to stdout

-q, --query
The Prometheus range query.

Multiple queries can be specified by passing the flag multiple times.

The number of titles must match the number of queries.

-h, --help
Print help information (use `-h` for a summary)
```

[prom-range-query]: https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries