prometheus-oidc-query

Execute PromQL queries and inspect alert states on OAuth2/OIDC-protected Prometheus endpoints.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies querying Prometheus-compatible endpoints that are protected by OAuth2/OIDC, automating the process of obtaining tokens and executing queries or checking alert states.

Core Features & Use Cases

  • PromQL Queries: Execute instant PromQL queries against protected Prometheus instances.
  • Alert State Inspection: Check the status of Prometheus alerts (firing, pending, inactive).
  • OAuth2/OIDC Token Management: Handles token refresh and validation for secure API access.
  • Configuration Validation: Verifies environment variables and configuration before making network calls.
  • Use Case: You need to check the current 'firing' alerts in your Prometheus monitoring system, but the endpoint requires an OAuth2 token. This Skill can authenticate, retrieve a valid token, and then query the alerts.

Quick Start

Use the prometheus-oidc-query skill to run the PromQL query 'up' against the configured Prometheus endpoint.

Frequently Asked Questions about prometheus-oidc-query

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

FAQPage Schema
How do I query Prometheus endpoints protected by OAuth2 or OIDC?

To query Prometheus endpoints protected by OAuth2 or OIDC, you must automate token retrieval using specific environment variables for the token endpoint URL, client ID, and client secret, then pass the valid token to execute your API requests.

How can I check firing alert states on an OIDC-protected Prometheus instance?

You can check firing alert states on an OIDC-protected Prometheus instance by using scripts that handle OAuth2 token refresh and validation, allowing you to securely query the alerts API for firing, pending, or inactive statuses.

What environment variables do I need to run PromQL queries against a secured Prometheus API?

Running PromQL queries against a secured Prometheus API requires environment variables for the Prometheus URL, OAuth2 token endpoint URL, client ID, and client secret to authenticate and execute instant queries successfully.

Does this approach support automatic OAuth2 token refresh for continuous Prometheus monitoring?

Yes, this approach supports automatic OAuth2 token refresh for continuous Prometheus monitoring by validating existing tokens and retrieving new ones dynamically before executing PromQL queries or alert state checks.

Can I validate OAuth2 configuration before making network calls to a Prometheus endpoint?

Yes, you can validate OAuth2 configuration before making network calls to a Prometheus endpoint by verifying that the required environment variables for the token endpoint and client credentials are correctly set.