/py-prometheus-metric-report

Python script to generate prometheus metric report.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

py-prometheus-metric-report

Desc

Python script to create pdf report of available metrics, their descriptions, apperance nad many others. Script uses ThreadPoolExecutor for better performance.

Requirements

pip install -r requirements.txt

Also wkhtmltopdf will be needed. More info here.

sudo apt-get install wkhtmltopdf
or
brew install caskroom/cask/wkhtmltopdf

Usage

Runtime

./py-prometheus-metric-report.py \
  -m http://prometheus.domain.com:9090 \
  -m https://thanos.domain.com

usage: py-prometheus-metric-report.py [options]

Produce Prometheus markdown documentation and based on that - pdf report.

optional arguments:
  -h, --help            show this help message and exit
  -m METRICS_ADDRESS, --metrics-address METRICS_ADDRESS
                        Prometheus API url
  --label-limiter LABEL_LIMIT
                        Label print limit in pdf
  --no-pdf              Do not generate pdf
  --pdf-only            Generate pdf file only

Use wisely..

Example

Sample page

Credits

@amadeuszkryze

@majkel94