PSOrbit Configuration

Configure Prometheus

Create .yml Configuration Files

Create configuration files for each exporter under /etc/prometheus/exporters/ on the monitoring node.

MySQL Exporter Configuration

File: /etc/prometheus/exporters/mysql.yml

scrape_configs:
  - job_name: 'mysql_exporter_psorbit'
    static_configs:
      - targets:
          - psorbit-node01:9104
          - psorbit-node02:9104
          - psorbit-node03:9104
        labels:
          service_name: psorbit-pxc
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance
        regex: '([^:]+)(:[0-9]+)?'
        replacement: '${1}'

ScyllaDB Exporter Configuration

File: /etc/prometheus/exporters/scylla.yml

scrape_configs:
  - job_name: 'scylla_psorbit_cluster'
    static_configs:
      - targets:
          - psorbit-node01:9180
          - psorbit-node02:9180
          - psorbit-node03:9180
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance
        regex: '([^:]+)(:[0-9]+)?'
        replacement: '${1}'

Redpanda Exporter Configuration

File: /etc/prometheus/exporters/redpanda.yml

scrape_configs:
  - job_name: 'redpanda_psorbit_cluster_exporter'
    metrics_path: /public_metrics
    static_configs:
      - targets:
          - psorbit-node01:9644
          - psorbit-node02:9644
          - psorbit-node03:9644
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance
        regex: '([^:]+)(:[0-9]+)?'
        replacement: '${1}'

Tomcat Exporter Configuration

File: /etc/prometheus/exporters/tomcat.yml

scrape_configs:
  - job_name: 'tomcat_exporter_psorbit'
    static_configs:
      - targets:
          - psorbit-node01:9115
          - psorbit-node02:9115
          - psorbit-node03:9115
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance
        regex: '([^:]+)(:[0-9]+)?'
        replacement: '${1}'

Node Exporter Configuration

File: /etc/prometheus/exporters/node_exporter.yml

scrape_configs:
  - job_name: 'node_exporter'
    static_configs:
      - targets:
          - psorbit-node01:9200
          - psorbit-node02:9200
          - psorbit-node01:9200
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance
        regex: '([^:]+)(:[0-9]+)?'
        replacement: '${1}'

GlusterFS Exporter Configuration

File: /etc/prometheus/exporters/gluster.yml

scrape_configs:
  - job_name: 'gluster_psorbit'
    metrics_path: /metrics
    scrape_interval: 60s
    scrape_timeout: 60s
    static_configs:
      - targets:
          - psorbit-node01:9106
          - psorbit-node02:9106
          - psorbit-node03:9106
    relabel_configs:
      - source_labels: [__address__]
        target_label: instance
        regex: '([^:]+)(:[0-9]+)?'
        replacement: '${1}'

Step 4: Update Prometheus Configuration

Add the exporter .yml files to Prometheus’ main configuration file /etc/prometheus/prometheus.yaml:

scrape_configs:
  - include: '/etc/prometheus/exporters/*.yml'

Validate the configuration:

promtool check config /etc/prometheus/prometheus.yaml

Step 5: Reload Prometheus

Reload Prometheus to apply the updated configurations:

curl -X POST http://172.21.0.45:9090/-/reload

Validation

  • Access Prometheus UI at http://172.21.0.45:9090/targets.
  • Verify that all exporters are listed and their statuses are UP.