Skip to main content
Version: 4.5.x

Monitoring

Local PV Rawfile exposes Prometheus metrics from the node plugin on each node. Metrics are organized at three levels: node, pool, and volume.

Enable Metrics

Metrics are enabled by default. To disable them:

metrics:
enabled: false

Metrics are exposed on port 9100 (configurable).

Configure Prometheus Scraping

Prometheus Operator (ServiceMonitor)

Enable the ServiceMonitor for automatic scraping:

metrics:
serviceMonitor:
enabled: true
interval: 1m

Apply:

helm upgrade rawfile-localpv rawfile-localpv/rawfile-localpv -n openebs \
--set metrics.serviceMonitor.enabled=true

Manual Scraping

Add a scrape job to your Prometheus configuration:

scrape_configs:
- job_name: rawfile-localpv
kubernetes_sd_configs:
- role: pod
namespaces:
names: [openebs]
relabel_configs:
- source_labels: [__meta_kubernetes_pod_label_app]
regex: rawfile-localpv-node
action: keep
- source_labels: [__address__]
target_label: __address__
replacement: $1:9100

Metrics Reference

Node-Level Metrics

MetricLabelsDescription
rawfile_remaining_capacity_bytesnodeFree capacity for new volumes on this node, excluding reserved storage

Pool-Level Metrics

MetricLabelsDescription
rawfile_pool_capacity_bytesnode, poolMaximum usable capacity of the pool
rawfile_pool_remaining_capacity_bytesnode, poolRemaining free capacity in the pool
rawfile_pool_reserved_capacity_bytesnode, poolCapacity reserved for non-pool use
rawfile_pool_backing_fs_capacity_bytesnode, poolTotal capacity of the backing filesystem
rawfile_pool_backing_fs_available_bytesnode, poolAvailable bytes on the backing filesystem
rawfile_pool_backing_fs_usage_bytesnode, poolUsed bytes on the backing filesystem
rawfile_pool_volumes_physical_bytesnode, poolPhysical disk bytes consumed by all volumes in the pool
rawfile_pool_volumes_logical_bytesnode, poolLogical (provisioned) bytes of all volumes in the pool
rawfile_pool_volume_countnode, poolNumber of volumes in the pool
rawfile_pool_infonode, pool, mode, default_poolPool metadata (labels only, value always 1)

Volume-Level Metrics

MetricLabelsDescription
rawfile_volume_used_bytesnode, volumeBytes currently used inside the volume
rawfile_volume_total_bytesnode, volumeTotal provisioned size of the volume
rawfile_volume_physical_bytesnode, volumePhysical disk bytes consumed by the volume (may differ from logical for thin or CoW volumes)
rawfile_volume_infonode, volume, pool, sparse, thin_provisionVolume metadata (labels only, value always 1)

Example PromQL Queries

Alert when a volume is more than 90% full:

rawfile_volume_used_bytes / rawfile_volume_total_bytes > 0.9

Alert when a pool has less than 10 GiB free:

rawfile_pool_remaining_capacity_bytes < 10 * 1024^3

Thin-provisioning overcommit ratio per pool:

rawfile_pool_volumes_logical_bytes / rawfile_pool_capacity_bytes

Physical vs. logical usage per pool (CoW space savings):

1 - (rawfile_pool_volumes_physical_bytes / rawfile_pool_volumes_logical_bytes)

Support

If you encounter issues or have a question, file a Github issue, or talk to us on the #openebs channel on the Kubernetes Slack server.

See Also