Day 40 of 90 Days of DevOps: Prometheus Exporters Demystified

Vaishnavi DVaishnavi D
4 min read

Yesterday on Day 39, I explored the architecture of Prometheus, understanding how it scrapes metrics using a pull model and stores them efficiently in a Time Series Database (TSDB). That foundation gave me the right context to appreciate today’s topic even more.

Today, I dived into one of the most critical components of Prometheus-based monitoring: Exporters.

What is a Prometheus Exporter?

An exporter is a lightweight agent or service that collects metrics from a system or application and exposes them in Prometheus’ required format (/metrics endpoint). Prometheus can then scrape these metrics at regular intervals and store them for querying and alerting.

Exporters are essential when monitoring:

  • Host systems

  • Databases (like MySQL, PostgreSQL)

  • Applications

  • Hardware components

  • Network endpoints.

How Do Exporters Work?

Here's a simplified breakdown of the flow:

  1. The exporter collects metrics from a target system (e.g., a Linux OS, MySQL database, or an API).

  2. It transforms the collected metrics into the Prometheus exposition format.

  3. It exposes those metrics on a /metrics HTTP endpoint.

  4. Prometheus scrapes the /metrics endpoint on a regular schedule.

  5. Prometheus stores the scraped metrics in its Time Series Database (TSDB).

Categories of Exporters

Exporters can be classified based on what they monitor:

1. System Exporters

EXPORTERWHAT IT MONITORS
Node ExporterHost metrics (CPU, memory, disk, load average, etc.)
Windows ExporterSystem metrics on Windows OS
IPMI ExporterHardware-level metrics like fan speed, temperatures

2. Application Exporters

EXPORTERWHAT IT MONITORS
MySQL ExporterDB metrics like query performance, uptime, connections
Postgres ExporterPostgreSQL query stats, cache hit ratio, locks
Redis ExporterMemory usage, cache hits/misses
JMX ExporterJVM-based applications (Tomcat, Kafka, Cassandra)

3. Container & Cloud Exporters

EXPORTER

WHAT IT MONITORS

cAdvisor

Container resource usage and lifecycle events

Kube-State-Metrics

Kubernetes object states (Pod status, Deployments, etc.)

EC2 Exporter / CloudWatch Exporter

AWS resources like EC2, RDS, S3 metrics

4. Network & Endpoint Exporters

EXPORTERWHAT IT MONITORS
Blackbox ExporterProbes HTTP, HTTPS, TCP, ICMP endpoints
SNMP ExporterCollects SNMP metrics from routers, switches
Netdata ExporterExposes advanced Linux performance metrics

Real-Life Use Case: Monitoring a Web App Stack

Let's say you have a cloud-native application hosted on Kubernetes:

  • Use Node Exporter for host metrics.

  • Use Kube-State-Metrics to monitor the health of K8s objects.

  • Use cAdvisor for container-level metrics.

  • Use Blackbox Exporter to test HTTP endpoints (health checks).

  • Use MySQL Exporter to monitor your database performance.

This combination gives you full-stack observability.

Installing an Exporter (Example: Node Exporter)

You can run Node Exporter as a container or binary.

Using Docker:

docker run -d -p 9100:9100 \
  --name node_exporter \
  prom/node-exporter

On Kubernetes (via Prometheus Operator):

kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/kube-prometheus/main/manifests/node-exporter-serviceMonitor.yaml

Ensure Prometheus is configured to scrape this endpoint. If you're using the Prometheus Operator, ServiceMonitor, or PodMonitor resources, these handle this automatically.

Key Concepts Around Exporters

Prometheus Exposition Format

Metrics are exposed in a simple text format. Example:

# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 3.5e-05

Labels for Context

Exporters often attach labels to metrics:

node_cpu_seconds_total{cpu="0", mode="idle"} 12345.67

These helps filter and analyze data in PromQL queries.

Best Practices

  1. Use dedicated exporters instead of building metrics manually.

  2. Keep exporters updated to ensure metric compatibility.

  3. Secure your endpoints using firewalls, authentication, or TLS.

  4. Don’t expose exporters to internet scraping internally.

  5. Use ServiceMonitor or PodMonitor when working with the Prometheus Operator in Kubernetes. In the world of observability, not every system exposes metrics in a format that Prometheus understands out of the box. That’s where Exporters come in.

Final Thoughts

Exporters are the unsung heroes of Prometheus monitoring. Without them, Prometheus would have no data to ingest from non-native sources.

By integrating the right exporters in your stack, you get complete observability into infrastructure, applications, databases, containers, and networks. Whether you're running a microservices architecture on Kubernetes or managing a legacy monolith, exporters bridge the gap between your systems and Prometheus.

Thanks for Reading. stay Tuned for tomorrows update

0
Subscribe to my newsletter

Read articles from Vaishnavi D directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Vaishnavi D
Vaishnavi D