prometheus-query

Query Cloudflare Access-protected Prometheus and Thanos endpoints using promtool and promq.

Updated Jan 18, 2026
One-click install
npx skills add https://github.com/deloreyj/.dotfiles --skill prometheus-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prometheus-query
Source: https://github.com/deloreyj/.dotfiles/tree/main/skills/prometheus-query
Command: npx skills add https://github.com/deloreyj/.dotfiles --skill prometheus-query

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Query Prometheus and Thanos endpoints protected by Cloudflare Access using promtool and the bundled promq CLI to manage tokens, headers, and HTTP config for reliable metric queries.

Core Features & Use Cases

  • Secure access to Cloudflare-protected Prometheus/Thanos endpoints with automatic token retrieval and header formatting.
  • Manage Access tokens with promq login, token caching, and endpoint-aware header selection.
  • Execute common PromQL tasks (instant queries, range queries, label listing, and series discovery) across multiple endpoints for observability troubleshooting.
  • Use Case: Quickly verify metrics availability across global and colo-specific endpoints, list metric names, or validate access tokens for a new endpoint.

Quick Start

Run login to fetch an access token, then perform an instant query against a Prometheus or Thanos endpoint.

Frequently Asked Questions about prometheus-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Prometheus endpoints protected by Cloudflare Access?

To query Prometheus endpoints protected by Cloudflare Access, you can use promq with promtool to manage token retrieval and header formatting, allowing you to execute instant queries, range queries, and series discovery securely.

How does promq handle Cloudflare Access tokens for Thanos and Prometheus metrics?

promq handles Cloudflare Access tokens by providing a login command for fetching tokens, caching them locally, and applying endpoint-aware header selection to ensure secure and reliable metric queries against Thanos and Prometheus endpoints.

What do I need to run PromQL queries against a Cloudflare-protected endpoint?

To run PromQL queries against a Cloudflare-protected endpoint, you need promtool, cloudflared, Node.js 18 or higher, and a valid access token sourced from a promq login or environment variables.

Can I list metric names and series across multiple Prometheus endpoints?

Yes, you can list metric names and series across multiple global and colo-specific Prometheus or Thanos endpoints by executing label listing and series discovery tasks provided by the bundled promq CLI.

What is the best way to debug Cloudflare Access tokens for Prometheus observability troubleshooting?

The best way to debug Cloudflare Access tokens for Prometheus observability troubleshooting is using the promq CLI to validate access tokens, verify metrics availability, and manage endpoint-aware header selections across endpoints.

Why are my Prometheus queries failing when passing Cloudflare Access tokens manually?

Prometheus queries fail when passing Cloudflare Access tokens manually due to incorrect header formatting or token expiration, which promq solves by automating token caching, login, and endpoint-aware header selection via promtool.