Skip to main content
Back to Dev generators

Dev

Dummy Prometheus Metrics Generator

Used by developers, writers, and creators worldwide.

A dummy Prometheus metrics generator lets you produce valid exposition-format output before a real service exists. Paste the result into a mock /metrics endpoint and your Prometheus scraper, Grafana dashboards, and Alertmanager rules all behave as if a live service is running. Set a service name to namespace every metric, then choose a metric type profile — HTTP plus system, HTTP only, database, or system only. The output includes proper # HELP and # TYPE declarations, counters, gauges, histograms with correct _bucket/_count/_sum lines, and realistic label sets covering status codes, methods, and routes. No hand-crafting exposition format by trial and error.

Loading usage…

Free forever — no account required

How to use

  1. Choose your options above
  2. Click Generate
  3. Copy your result

Detailed instructions

  1. Enter your service name in the Service Name field, matching the name used in your Prometheus scrape config or app labels.
  2. Select the metric type category from the Metric Types dropdown — choose HTTP + system for a broad mix or a narrower option if you only need specific signals.
  3. Click the generate button to produce a complete block of Prometheus exposition format output in the results panel.
  4. Copy the output and paste it into a file, a mock server response, or directly into a test fixture used by your integration tests.
  5. Adjust numeric values in the copied text manually to simulate specific conditions like high error rates or latency spikes before scraping.

Use Cases

  • Serving fake /metrics from a Python HTTP server so Prometheus scrapes it during CI integration tests
  • Building Grafana dashboard panels with histogram bucket data before the real service is deployed
  • Triggering Alertmanager threshold rules during development by tweaking counter values above rate() conditions
  • Validating custom relabeling rules in a Prometheus scrape config against realistic label cardinality
  • Onboarding engineers to Prometheus by showing concrete _bucket, _count, and _sum line relationships

Tips

  • Serve the output with `npx serve` or Python's http.server and point a local Prometheus instance at it to get a real scrape cycle running in under two minutes.
  • When testing histogram-based alerts, manually edit the _bucket values so higher le buckets accumulate counts gradually — flat buckets across all le values look unrealistic to PromQL rate() calculations.
  • Use a service name like `payment_service` rather than a generic word; namespaced metric names like payment_service_http_requests_total make Grafana variable templating work without regex edits.
  • Paste the same output into two scrape targets with different instance labels to simulate a multi-replica service and test Grafana panels that aggregate with sum() by (job).
  • If you're building recording rules, generate metrics with the exact names your rules reference, then verify the rule output using promtool check rules before touching a live cluster.
  • For Alertmanager end-to-end tests, combine this generator with a webhook receiver like alertmanager-webhook-logger to confirm the full pipeline from scrape to notification fires correctly.

FAQ

how do I serve this output as a real /metrics endpoint locally

Save the generated text to a file named metrics.txt, then run `python3 -m http.server 9100` in the same directory. Add a scrape job in your Prometheus config pointing to localhost:9100/metrics.txt and it will ingest the fake data on the next scrape interval.

is the output valid enough for Prometheus client libraries to parse

Yes — the output follows the official Prometheus exposition format spec, so compliant parsers including Go's text_string_to_metric_families and the Python client's equivalent should read it without errors. If you see a parse failure, confirm your parser handles multi-line histogram and summary blocks.

what's the difference between the HTTP + system and database metric type options

HTTP + system generates request counters, latency histograms by route, and system-level gauges like CPU and memory — mirroring a typical microservice. Database only switches to query duration histograms, connection pool gauges, and error counters suited for testing dashboards built around a database exporter.