Prometheus Exporters: Translating Metrics for Monitoring

A Prometheus Exporter is a translator, converting metrics from third-party systems like databases or hardware into the format Prometheus can scrape. Use one when you can't modify an app's code directly.
Why it exists
Prometheus needs metrics in a specific text-based format, served over HTTP. Many critical systems, like databases, operating systems, and hardware, don't expose metrics this way. Exporters were created to bridge this gap, allowing Prometheus to monitor systems without modifying their source code.
The mental model
An exporter is a translator sidekick. Imagine you want to know how a PostgreSQL database is performing. The database has its own internal views, but Prometheus can't read them. The PostgreSQL exporter runs alongside, queries those views, and translates the results into a /metrics endpoint that Prometheus can scrape. It's a separate, dedicated process whose only job is translation.
How it works
An exporter is a standalone application that performs a three-step loop. First, it queries the target system using its native API or protocol (e.g., SQL for a database, system calls for an OS). Second, it transforms the collected data into Prometheus metric types like counters and gauges. Third, it exposes these metrics on an HTTP endpoint, typically /metrics, for a Prometheus server to scrape at regular intervals.
When to use it
Use an exporter whenever you need to monitor a system that you cannot or should not instrument directly with a Prometheus client library. This includes third-party software (databases, message queues), operating systems (Linux, Windows), and hardware devices (network switches, storage arrays).
When not to use it
Don't use an exporter for applications you control and are actively developing. In those cases, it's better to instrument your code directly using a Prometheus client library for your language (e.g., Go, Python, Java). Direct instrumentation provides more context-rich, application-specific metrics and avoids the overhead of a separate translation process.
One canonical example
The Node Exporter is the official tool for monitoring Linux host metrics. It runs as a daemon on a server and exposes a vast array of system-level metrics, such as CPU usage, memory consumption, disk I/O, and network statistics. A Prometheus server is then configured to scrape the /metrics endpoint on the port the Node Exporter is listening on, giving you detailed visibility into the health of your machines.
Interview question
Under which scenario would using a Prometheus Exporter be the most suitable approach for metric collection?
- a.For aggregating metrics from multiple microservices that are already instrumented with Prometheus client libraries.
- b.When you need to gather highly specific, custom metrics from an application you are actively developing.
- c.To enable an application to push its metrics directly to a Prometheus server for real-time alerts.
- d.To monitor the resource usage of a Linux server without modifying its operating system code.Correct
Why? this is the answer
Prometheus Exporters are designed to translate metrics from systems you cannot or should not instrument directly, such as operating systems or third-party software. For applications you control and are actively developing, direct instrumentation with client libraries is preferred for more context-rich metrics.
Just read this? Test yourself on what you have been reading.
Read the original → prometheus.io
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on prometheus — each one lists the topics its interview covers.
See open roles