Repository navigation
Prometheus configuration structure
This article explains the structure and key sections of the Prometheus configuration file (prometheus.yml) when scraping performance metrics from the IBM Storage Scale Bridge for Grafana (grafana-bridge).
Prometheus operates via a pull model, periodically scraping HTTP REST endpoints exposed by metric exporters. The IBM Storage Scale Bridge for Grafana acts as a Prometheus exporter by querying IBM Storage Scale performance monitoring collectors (ZIMon) and translating sensor data into standard Prometheus metrics.
The prometheus.yml file defines:
- Global engine settings (default scrape intervals, rule evaluation intervals).
- Storage engine settings (out-of-order sample handling).
- Alertmanager and rule definitions (optional alert forwarding and recording rules).
-
Scrape jobs (
scrape_configsorscrape_config_files) specifying each Storage Scale sensor endpoint, target address, authentication, TLS certificates, and scrape interval.
The global block specifies default parameters applied to all scrape jobs and alerting rules unless overridden at the job level.
global:
scrape_interval: 15s # Default scrape interval for jobs that do not set one
evaluation_interval: 15s # How frequently evaluation rules are calculated
query_log_file: /var/log/prometheus/query.log-
scrape_interval: Default scraping frequency. Bridge sensor jobs define their own specificscrape_intervalbased on their sensor collection periods, but this global value serves as a fallback. -
evaluation_interval: Evaluation frequency for alerting and recording rules. -
query_log_file: Path to the log file where Prometheus records executed queries.
storage:
tsdb:
out_of_order_time_window: 2dImportant: The
out_of_order_time_windowsetting is strongly recommended when monitoring IBM Storage Scale.Why is this needed?
- The bridge preserves original timestamps from IBM Storage Scale sensors (
honor_timestamps: true).- The bridge's own internal metrics endpoint (
/http_metrics) re-emits historical timestamped samples upon each scrape. Use thewindowparameter (in seconds, default 300) to limit this to the scrape interval.- Setting
out_of_order_time_window: 2dallows Prometheus TSDB to ingest metrics with slightly delayed or re-emitted timestamps without dropping them as out-of-order errors.
alerting:
alertmanagers:
- static_configs:
- targets: null
rule_files: null-
alertmanagers: Specifies Alertmanager instances where firing alerts are routed. If no Alertmanager is configured,targetscan be set tonullor omitted. -
rule_files: Specifies paths to YAML files containing Prometheus recording or alerting rules.
The scrape_configs section is a list of individual jobs, each targeting a specific IBM Storage Scale sensor endpoint or internal bridge metric endpoint.
Each sensor job is structured as follows:
scrape_configs:
# 1. Prometheus self-monitoring job
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
# 2. IBM Storage Scale sensor scrape job
- job_name: GPFSFilesystem
metrics_path: /metrics_gpfs_filesystem
scrape_interval: 10s
honor_timestamps: true
scheme: http
static_configs:
- targets:
- 10.0.100.11:9250
basic_auth:
username: scale_admin
password: MyStrongPassword!| Field | Description |
|---|---|
job_name |
Unique identifier for the scrape job. When scraping multiple clusters or bridge instances, append a unique suffix (e.g. GPFSFilesystem_clusterA) to prevent collisions. |
metrics_path |
HTTP REST endpoint path corresponding to the IBM Storage Scale sensor (e.g. /metrics_gpfs_filesystem, /metrics_gpfs_nsddisk, /metrics_gpfs_vfsx). |
scrape_interval |
Scrape frequency for this sensor. Calculated by the bridge as max(sensor_period, 10s) (minimum 10 seconds). |
honor_timestamps |
Must be set to true. Ensures Prometheus stores the exact timestamps provided by the Storage Scale performance monitor rather than the scrape time. |
scheme |
Protocol used to connect to the bridge (http or https). |
static_configs.targets |
List containing <bridge_ip>:<prometheus_port>. |
basic_auth |
Basic authentication credentials required by the bridge (username and password or password_file). |
tls_config |
Required when scheme: https. Specifies cert_file, key_file, and insecure_skip_verify. |
- job_name: GPFSFilesystem
metrics_path: /metrics_gpfs_filesystem
scrape_interval: 10s
honor_timestamps: true
scheme: https
tls_config:
cert_file: /etc/prometheus/certs/cert.pem
key_file: /etc/prometheus/certs/key.pem
insecure_skip_verify: true
basic_auth:
username: scale_admin
password_file: /etc/prometheus/secrets/bridge_password
static_configs:
- targets:
- 10.0.100.11:9250In modular or multi-system environments, instead of inlining all scrape jobs in prometheus.yml, you can reference external scrape configuration files:
scrape_config_files:
- /etc/prometheus/scrape_configs/*.ymlEach referenced file contains only a scrape_configs: list (generated by the bridge /scrape_configs.yml endpoint). This separates the global Prometheus server settings from cluster-specific scrape jobs.
In IBM Storage Scale, sensors collect metrics at configured periods (e.g. 1s, 5s, 10s, 30s, 300s).
- Minimum Scrape Interval (10s): High-frequency sensors (e.g., period 1s or 5s) are capped at a minimum scrape interval of 10s to prevent excessive query load on the bridge and pmcollector.
-
Longer Periods: Sensors with longer periods (e.g., 30s, 300s) use their configured period as the
scrape_interval. -
Inactive Sensors: Sensors configured with a period of
0(disabled) are omitted from the generated configuration.
Below is a complete, standalone prometheus.yml configuration monitoring an IBM Storage Scale cluster:
global:
scrape_interval: 15s
evaluation_interval: 15s
query_log_file: /var/log/prometheus/query.log
storage:
tsdb:
out_of_order_time_window: 2d
alerting:
alertmanagers:
- static_configs:
- targets: null
rule_files: null
scrape_configs:
# Prometheus self-monitoring
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
# IBM Storage Scale Sensor Scrape Jobs
- job_name: GPFSFilesystem
metrics_path: /metrics_gpfs_filesystem
scrape_interval: 10s
honor_timestamps: true
scheme: http
static_configs:
- targets:
- 10.0.100.11:9250
basic_auth:
username: scale_admin
password: MyStrongPassword!
- job_name: GPFSNSDDisk
metrics_path: /metrics_gpfs_nsddisk
scrape_interval: 10s
honor_timestamps: true
scheme: http
static_configs:
- targets:
- 10.0.100.11:9250
basic_auth:
username: scale_admin
password: MyStrongPassword!
- job_name: GPFSVFSX
metrics_path: /metrics_gpfs_vfsx
scrape_interval: 10s
honor_timestamps: true
scheme: http
static_configs:
- targets:
- 10.0.100.11:9250
basic_auth:
username: scale_admin
password: MyStrongPassword!
- job_name: GPFSNode
metrics_path: /metrics_gpfs_node
scrape_interval: 10s
honor_timestamps: true
scheme: http
static_configs:
- targets:
- 10.0.100.11:9250
basic_auth:
username: scale_admin
password: MyStrongPassword!
# Bridge Internal Metrics Jobs (Optional)
- job_name: GrafanaBridgeHttpMetrics
metrics_path: /http_metrics
params:
window: ['60'] # return only the samples of the last 60 s, matching scrape_interval
scrape_interval: 60s
honor_timestamps: true
scheme: http
static_configs:
- targets:
- 10.0.100.11:9250
basic_auth:
username: scale_admin
password: MyStrongPassword!
- job_name: GrafanaBridgeInternalStats
metrics_path: /internal_stats
scrape_interval: 60s
honor_timestamps: true
scheme: http
static_configs:
- targets:
- 10.0.100.11:9250
basic_auth:
username: scale_admin
password: MyStrongPassword!Visit the IBM Storage Scale Knowledge Center for getting more info about the latest product updates
-
- Setup classic Grafana
- Make usage of Grafana Provisioning feature
-
- Installing RedHat community-powered Grafana operator from OperatorHub
- Creating Grafana instance using the RedHat community-powered Grafana-operator
- Creating Grafana Datasorce instance from Custom Resource managed by the RedHat community powered Grafana operator
- Importing the predefined dashboard from the example dashboards collection
- Exploring Grafana WEB interface for CNSA project in a k8s OCP environment
- How to setup Grafana instance to monitor multiple IBM Storage Scale clusters running in a cloud or mixed environment
- API key authentication
- Configurable bridge settings
- CherryPy builtin HTTP server settings
- How to setup HTTPS(SSL) connection
- How to change config at runtime
- Start and stop grafana-bridge with systemd
- Configure PrometheusExporter for scraping linux sensor metrics
- Refresh IBM Storage Scale cluster configuration data cached by grafana bridge
- Accelerate the PrometheusExporter data retrieval time
- Optimize the performance of PrometheusExporter by using scrape_job params settings
- Grafana Dashboard Panel shows no metric values for a particular entity
- Missing Grafana-Operator on an OpenShift cluster
- Missing CherryPy packages
- What to do if your system is on Python < 3.8
- Grafana-bridge fails to start with Python3.8
- Grafana-bridge container time is different from a host time
- Grafana-bridge container does not return metrics for sensors restricted to a subset of nodes
- Verify that the grafana-bridge returns data as expected
- Grafana-bridge HTTP REST Api interface
- How to monitor performance of the IBM Storage Scale bridge for Grafana