{"id":19308719,"url":"https://github.com/mtulio/prometheus-cli","last_synced_at":"2025-08-30T02:02:52.369Z","repository":{"id":89055504,"uuid":"174855308","full_name":"mtulio/prometheus-cli","owner":"mtulio","description":"Prometheus Command Line Interface to interact with Prometheus API ","archived":false,"fork":false,"pushed_at":"2019-03-24T03:20:58.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-24T03:17:44.314Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mtulio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-10T17:14:28.000Z","updated_at":"2019-03-24T03:21:00.000Z","dependencies_parsed_at":"2023-06-13T17:53:45.766Z","dependency_job_id":null,"html_url":"https://github.com/mtulio/prometheus-cli","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mtulio/prometheus-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fprometheus-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fprometheus-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fprometheus-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fprometheus-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtulio","download_url":"https://codeload.github.com/mtulio/prometheus-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtulio%2Fprometheus-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272793017,"owners_count":24993830,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-10T00:16:15.482Z","updated_at":"2025-08-30T02:02:51.349Z","avatar_url":"https://github.com/mtulio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prometheus-cli\n\nPrometheus Command Line Interface to interact with [Prometheus API](https://prometheus.io/docs/prometheus/latest/querying/api/).\n\n\n## USAGE\n\n[Series Documentation reference](https://prometheus.io/docs/prometheus/latest/querying/api/#querying-metadata) to understand the API usage.\n\n### SERIES Query\n\n* Show all series for an query\n\n```bash\n$ PROMETHEUS_API_URL=http://prometheus.internal:9090 \\\n    ./bin/prometheus-cli \\\n        -query=go_info \\\n        -start=\"2018-06-01T20:10:30.781Z\" \\\n        -end=\"2018-12-31T00:00:00.000Z\" \\\n        -verbose \\\n        series\n```\n\n### SERIES Removal\n\n* Delete specific series.\n\n\u003e Eg. deleting series `go_info`.\n\n```bash\n$ PROMETHEUS_API_URL=http://prometheus.internal:9090 \\\n    ./bin/prometheus-cli \\\n        -match=go_info \\\n        -time.start=\"2018-09-02T00:00:00.000Z\" \\\n        -time.end=\"2018-09-02T23:59:59.999Z\" \\\n        -verbose \\\n        -force \\\n        delete\n```\n\n* Delete all series on time range.\n\n\u003e E.g. lookup by `__name__` (\"all metrics\") series, deletem them on specific `start` and `end`.\n\n\u003e WARNING: We don't responsible for the data loss.\n\n```bash\n$ PROMETHEUS_API_URL=http://prometheus.internal:9090 \\\n    ./bin/prometheus-cli \\\n        -time.start=\"2018-09-02T00:00:00.000Z\" \\\n        -time.end=\"2018-09-02T23:59:59.999Z\" \\\n        -verbose \\\n        -query='{__name__}' \\\n        delete-batch\n```\n\n### LABELS Query\n\n* List Label - metric name\n\n```bash\n$ PROMETHEUS_API_URL=http://prometheus.internal:9090 \\\n    ./bin/prometheus-cli \\\n        -verbose \\\n        -query=__name__ \\\n        label\n```\n\n* List Label - instance\n\n```bash\n$ PROMETHEUS_API_URL=http://prometheus.internal:9090 \\\n    ./bin/prometheus-cli \\\n        -query=instance \\\n        -verbose \\\n        label\n```\n\n\n## CONTRIBUTING\n\nFeel free to contributing opening an Issue or an PR. =)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtulio%2Fprometheus-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtulio%2Fprometheus-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtulio%2Fprometheus-cli/lists"}