-
Notifications
You must be signed in to change notification settings - Fork 327
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
[blockchain] Add database file size metric #4185
base: master
Are you sure you want to change the base?
Conversation
blockchain/blockchain.go
Outdated
@@ -45,6 +49,14 @@ var ( | |||
}, | |||
[]string{"type"}, | |||
) | |||
fileSizeMtc = prometheus.NewGaugeVec( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Three ways to monitor the file size:
- Export the metrics directly from the cloud service.
- Run a daemon service or process to report the metrics.
- Monitor the metrics in db_bolt.go.
The last one is the least preferred if the first two can't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for 1, it should only be able to monitor at the mount level and cannot monitor specific files.
for 2, it may be a heavy changes for this small requirement.
I think 3 is a good approach that can also address the monitoring of chain-000000xx.db files mentioned above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for 2, there have been existing tools to use, like https://github.com/prometheus/node_exporter
Quality Gate failedFailed conditions |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4185 +/- ##
==========================================
+ Coverage 75.38% 76.75% +1.37%
==========================================
Files 303 340 +37
Lines 25923 29268 +3345
==========================================
+ Hits 19541 22465 +2924
- Misses 5360 5697 +337
- Partials 1022 1106 +84 ☔ View full report in Codecov by Sentry. |
Description
Fixes #4160
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: