{"id":18927963,"url":"https://github.com/openebs-archive/monitor-pv","last_synced_at":"2025-04-15T13:34:34.322Z","repository":{"id":60904855,"uuid":"245440916","full_name":"openebs-archive/monitor-pv","owner":"openebs-archive","description":"custom stats collector for OpenEBS persistent volumes","archived":false,"fork":false,"pushed_at":"2022-10-07T09:07:32.000Z","size":17,"stargazers_count":4,"open_issues_count":10,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-25T09:51:08.556Z","etag":null,"topics":["hostpath","kubernetes","monitoring","openebs","persistent-volumes","pre-alpha","prometheus-exporter","storage"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openebs-archive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-06T14:30:38.000Z","updated_at":"2024-04-29T10:26:48.000Z","dependencies_parsed_at":"2023-01-19T14:47:04.972Z","dependency_job_id":null,"html_url":"https://github.com/openebs-archive/monitor-pv","commit_stats":null,"previous_names":["openebs-archive/monitor-pv"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openebs-archive%2Fmonitor-pv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openebs-archive%2Fmonitor-pv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openebs-archive%2Fmonitor-pv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openebs-archive%2Fmonitor-pv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openebs-archive","download_url":"https://codeload.github.com/openebs-archive/monitor-pv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249080714,"owners_count":21209566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hostpath","kubernetes","monitoring","openebs","persistent-volumes","pre-alpha","prometheus-exporter","storage"],"created_at":"2024-11-08T11:21:58.164Z","updated_at":"2025-04-15T13:34:34.308Z","avatar_url":"https://github.com/openebs-archive.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# monitor-pv\ncustom stats collector for OpenEBS persistent volumes (jiva, localpv)\n\n### Pre-requisite\n- openebs (https://docs.openebs.io/)\n\n### How to use\n- Run `kubectl apply -f node-exporter-pv-metrics.yaml`\n- Verify if the pods are up and running.\n\u003cpre\u003e\n$ kubectl get pods -n openebs \nNAME                                                              READY   STATUS    RESTARTS   AGE\ncspc-operator-6c4cc7c64d-698ps                                    1/1     Running   0          6d23h\ncvc-operator-77d749c559-9phff                                     1/1     Running   0          6d23h\nmaya-apiserver-5fb947d74d-r9skp                                   1/1     Running   0          6d23h\n\u003cb\u003emonitor-pv-bvzgv                                                  2/2     Running   0          8s\nmonitor-pv-nk76b                                                  2/2     Running   0          11s\nmonitor-pv-wnvp5                                                  2/2     Running   0          8s\u003c/b\u003e\nopenebs-admission-server-6c4b4998f8-zcg9n                         1/1     Running   0          6d23h\nopenebs-localpv-provisioner-5b744fc789-5wr8d                      1/1     Running   0          6d23h\nopenebs-ndm-g474w                                                 1/1     Running   0          6d23h\nopenebs-ndm-k2nnp                                                 1/1     Running   0          6d23h\nopenebs-ndm-operator-b58c79cc5-z8zw6                              1/1     Running   1          6d23h\nopenebs-ndm-rwzrb                                                 1/1     Running   0          6d23h\nopenebs-provisioner-54d45b55db-rt5rv                              1/1     Running   0          6d23h\nopenebs-snapshot-operator-6d4f5d7688-6g7zw                        2/2     Running   0          6d23h\npvc-dd03f0ae-731c-4f78-bdbf-86485f32ab3d-ctrl-89b44f6cb-pbnmk     2/2     Running   0          40h\npvc-dd03f0ae-731c-4f78-bdbf-86485f32ab3d-rep-1-857b65c68d-qrdx9   1/1     Running   0          40h\npvc-dd03f0ae-731c-4f78-bdbf-86485f32ab3d-rep-2-58c4f54f7-m6n45    1/1     Running   0          40h\n\n\u003c/pre\u003e\n\n### How it works\nThe monitor PV daemonset pods consist of two containers i.e node-exporter and monitor-pv. The monitor-pv collects the PV size and PV utilization information \u0026 places it in a file on the shared mount. The node exporter uses its text-file collector to expose this data as metrics.\n\nIt exposes two metrics **pv_capacity_bytes** and **pv_utilization_bytes**.\n\n### Prometheus Configuration\nTo scrape the metrics in prometheus add this configuration in prometheus configuration file:\n\u003cpre\u003e\n    - job_name: 'monitor-pv'\n      kubernetes_sd_configs:\n      - role: pod\n      relabel_configs:\n      - source_labels: [__meta_kubernetes_pod_label_app]\n        regex: monitor-pv\n        action: keep\n\u003c/pre\u003e\n\nIf you want to scrape only monitor-pv metrics and drop all other node-exporter metrics use the below configuration:\n\u003cpre\u003e\n    - job_name: 'monitor-pv'\n      kubernetes_sd_configs:\n      - role: pod\n      relabel_configs:\n      - source_labels: [__meta_kubernetes_pod_label_app]\n        regex: monitor-pv\n        action: keep\n      metric_relabel_configs:\n      - source_labels: [__name__]\n        regex: '(pv_capacity_bytes|pv_utilization_bytes)'\n        action: keep\n\u003c/pre\u003e\n\n### Example:\n![monitor-pv-1](https://user-images.githubusercontent.com/29499601/81772797-67141a80-9504-11ea-901b-fe165900d60c.png)\n\n![monitor-pv-2](https://user-images.githubusercontent.com/29499601/81772848-8a3eca00-9504-11ea-8d0b-e7a572a06aef.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenebs-archive%2Fmonitor-pv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenebs-archive%2Fmonitor-pv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenebs-archive%2Fmonitor-pv/lists"}