# Prometheus Metrics

> Instrumenting system diagnostics, counting requests, and exporting metrics to Prometheus monitoring systems.

- Skill: `lord1egypt/prometheus-metrics` (Agent Skill)
- Install (CLI): `npx skillmds@latest add lord1egypt/prometheus-metrics`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lord1egypt/prometheus-metrics/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT license
- Author: Lord1Egypt (https://skillmd.com/u/lord1egypt)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/lord1egypt/prometheus-metrics

---


# Prometheus Metrics

## Overview
Prometheus is a free software ecosystem for monitoring and alerting, relying on pull-based timeseries ingestion.

## When to Use This Skill
Use to track system loads, latency distributions, and error rates of running web applications.

## Quick Start (with runnable code examples)

```python
from prometheus_client import start_http_server, Counter
import time

# Create a metric to track requests
REQUESTS = Counter('http_requests_total', 'Total HTTP Requests')

def process_request():
    REQUESTS.inc()

if __name__ == '__main__':
    # Start exporter server on port 8000
    start_http_server(8000)
    while True:
        process_request()
        time.sleep(1)
```

## Advanced Usage
Set up gauge metrics, summary latency buckets, custom registry setups, and alerting rules configuration.

## Key References
- [Prometheus Python Client](https://github.com/prometheus/client_python)

## Dependencies
- prometheus-client>=0.17.0

