Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement DRBD monitoring #25

Closed
MalloZup opened this issue Oct 10, 2019 · 3 comments
Closed

Implement DRBD monitoring #25

MalloZup opened this issue Oct 10, 2019 · 3 comments
Assignees
Labels
WIP work in progress, don't merge

Comments

@MalloZup
Copy link
Contributor

MalloZup commented Oct 10, 2019

metric:

  1. drbd Resource:
  • ha_cluster_drbd_resource{resource_name="1-single-0", role="primary", volume="0", disk-state="uptodate", replication-state="etablished", peer-disk-state"uptodate"}

  • ha_cluster_drbd_resource{resource_name="vg2", role="secondary", volume="0", disk-state="uptodate" replication-state="etablished", peer-disk-state"uptodate"}

  • ha_cluster_drbd_resource{resource_name="vg2", role="secondary", volume="1", disk-state="outdated" replication-state="etablished", peer-disk-state"uptodate"}


drbdsetup status --json

[
{
  "name": "1-single-0",
  "node-id": 1,
  "role": "Primary",
  "suspended": false,
  "write-ordering": "flush",
  "devices": [
    {
      "volume": 0,
      "minor": 2,
      "disk-state": "UpToDate",
      "client": false,
      "quorum": true,
      "size": 409600,
      "read": 8457,
      "written": 536513,
      "al-writes": 4,
      "bm-writes": 0,
      "upper-pending": 0,
      "lower-pending": 0
    } ],
  "connections": [
    {
      "peer-node-id": 2,
      "name": "SLE15-sp1-gm-drbd1145296-node2",
      "connection-state": "Connected", 
      "congested": false,
      "peer-role": "Secondary",
      "ap-in-flight": 0,
      "rs-in-flight": 0,
      "peer_devices": [
        {
          "volume": 0,
          "replication-state": "Established",
          "peer-disk-state": "UpToDate",
          "peer-client": false,
          "resync-suspended": "no",
          "received": 8202,
          "sent": 534390,
          "out-of-sync": 0,
          "pending": 0,
          "unacked": 0,
          "has-sync-details": false,
          "has-online-verify-details": false,
          "percent-in-sync": 100.00
        } ]
    } ]
}
,```
@MalloZup MalloZup self-assigned this Oct 10, 2019
@diegoakechi
Copy link
Member

@MalloZup My suggestion is that we could split the metrics in a way where the values represent the states and the label really identify the attributes for filtering (disk, nodes, etc). For example:

# Use 0=Out of Sync, 1=UptoDate, 2=Syncing
ha_cluster_drbd_resource_disk_state{resource_name="1-single-0", role="primary", volume="0"} 1

# Use 0=Out of Sync, 1=UptoDate, 2=Syncing
ha_cluster_drbd_resource_disk_state{resource_name="1-single-0", role="primary", volume="0"} 1

ha_cluster_drbd_resource_written_bytes{resource_name="1-single-0", role="primary", volume="0" } 536513

@MalloZup
Copy link
Contributor Author

small roadmap

  1. disk_state metric as suggested

this will follow same schema as 1)
2) ha_cluster_drbd_resource_connection_state{resource_name="1-single-0", role="primary", volume="0" peer-node-id="2" peer-role="Secondary"} 1

@MalloZup MalloZup added the WIP work in progress, don't merge label Oct 11, 2019
@MalloZup
Copy link
Contributor Author

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP work in progress, don't merge
Projects
None yet
Development

No branches or pull requests

2 participants