-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Support multi disk space #18413
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
Support multi disk space #18413
Conversation
Hi, @philwebb It will show up like this: {
"status":"UP",
"components": {
"diskSpace": {
"status":"UP","
details": {
"/etc": {
"total":499963174912, "free":391009861632
},
"/bin":{
"total":499963174912,"free":391009861632
},
"threshold":10485760}
},
"ping":{"status":"UP"}}} I don't know what you want to show, but it's completely modifiable, such as the definition of the key in some maps. Maybe you can give some advice? |
In order to remain back compatible we'll probably need to leave the existing "total", "free" and "threshold" values at the root. I think we should probably provide a further breakdown for the individual files. Something like: {
"status" : "UP",
"components" : {
"diskSpace" : {
"status" : "UP",
"details" : {
"total" : 123,
"free" : 123,
"threshold" :123,
"paths" : {
"/etc" : {
"total" : 123,
"free" : 123
},
"/bin" : {
"total" : 123,
"free" : 123
}
}
}
} |
incidentally, I'm afraid we had some issues with the repository over the weekend so you might need to rest your local branch and do a force push. Something like this:
Sorry about that. |
@philwebb Got it, I'm going to rewrite PR in your format. I'm surprised at the repository issue. I've submitted a branch before, but it's also happening :), and I'll try these git commands you gave me. |
bb5b359
to
f82020b
Compare
Hi, @philwebb Now the format will like this: {
"status":"UP",
"components":{
"diskSpace":{
"status":"UP",
"details":{
"total":499963174912,
"free":392189550592,
"threshold":10485760,
"paths":{
"/etc":{
"total":499963174912,
"free":392189550592
},
"/bin":{
"total":499963174912,
"free":392189550592
}
}
}
},
"ping":{
"status":"UP"
}
}
} When the user opens the port, the project root path to disk information will be displayed by default. If the user configures the management.health.diskspace.path, the path disk information will be displayed under the paths node. Another question I have is, do we need to consider how users configure project root paths in management.health.diskspace.path (not ".", like this: /Users/xxx/project /yyy/.)? This way, the disk information of the root path will be displayed twice in the result, once under the details node and once under the path node, although I don't think it should cause any misunderstanding. |
As suggested by @eddumelendez in #18359 (comment), I think we should consider allowing the threshold to be configured on a per-path basis. That'll require a bit of thought to maintain backwards compatibility in the properties. |
I will continue to fix it here, if you have any good ideas :) |
@polarbear567 Thank you for your work on this PR. We discussed this at length on our team call and it appears that there isn't a good way to support this without making a breaking change. The Given that this isn't a widely requested feature, we don't think it justifies a breaking change at this time. I'll leave the original issue open so that we can consider it in the future. Thanks again. |
No description provided.