Skip to main content
In this lesson we cover common Prometheus use cases: why to deploy Prometheus, how it collects metrics across environments, and how to use those metrics for alerting and performance analysis. At a high level, Prometheus scrapes instrumented HTTP /metrics endpoints and stores time series data. It can centralize metrics from multiple data centers and cloud providers, federate between Prometheus servers, and forward metrics to long‑term storage using remote_write or a remote storage adapter. Prometheus also provides a built‑in expression browser and graphing UI, but many teams pair Prometheus with Grafana for richer dashboards.
Prometheus scrapes instrumented endpoints. For multi‑datacenter deployments consider federation, remote_write, or a remote storage adapter. Use exporters (for example, node_exporter or mysqld_exporter) to expose system and application metrics for Prometheus to scrape.
You can aggregate metrics from multiple sites and present them on a single dashboard.
A network diagram titled "Use Case #1" showing West, Central, and East data centers plus an AWS cloud, each with server rack icons. Dotted arrows connect them to a central monitoring dashboard, with magnifying-glass icons over each site.
All collected metrics can be visualized together on the Prometheus UI or on a Grafana dashboard backed by Prometheus as the data source.

Use case #2: alerting on memory exhaustion

Scenario: repeated outages caused by high memory usage on the MySQL host. The operations team needs email alerts when memory usage reaches 80% so they can act before users are affected. Prometheus evaluates alerting rules and sends alerts to Alertmanager. Alertmanager handles grouping, silencing, and routing alerts to notification channels such as email, Slack, PagerDuty, or SMS. You declare alerting rules in Prometheus and configure Alertmanager to deliver notifications.
A slide titled "Usecase #2" describing that several outages occurred from high memory on a MySQL server and the operations team wants email alerts when memory reaches 80% so they can act proactively. A simple infographic below shows server racks, an 80% marker, a Prometheus icon sending a Gmail notification to an operations person.
A simple Prometheus alerting rule that fires when memory usage exceeds 80% for 5 minutes (using node_exporter metrics) looks like this:
Important: Prometheus evaluates and emits alerts defined in its alerting rules. Delivery (email, Slack, PagerDuty, SMS, etc.) is performed by Alertmanager, so be sure to configure Alertmanager routes, receivers, and inhibition rules for reliable notification.

Use case #3: correlating upload size and latency

Goal: determine at which uploaded file size application latency starts to degrade. Approach:
  • Instrument the application to expose counters for request duration and upload size (typically _sum and _count for each histogram or summary).
  • Use PromQL to compute average values (sum/count) with rate() over a chosen window.
  • Plot average upload size and average request latency on the same dashboard to identify the inflection point.
  • Optionally create recording rules for these computed metrics to make dashboards and alerts more efficient.
Example: average request latency (seconds) over 5 minutes:
Example: average uploaded file size (bytes) over 5 minutes:
You can create an alert that combines conditions — for example, fire when latency exceeds a threshold while the average upload size is above a certain value (use and/unless or comparison expressions in PromQL).
  • Prometheus scrapes metrics from instrumented applications and exporters across data centers and cloud environments.
  • Use Prometheus alerting rules together with Alertmanager for notification management (grouping, silencing, routing).
  • Use PromQL and recording rules to compute derived metrics (averages, rates) and to correlate signals such as upload size vs. latency.
  • For multi‑site and long‑term storage scenarios consider federation, remote_write, or a remote storage adapter.
  • Pair Prometheus with Grafana for advanced dashboards and visual correlation.
Use case quick reference Links and references

Watch Video