automateyournetwork/netclaw/prometheus-monitoring

Claude Code and agent skill by automateyournetwork/netclaw

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Prometheus monitoring — PromQL instant/range queries, metric discovery, metadata, scrape target health, system health checks (6 tools). Use for a direct, lightweight Prometheus query with no Grafana dashboard involved: querying Prometheus metrics, checking scrape targets, investigating alert thresholds, or analyzing network device utilization trends. If the task also needs Grafana dashboards, Loki logs, alerting/OnCall, or panel rendering, use `grafana-observability` instead.

Install

npx vskill@latest install automateyournetwork/netclaw/prometheus-monitoring

SKILL.md

The same SKILL.md was published earlier as automateyournetwork/netclaw/prometheus-monitoring.

Prometheus Monitoring

MCP Server

PropertyValue
Sourcepab1it0/prometheus-mcp-server
Transportstdio (default), SSE, or HTTP
LanguagePython 3.10+
Tools6 (query, range query, list metrics, metadata, targets, health check)
AuthBasic auth (username/password), bearer token, or unauthenticated
Installpip3 install prometheus-mcp-server (PyPI)
Runprometheus-mcp-server (stdio)

How to Run

bash
# stdio mode (default — used by NetClaw)
PROMETHEUS_URL=http://prometheus:9090 prometheus-mcp-server
# HTTP transport mode
PROMETHEUS_MCP_SERVER_TRANSPORT=http PROMETHEUS_URL=http://prometheus:9090 prometheus-mcp-server
# With basic auth
PROMETHEUS_URL=http://prometheus:9090 PROMETHEUS_USERNAME=admin PROMETHEUS_PASSWORD=secret prometheus-mcp-server
# With bearer token (Grafana Cloud, Thanos, etc.)
PROMETHEUS_URL=https://prom.example.com PROMETHEUS_TOKEN=your_bearer_token prometheus-mcp-server

Environment Variables

VariableRequiredExampleDescription
PROMETHEUS_URLYeshttp://prometheus:9090Prometheus server endpoint
PROMETHEUS_USERNAMENoadminBasic auth username
PROMETHEUS_PASSWORDNochangemeBasic auth password
PROMETHEUS_TOKENNoeyJhbG...Bearer token (Grafana Cloud, Thanos, Cortex)
PROMETHEUS_URL_SSL_VERIFYNofalseDisable SSL certificate verification
PROMETHEUS_REQUEST_TIMEOUTNo30Request timeout in seconds (default: 30)
PROMETHEUS_DISABLE_LINKSNotrueDisable Prometheus UI links in responses (saves context)
ORG_IDNo1Multi-tenant organization ID (Cortex/Mimir)
PROMETHEUS_CUSTOM_HEADERSNo{"X-Custom":"val"}Additional HTTP headers as JSON
PROMETHEUS_MCP_SERVER_TRANSPORTNostdioTransport: stdio (default), http, or sse

Tools

ToolParametersWhat It Does
execute_queryquery, timeout?Execute instant PromQL query at current time
execute_range_queryquery, start, end, step, timeout?Execute PromQL range query over time interval
list_metricspage?, page_size?Browse available metric names with pagination
get_metric_metadatametric?, limit?Retrieve metric type, help text, and unit info
get_targetsnoneView scrape target details (up/down, labels, last scrape)
health_checknoneCheck Prometheus server availability and readiness

Workflow: Network Device Metric Monitoring

When checking Prometheus for network device metrics:

  1. Health check: health_check — verify Prometheus is reachable
  2. Discover metrics: list_metrics — find available SNMP/device metrics
  3. Metric metadata: get_metric_metadata(metric="ifHCInOctets") — check type and description
  4. Instant query: execute_query(query="up{job='snmp'}") — check which targets are up
  5. Range query: execute_range_query — trend analysis over time:
  • Interface traffic: rate(ifHCInOctets{instance="router1"}[5m]) * 8
  • CPU utilization: device_cpu_utilization{device="core-rtr-01"}
  • Interface errors: increase(ifInErrors{device=~".*"}[1h])
  • BGP peer state: bgp_peer_state{peer="10.1.1.2"}
  1. Scrape targets: get_targets — verify SNMP exporters and device scrape health
  2. GAIT: Record all queries in audit trail
