Conversation
|
Code wise looks good. Although it would be good to see how this will be consumed and mapped to charts? |
| self.alert_status | ||
| } | ||
|
|
||
| /// Get the collection of notice alert reasons for the pool. |
There was a problem hiding this comment.
What does this mean, what is this number, the enum value, the count.. ?
There was a problem hiding this comment.
I thought of concatenating all i32 into one f64 value. Pasted example below. attention reason has
IoError and IoStrallIntermittent both.
./io-engine-client pool list -ojson
[
{
"capacity": 1069547520,
"cluster_size": 4194304,
"committed": 0,
"disk_capacity": 1073741824,
"disk_info": [
{
"errors": {
"alerts": {
"attention": [
4,
2
],
"critical": [
1
],
"notice": [],
"status": 3,
"warning": []
},
"io_error_count": 3,
"io_error_threshold": 8,
"io_stall_transition_count": 2,
"io_stall_transition_threshold": 3,
"io_stalled": true
},
"uri": "uring:///dev/mapper/lvmvg-newlv"
}
],
"disks": [
"uring:///dev/mapper/lvmvg-newlv"
],
"encrypted": false,
"errors": {
"alerts": {
"attention": [
4,
2
],
"critical": [
1
],
"notice": [],
"status": 3,
"warning": []
},
"io_error_count": 3,
"io_error_threshold": 8,
"io_stall_transition_count": 2,
"io_stall_transition_threshold": 3,
"io_stalled": true
},
"max_expandable_size": 137271181312,
"md_info": {
"md_page_size": 4096,
"md_pages": 256,
"md_used_pages": 1
},
"name": "pool-uring",
"page_size": 4096,
"pooltype": 0,
"state": 4,
"used": 0,
"uuid": "03de92fb-1f6b-4121-ba3b-ee31934b9abc"
}
]
/bin # %
After discussing with @krishnaGajabi , Im thinking of exposing a variant present or not using labels. Will see how that works.
|
|
||
| /// Get the alert status for the pool. | ||
| pub(crate) fn alert_status(&self) -> i32 { | ||
| self.alert_status |
There was a problem hiding this comment.
Is this the enum value?
In the node exporter, online is being created as a gauge, would it be better to do the same here, and create gauges for each status? (I don't know how these are typically exported...)
8f786f7 to
2ec2498
Compare
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Abhilash Shetty <abhilash.shetty@datacore.com>
2ec2498 to
8b62329
Compare
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tiagolobocastro
left a comment
There was a problem hiding this comment.
Can you also add some tests as well?
| let opts = Opts::new(metric_name, metric_desc) | ||
| .subsystem("diskpool_alert") | ||
| .variable_labels(vec


This PR adds additional metrics on the diskpool to expose alert releated information.