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

Ability to get metrics about domain block size #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

aromeyer
Copy link

Add 3 metrics in order to get information about the size of domain block volumes (cover both local and ceph block (rdb) storage):

  • domain_block_info_capacity: How much storage the guest will see, in bytes
  • domain_block_info_allocation: Host storage in bytes occupied by the image, in bytes
  • domain_block_info_physical: Host physical size in bytes of the image container, in bytes

This work is just a proposal to merge here the work done in this project: https://github.com/shhui/prometheus-libvirt-exporter-1

Example of output (only for the new metrics):

libvirt_domain_block_info_allocation{domain="43f9b475",flavorName="",host="kvm01.lan",instanceId="34ff586e-fe19-416a-b409-de5fbe57af78",instanceName="",projectId="",projectName="",source_ceph_mon_host="",source_file="/data/datastore/43f9b475-0.qcow2",source_rbd="",target_device="vda",userId="",userName=""} 4.75424768e+09

libvirt_domain_block_info_capacity{domain="43f9b475",flavorName="",host="kvm01.lan",instanceId="34ff586e-fe19-416a-b409-de5fbe57af78",instanceName="",projectId="",projectName="",source_ceph_mon_host="",source_file="/data/datastore/43f9b475-0.qcow2",source_rbd="",target_device="vda",userId="",userName=""} 5.1539607552e+10

libvirt_domain_block_info_physical{domain="43f9b475",flavorName="",host="kvm01.lan",instanceId="34ff586e-fe19-416a-b409-de5fbe57af78",instanceName="",projectId="",projectName="",source_ceph_mon_host="",source_file="/data/datastore/43f9b475-0.qcow2",source_rbd="",target_device="vda",userId="",userName=""} 4.753391616e+09

I am a beginner in golang and I don't really now how to deals with dependencies.
Sorry if I did something wrong.

@rockyluke
Copy link

Hello @zhangjianweibj what do you think about this PR ? 🙏

@frittentheke
Copy link

We at @inovex did create a fork from this exporter (https://github.com/inovex/prometheus-libvirt-exporter) an reworked some aspects of the exporter (inovex/prometheus-libvirt-exporter@start_of_fork...v1.4.0).

We even submitted an issue to have prometheus-community adopt the exporter, see prometheus-community/community#50

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