Example: Interface Utilization Check
health_check()
list_metrics(page=1, page_size=50)
execute_query(query="rate(ifHCInOctets{device='core-rtr-01'}[5m]) * 8")
execute_range_query(query="rate(ifHCOutOctets{device='core-rtr-01'}[5m]) * 8", start="2024-01-01T00:00:00Z", end="2024-01-01T01:00:00Z", step="60s")
get_targets()

Workflow: Alert Threshold Investigation

When investigating whether metrics are crossing alert thresholds:

  1. Discover metrics: list_metrics — find the metric name
  2. Check metadata: get_metric_metadata — understand metric type (counter, gauge, histogram)
  3. Current value: execute_query — get current metric value
  4. Historical trend: execute_range_query — check trend over past 1h/6h/24h
  5. Compare targets: get_targets — check if specific exporters are down
  6. Report: Metric analysis with current value, trend direction, and recommendation

Workflow: Capacity Planning

When analyzing capacity trends for network infrastructure:

  1. Discover metrics: list_metrics — find bandwidth/utilization metrics
  2. Peak analysis: execute_range_query with max_over_time():
  • max_over_time(rate(ifHCInOctets{device="core-rtr-01",ifName="Gi0/0"}[5m])[7d:1h]) * 8
  1. 95th percentile: execute_range_query with quantile_over_time():
  • quantile_over_time(0.95, rate(ifHCInOctets{device="core-rtr-01"}[5m])[30d:1h]) * 8
  1. Growth rate: Compare weekly/monthly averages
  2. Report: Utilization summary with capacity headroom and growth projection

Integration with Other Skills

SkillIntegration
grafana-observabilityGrafana dashboards visualize Prometheus data; use Prometheus skill for direct PromQL when Grafana isn't available or for ad-hoc queries
pyats-health-checkCross-reference pyATS device health with Prometheus time-series metrics
pyats-routingCorrelate OSPF/BGP state changes with Prometheus metric timelines
gait-session-trackingRecord all Prometheus queries and findings in GAIT audit trail
te-network-monitoringPair ThousandEyes path data with Prometheus infrastructure metrics
sdwan-opsCorrelate SD-WAN vManage alarms with Prometheus device metrics
servicenow-change-workflowReference Prometheus metrics as evidence in change requests

Important Rules

  • Prefer read-only operations — all 6 tools are read-only; no Prometheus configuration changes
  • Use pagination for metric lists — list_metrics supports page and page_size to avoid large responses
  • Specify time ranges carefully — overly broad execute_range_query time ranges return large result sets
  • Disable links for context efficiency — set PROMETHEUS_DISABLE_LINKS=true to reduce response size
  • GAIT audit mandatory — record all Prometheus queries and metric analysis in audit trail
  • No secrets in queries — never embed credentials or sensitive data in PromQL expressions
  • Verify connectivity first — use health_check before running queries to confirm Prometheus is reachable

Error Handling

  • Auth fails (401/403): Check PROMETHEUS_URL, PROMETHEUS_USERNAME/PROMETHEUS_PASSWORD, or PROMETHEUS_TOKEN in ~/.openclaw/.env. Verify Prometheus allows the configured auth method.
  • Connection refused: Verify PROMETHEUS_URL is reachable. Use health_check to diagnose connectivity.
  • PromQL syntax errors: Use list_metrics and get_metric_metadata to discover valid metric names before querying.
  • Empty results: Check get_targets to verify scrape targets are up and the expected labels exist.
  • Timeout errors: Increase PROMETHEUS_REQUEST_TIMEOUT for slow queries or large result sets.
  • SSL errors: Set PROMETHEUS_URL_SSL_VERIFY=false for self-signed certificates (development only).

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
538
Repository forks
146
7-day trend score
31

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 5 Oct 2026, a month ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/automateyournetwork/netclaw/prometheus-monitoring/badge)](https://verified-skill.com/skills/automateyournetwork/netclaw/prometheus-monitoring)

Something wrong with this skill or its page? Tell us.