Use it to monitor third-party software, hosts and devices.
Exporters
Exporters translate metrics from systems that don't expose Prometheus format — node_exporter, blackbox_exporter, snmp_exporter, mysqld_exporter, windows_exporter.
1. Exporter responds: curl -s localhost:9100/metrics | head.
2. Target up in Prometheus.
3. Exporter success metric (mysql_up, probe_success).
4. Credentials least privilege.
5. Version current.
system → exporter → /metrics → Prometheus scrape
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 How to verify Verify boundary
Confirm key metrics appear and change over time. Restrict access to exporter ports with a firewall.
Step 2 Common failures Narrow the fault
Exporters scraped too often load the source system. Running exporters with admin credentials is a security risk. A broken source connection may still answer /metrics with only exporter self-metrics.
Run exporters close to the system, secure their endpoints, and watch exporter-specific success metrics (e.g. probe_success, mysql_up).
curl -s localhost:9100/metrics | head— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
ReferenceWhat it is1 section · depth on demand
How it works
Exporters read the source on each scrape (or cache) and expose metrics. The SNMP exporter needs a generated module that maps MIB objects to metrics. Blackbox exporter is scraped with a target parameter.
ReferenceImportant terms & boundaries3 sections · depth on demand
Common exporters
| Exporter | Monitors | Default port |
|---|---|---|
| node_exporter | Linux hosts | 9100 |
| windows_exporter | Windows hosts | 9182 |
| blackbox_exporter | HTTP/TCP/ICMP/DNS probes | 9115 |
| snmp_exporter | Network devices | 9116 |
| postgres_exporter / mysqld_exporter | Databases | 9187 / 9104 |
| kube-state-metrics | Kubernetes objects | 8080 |
Restrict exporter ports with firewalls; many expose sensitive details. Check a target's raw output with curl http://host:9100/metrics.
In depth
Where the metric comes from
| Approach | When |
|---|---|
| Direct instrumentation (client library in your code) | Your own applications |
| Exporter next to the system | Software you cannot change: databases, proxies, hardware |
Built-in /metrics endpoint | Many modern tools (Kubernetes components, Traefik, etcd, CoreDNS) |
| Pushgateway | Only for short batch jobs that end before a scrape |
Running exporters well
| Concern | Practice |
|---|---|
| Placement | One exporter per instance, next to it (sidecar or same host); the target label then identifies the instance |
| Credentials | Read-only monitoring account (pg_monitor, MySQL PROCESS, REPLICATION CLIENT, SELECT on performance_schema) |
| Access | Firewall the exporter port, or require TLS/basic auth with the exporter-toolkit --web.config.file |
| Scrape cost | Some collectors run expensive queries; disable what you do not use and keep the interval sensible |
| Health | Most exporters expose an …_up metric for the backend (for example pg_up, mysql_up) — alert on it separately from up |
up == 1 only says the exporter answered; pg_up == 0 says the exporter is fine but cannot reach the database.
The multi-target pattern
The SNMP and blackbox exporters probe other targets. Prometheus passes the real target as a parameter and relabels the address to the exporter:
- job_name: snmp
static_configs: [{ targets: [sw1.example.net, sw2.example.net] }]
metrics_path: /snmp
params: { module: [if_mib], auth: [public_v3] }
relabel_configs:
- { source_labels: [__address__], target_label: __param_target }
- { source_labels: [__param_target], target_label: instance }
- { target_label: __address__, replacement: snmp-exporter:9116 }
Custom metrics without a new exporter
node_exporter's textfile collector reads *.prom files from a directory: a cron job can write backup_last_success_timestamp_seconds 1795770843 and Prometheus scrapes it with the host metrics. Write to a temp file and rename it, so a half-written file is never read.
Common mistakes
- Exporters exposing data without authentication.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.