A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ContainerSolutions/prom-metrics-check below:

GitHub - ContainerSolutions/prom-metrics-check

prom-metrics-check is a command line tools which helps checking metrics between dashboards of grafana and prometheus metrics.

If you download external dashboards to your grafana instance (eg. https://github.com/kubernetes-monitoring/kubernetes-mixin) you are not 100% sure that all queries used in dashboard work with your prometheus instance. This tool looking for in any dashboard all queries, then it extracts only metrics and check that all used metrics exist in your prometheus instance.

To install prom-metrics-check, run this command directly from repository:

$ pip install git+https://github.com/ContainerSolutions/prom-metrics-check.git

This is the preferred method to install prom-metrics-check, as it will always install the most recent stable release.

If you don't have pip installed, this Python installation guide can guide you through the process.

The sources for prom-metrics-check can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git://github.com/ContainerSolutions/prom-metrics-check

Or download the tarball:

$ curl -OJL https://github.com/ContainerSolutions/prom-metrics-check/tarball/master

Once you have a copy of the source, you can install it with:

$ python setup.py install

To use this tool locally, you will need to create port-forwards for your grafana and prometheus services.

$ kubectl port-forward svc/grafana 3000:80
$ kubectl port-forward svc/prometheus 9090:9090

Also, if you use an API key for Grafana you should set it in you environment.

Now you should be able to run the following script:

To see more arguments, run the script with the --help flag.

$ prom-metrics-check --help

If you want to build the Docker image, run: make docker-build

To run this container locally, use the --net=host flag.

The Makefile can also help running Docker images.

If you download this repository on Linux, you should be able to run the container with:

ARGS="--grafana-url=http://localhost:3000 --prometheus-urls=http://localhost:9090 --grafana-key=xyz=" make docker-run

on MacOS the command is slightly differnt:

ARGS="--grafana-url=http://host.docker.internal:3000 --prometheus-urls=http://host.docker.internal:9090 --grafana-key=xyz=" make docker-run

If you need to run Docker from scratch you should use a different command.

$ docker run --net=host --rm -e GRAFANA_URL=http://localhost:3000 -e PROMETHEUS_URLS=http://localhost:9090 -e GRAFANA_KEY=xyz containersol/prom-metrics-check:latest
$ docker run --net=host --rm -e GRAFANA_URL=http://host.docker.internal:3000 -e PROMETHEUS_URLS=http://host.docker.internal:9090 -e GRAFANA_KEY=xyz containersol/prom-metrics-check:latest

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4