{"id":13610925,"url":"https://github.com/ContainerSolutions/prom-metrics-check","last_synced_at":"2025-04-13T01:33:36.414Z","repository":{"id":45938170,"uuid":"274149251","full_name":"ContainerSolutions/prom-metrics-check","owner":"ContainerSolutions","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-26T21:02:28.000Z","size":55,"stargazers_count":63,"open_issues_count":1,"forks_count":6,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-11-05T15:09:42.762Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ContainerSolutions.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null}},"created_at":"2020-06-22T13:46:53.000Z","updated_at":"2024-09-15T17:01:53.000Z","dependencies_parsed_at":"2023-01-31T01:45:25.965Z","dependency_job_id":null,"html_url":"https://github.com/ContainerSolutions/prom-metrics-check","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContainerSolutions%2Fprom-metrics-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContainerSolutions%2Fprom-metrics-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContainerSolutions%2Fprom-metrics-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ContainerSolutions%2Fprom-metrics-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ContainerSolutions","download_url":"https://codeload.github.com/ContainerSolutions/prom-metrics-check/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223558409,"owners_count":17165124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T19:01:49.505Z","updated_at":"2024-11-07T17:30:53.881Z","avatar_url":"https://github.com/ContainerSolutions.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# prom-metrics-check\n\n`prom-metrics-check` is a command line tools which helps checking metrics between dashboards of grafana and prometheus metrics.\n\nIf you download external dashboards to your grafana instance (eg. https://github.com/kubernetes-monitoring/kubernetes-mixin)\nyou are not 100% sure that all queries used in dashboard work with your prometheus instance. This tool looking for in any\ndashboard all queries, then it extracts only metrics and check that all used metrics exist in your prometheus instance.\n\n* Free software: MIT license\n* Repository: https://github.com/ContainerSolutions/prom-metrics-check/\n* DockerHub: containersol/prom-metrics-check:latest\n\n## Features\n\n* Connect via API to Grafana and get all metrics which are use in any dashboards\n* Connect via API to Prometheus and check exist metrics\n\n\n## Installation\n\n### Stable release\n\nTo install prom-metrics-check, run this command directly from repository:\n\n\n    $ pip install git+https://github.com/ContainerSolutions/prom-metrics-check.git\n\n\nThis is the preferred method to install prom-metrics-check, as it will always install the most recent stable release.\n\nIf you don't have [pip] installed, this [Python installation guide] can guide\nyou through the process.\n\n[pip]: https://pip.pypa.io\n[Python installation guide]: http://docs.python-guide.org/en/latest/starting/installation/\n\n\n### From sources\n\nThe sources for prom-metrics-check can be downloaded from the [Github repo].\n\nYou can either clone the public repository:\n\n\n    $ git clone git://github.com/ContainerSolutions/prom-metrics-check\n\nOr download the [tarball]:\n\n\n    $ curl -OJL https://github.com/ContainerSolutions/prom-metrics-check/tarball/master\n\nOnce you have a copy of the source, you can install it with:\n\n\n    $ python setup.py install\n\n[Github repo]: https://github.com/ContainerSolutions/prom-metrics-check\n[tarball]: https://github.com/ContainerSolutions/prom-metrics-check/tarball/master\n\n\n## Usage\n\nTo use this tool locally, you will need to create port-forwards for your grafana and prometheus services.\n\n\n    $ kubectl port-forward svc/grafana 3000:80\n    $ kubectl port-forward svc/prometheus 9090:9090\n\nAlso, if you use an API key for Grafana you should set it in you environment.\n\n\n    $ export GRAFANA_KEY=...\n\nNow you should be able to run the following script:\n\n\n    $ prom-metrics-check\n\nTo see more arguments, run the script with the `--help` flag.\n\n\n    $ prom-metrics-check --help\n\n## Work with Docker\n\n### Build Docker Image\n\nIf you want to build the Docker image, run: `make docker-build`\n\n### Run Docker\n\nTo run this container locally, use the `--net=host` flag.\n\nThe Makefile can also help running Docker images.\n\nIf you download this repository on Linux, you should be able to run the container with: \n\n    ARGS=\"--grafana-url=http://localhost:3000 --prometheus-urls=http://localhost:9090 --grafana-key=xyz=\" make docker-run\n\non MacOS the command is slightly differnt:\n\n    ARGS=\"--grafana-url=http://host.docker.internal:3000 --prometheus-urls=http://host.docker.internal:9090 --grafana-key=xyz=\" make docker-run\n\nIf you need to run Docker from scratch you should use a different command.\n\n#### Linux\n\n    $ 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\n\n#### MacOS\n\n    $ 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\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FContainerSolutions%2Fprom-metrics-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FContainerSolutions%2Fprom-metrics-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FContainerSolutions%2Fprom-metrics-check/lists"}