Collector for storage content metrics ctime, size and verification state #317
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all,
This PR adds a few metrics for storage contents:
Example:
We are using these in our Prometheus alerting to validate that backups have been created on time (by checking the newest ctime and making sure it is in sync with the respective VM's policies.
I decided to expose those under a separate endpoint which is scraped like this:
This allows for a flexible scraping of multiple storages and nodes.
It seems the API user needs the
PVEDatastoreAdmin
role for the scraping to work, I will try to narrow down the requirements more.Please let me know what you think about the approach of having a separate endpoint and if you'd be interested in merging this. I'd happily add some documentation to the PR then.