prometheus
Installation
SKILL.md
Prometheus Querying
Setup
Prometheus and Alertmanager are behind OAuth2 Proxy on the internal gateway. DNS URLs (https://prometheus.internal.tomnowak.work) redirect to an OAuth login page and cannot be used for API queries via curl.
Access Methods
Option 1: kubectl exec (quick, no setup)
# Query Prometheus API directly inside the pod
kubectl --context <cluster> exec -n monitoring prometheus-kube-prometheus-stack-0 -c prometheus -- \
wget -qO- 'http://localhost:9090/api/v1/query?query=up' | jq '.data.result'
# Query Alertmanager API
kubectl --context <cluster> exec -n monitoring alertmanager-kube-prometheus-stack-0 -c alertmanager -- \
wget -qO- 'http://localhost:9093/api/v2/alerts' | jq .
Related skills