keegancsmith / kubernetes-disk-exporter

Export kubernetes persistent volume metrics to prometheus.
MIT License
9 stars 3 forks source link

Metrics from RBD volumes are not displayed. #2

Open mobilesfinks opened 6 years ago

mobilesfinks commented 6 years ago

Hello. I try this solution to get metrics from Ceph RBD PV. But exporter cannot see them. i see just only one metrics from exporters k8snode_collector_fs_total 4 But on the node i see 18 mapped rbd device

I see in main.go path to PV mounts hardcoded https://github.com/keegancsmith/kubernetes-disk-exporter/blob/master/main.go#L79

i make fix to DS: add another hostPath to volumes

       - hostPath:
          path: /var/lib/kubelet/plugins/kubernetes.io/rbd/rbd
          type: ""
        name: rbdmounts

And mount it to gce-pd/mounts

        volumeMounts:
        - mountPath: /var/lib/kubelet/plugins/kubernetes.io/gce-pd/mounts
          name: rbdmounts
          readOnly: true

And metrics from mounted volumes appeare.

What you think about to add support to RBD PV?

keegancsmith commented 6 years ago

Yeah supporting other types sounds great to me. PR welcome :)