Skip to content

register Oximeter metrics for local disks#1144

Merged
ahrens merged 1 commit into
masterfrom
mahrens/local_metrics
Jun 3, 2026
Merged

register Oximeter metrics for local disks#1144
ahrens merged 1 commit into
masterfrom
mahrens/local_metrics

Conversation

@ahrens
Copy link
Copy Markdown
Contributor

@ahrens ahrens commented May 20, 2026

This will cause metrics to be reported for local disks (e.g. reads, writes, etc).

Tested by specifying a UUID in the instance spec toml file, and retrieving the metrics with curl, e.g.:

# Disk in slot 3
[block_dev.4e523bc0-cbaa-4b0e-8461-b7ebaa1053d4]
type = "file"
block_size = 4096
path = "/dev/zvol/rdsk/oxp_03/nocrypt/dump"
workers = 30

[dev.block3]
driver = "pci-nvme"
block_dev = "4e523bc0-cbaa-4b0e-8461-b7ebaa1053d4"
pci-path = "0.8.0"
$ curl http://0.0.0.0:37058/79c39656-34e2-4551-86a5-e94232bf6f06 | jq
...
  {
    "status": "ok",
    "info": [
      {
        "measurement": {
          "timestamp": "2026-05-20T18:00:42.931189546Z",
          "datum": {
            "type": "cumulative_u64",
            "datum": {
              "start_time": "2026-05-20T17:41:28.504981529Z",
              "value": 569 # <== number of read requests
            }
          }
        },
        "timeseries_name": "virtual_disk:reads", # <== metric name
        "timeseries_version": 1,
        "target": {
          "name": "virtual_disk",
          "fields": {
...
            "block_size": {
              "name": "block_size",
              "value": {
                "type": "u32",
                "value": 4096
              }
            },
            "disk_id": {
              "name": "disk_id",
              "value": {
                "type": "uuid",
                "value": "4e523bc0-cbaa-4b0e-8461-b7ebaa1053d4". # <=== matches block_dev UUID
              }
            },
...
          }
        },
        "metric": {
          "name": "reads",
          "fields": {}
        }
      },

Comment thread bin/propolis-server/src/lib/initializer.rs
@ahrens ahrens merged commit e8ad017 into master Jun 3, 2026
14 checks passed
@ahrens ahrens deleted the mahrens/local_metrics branch June 3, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants