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

Collect hard disk information #155

Closed
wants to merge 2 commits into from
Closed

Collect hard disk information #155

wants to merge 2 commits into from

Conversation

DeerMaximum
Copy link

This pr adds the ability to collect hard disk information.

Lables:

  • serial
  • health
  • devpath
  • size
  • type
  • node

Example:

# HELP pve_disk_info Disk info
# TYPE pve_disk_info gauge
pve_disk_info{devpath="/dev/nvme0n1",health="PASSED",node="hl-cl2",serial="S64*****",size="500107862016",type="nvme"} 1.0
pve_disk_info{devpath="/dev/sda",health="PASSED",node="hl-cl2",serial="S6P*****",size="500107862016",type="ssd"} 1.0

@znerol
Copy link
Member

znerol commented Aug 1, 2023

Thanks for taking the time to file a PR.

Unfortunately scraping configuration has turned out to be inherently inefficient (see #55 and #58). Especially for big and growing deployments, this can get nasty quite quickly. In fact I intend to disable the config collector by default in an upcoming release (i.e., --no-collector.config).

This PR is using the exact same known-to-be-faulty mechanism to collect the desired data. To make matters worse, the problematic loop would be running twice after that PR landed and as a result the time to collect all metrics will double for many users.

See the comments in #115 for alternative ideas on how to scrape config efficiently.

@znerol
Copy link
Member

znerol commented Aug 2, 2023

Closed, see #156

@znerol znerol closed this Aug 2, 2023
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.

2 participants