sravani-revuri opened a new pull request, #11011: URL: https://github.com/apache/ozone/pull/11011
## What changes were proposed in this pull request? Apache Ozone exposes bucket quota metrics from OM via /prom, for example: bucket_utilization_metrics_bucket_used_bytes bucket_utilization_metrics_bucket_quota_bytes bucket_utilization_metrics_bucket_available_bytes bucket_utilization_metrics_bucket_quota_namespace These are useful for bucket byte quota monitoring, but there appear to be no equivalent Prometheus metrics for native volume quotas, even though volume quotas are available via the CLI/API. Example CLI output: ozone sh volume list volume quotaInBytes quotaInNamespace batch-accounting 1099511627776 -1 monitoring 10995116277760 -1 user -1 -1 Also, for buckets, the CLI exposes namespace usage: ozone sh bucket info /user/ekleszcz usedNamespace: 4 quotaInNamespace: 10 but OM /prom appears to expose only the namespace quota limit: bucket_utilization_metrics_bucket_quota_namespace and not a matching used namespace metric. This makes it possible to monitor bucket byte quota usage, but not: native volume quota usage volume quota limits via Prometheus bucket namespace quota usage percentage Requested improvement: Expose OM Prometheus metrics for: volume used bytes volume quota bytes volume available bytes, if applicable volume namespace quota volume used namespace bucket used namespace This would allow operators to build Grafana dashboards and alerts for both volume and bucket quota usage without relying on custom exporters or CLI polling. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-15333 ## How was this patch tested? written test and manual checking of metrics. ``` curl -s http://localhost:9874/prom | grep 'volume_utilization_metrics.*quotatest' curl -s http://localhost:9874/prom | grep 'bucket_utilization_metrics_bucket_used_namespace.*metricsbucket' volume_utilization_metrics_volume_quota_bytes{context="Volume metrics",volumename="quotatest",hostname="e4e7ec0ffb98"} 1073741824 volume_utilization_metrics_volume_quota_namespace{context="Volume metrics",volumename="quotatest",hostname="e4e7ec0ffb98"} 5 volume_utilization_metrics_volume_used_namespace{context="Volume metrics",volumename="quotatest",hostname="e4e7ec0ffb98"} 3 bucket_utilization_metrics_bucket_used_namespace{context="Bucket metrics",volumename="quotatest",bucketname="metricsbucket",hostname="e4e7ec0ffb98"} 4 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
