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.

Implementation Details

  • Exporter endpoints are available only within the private network. Before using them, make sure that the Prometheus server is located in the same private network as the DBaaS cluster.

  • 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.

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.

Full configuration example:

global:
  scrape_interval: 15s # Collect metrics every 15 seconds (default is 1 minute)
  evaluation_interval: 15s # Evaluate rules every 15 seconds
alerting:
  alertmanagers:
    - static_configs:
        - targets:
          # - alertmanager:9093

rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

scrape_configs:
  - job_name: "prometheus"
    static_configs:
      - targets: ["localhost:9090"]
        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']

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

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