Sign In
Sign In

Prometheus Exporter

Updated on 11 November 2025

The Prometheus Exporter is a component that collects metrics from the operating system and databases and provides them in a format that Prometheus understands. The exporter helps monitor the state of database clusters, server load, and other important real-time information.

Exporter Setup

Exporter access details are available in the cluster control panel under the Dashboard section.

Exporter

When using public exporters, access to metrics requires basic authentication.

Example request to a public exporter:

curl -u admin:'password' -s https://dbs-exporter.hostman.com/exporter_id/service/metrics

Limitations

  • Metric collection is available only in BGP networks (Germany and the Netherlands).
  • Exporters are available on two endpoints:

    • :9100: Server metrics (e.g., load, CPU, and memory usage);

    • :9308: Database metrics.

Exporter Types

There are two types of exporters:

  • Public exporters are exposed over HTTPS and accessible via a domain name.
  • Private exporters are accessible only within a private BGP network.

 

Public exporters

Private exporters

Metric Access

Via domain name

Via IP address within the private network

Public IP required

No

No

Authentication

Basic Auth

Not required

Exporters Used

Checking Exporter Version

To find the version of a specific exporter, use the command:

curl -s http://private_IP:9308/metrics | grep '_exporter_build_info'

You’ll receive output similar to:

# HELP postgres_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which postgres_exporter was built, and the goos and goarch for the build.

# TYPE postgres_exporter_build_info gauge

postgres_exporter_build_info{branch="HEAD",goarch="amd64",goos="linux",goversion="go1.23.3",revision="a324fe37bca5193a293118b940b3df7ab3a8505c",tags="unknown",version="0.16.0"} 1

The value version="0.16.0" indicates the exporter version.

Note: The OpenSearch exporter is built manually, so it is not possible to determine its version using this command.

Example Configuration

Let’s look at configuring Prometheus on a cloud server to collect metrics from a PostgreSQL cluster.

1. Ensure Network Connectivity

Make sure that the database cluster and the cloud server are in the same private network.

2. Install Prometheus

Go to the Prometheus releases page and download the latest version. For example:

wget https://github.com/prometheus/prometheus/releases/download/v3.7.2/prometheus-3.7.2.linux-amd64.tar.gz

Extract the archive:

tar -xzf prometheus-*.tar.gz

Navigate to the directory:

cd prometheus-3.7.2.linux-amd64

3. Configure Prometheus

Open the configuration file:

nano prometheus.yml

Add the database cluster’s private IP address and ports to the scrape_configs section:

- job_name: 'linux-metrics'
  static_configs:
    - targets: ['192.168.0.5:9100']

- job_name: 'postgres-metrics'
  static_configs:
    - targets: ['192.168.0.5:9308']

Here, 192.168.0.5 is the private IP of the PostgreSQL cluster.

When using a public exporter, the scrape configuration looks as follows:

- job_name: 'postgres-public'
  scheme: https
  metrics_path: /exporter_id/service/metrics
  static_configs:
  - targets: ['dbs-exporter.hostman.com']
  basic_auth:
    username: 'admin'
  password: 'password'

To collect server metrics, use /exporter_id/node-exporter/metrics instead of /exporter_id/service/metrics.

Full configuration example:

global:
  scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
  # scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
  alertmanagers:
    - static_configs:
        - targets:
          # - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: "prometheus"

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
      - targets: ["localhost:9090"]
       # The label name is added as a label `label_name=<label_value>` to any timeseries scraped from this config.
        labels:
          app: "prometheus"
  - job_name: 'linux-metrics'
    static_configs:
      - targets: ['192.168.0.5:9100']

  - job_name: 'postgres-metrics'
    static_configs:
      - targets: ['192.168.0.5:9308']

  - job_name: 'postgres-public'
    scheme: https
  metrics_path: /exporter_id/service/metrics
    static_configs:
    - targets: ['dbs-exporter.hostman.com']
    basic_auth:
      username: 'admin'
    password: 'password'

4. Start Prometheus

Run Prometheus with the specified configuration file:

./prometheus --config.file=prometheus.yml

By default, the Prometheus web interface will be available at:

http://<cloud_server_IP>:9090

5. Check Exporter Status

In the Prometheus web interface, go to StatusTargets.

Make sure that all job_name entries are visible and have the status UP.

For a basic check, you can run the following query on the Graph tab:

up

If everything is working correctly, you’ll see all connected exporters listed with their corresponding job_name values.

Aef4c1cb 737e 4414 82fd C9acc0500161.png

Screenshot by Hostman / Prometheus
Was this page helpful?
Updated on 11 November 2025

Do you have questions,
comments, or concerns?

Our professionals are available to assist you at any moment,
whether you need help or are just unsure of where to start.
Email us
Hostman's Support