-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Improve k8s dashboard #30913
Improve k8s dashboard #30913
Conversation
This pull request does not have a backport label. Could you fix it @ChrsMark? 🙏
NOTE: |
Signed-off-by: chrismark <chrismarkou92@gmail.com>
180045c
to
fa1dab6
Compare
Signed-off-by: chrismark <chrismarkou92@gmail.com>
metricbeat/module/kubernetes/_meta/kibana/7/dashboard/e0381d10-e4a6-11eb-9d53-3b3d1d47c519.json
Show resolved
Hide resolved
@@ -12,6 +12,7 @@ | |||
"params": { | |||
"axis_formatter": "number", | |||
"axis_position": "left", | |||
"drop_last_bucket": 1, |
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.
why is it needed?
@@ -40,47 +47,68 @@ | |||
"id": "2fe9d3b0-30d5-11e7-8df8-6d3604a72912", | |||
"index_pattern": "metricbeat-*", | |||
"interval": "auto", | |||
"isModelInvalid": false, |
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.
is this field part of Panel Option
? could you add a screenshot for the page where this is defined?
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.
I cannot find it in the view tbh, @flash1293 do you have an answer handy for this?
@tetianakravchenko it seems that |
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.
LGTM, just for curiosity would like to know where "isModelInvalid": false
in UI is defined
Signed-off-by: chrismark <chrismarkou92@gmail.com>
@ChrsMark @tetianakravchenko @kvch I thought a bit more about this and I'm not 100% sure anymore whether users would expect the "entire time range" mode for this one. AFAIK in most beats dashboards the metric numbers are meant to show the "current state" of the system, but by using entire time range with the series agg and multi field group by, it will take into account "stale" information as well. This is the case I'm a bit worried about:
Another weird case:
These cases could be improved by using "last value mode" with "drop last bucket" and an interval which is larger than the polling interval (let's say 2 minutes). By doing this, only the deployments which got documents indexed in the last 2 minutes will be rolled up into the final metric instead of all of them for the entire time range, resulting in a much faster reflection of K8s state changes at the expense of a more expensive query and some hidden magic (the 2 minutes are not visible to the user in any way while the entire time range is known). I'm not sure about this, in the end it comes down to what the user expects this number is representing - the state of the system by the end of the configured time range or the state of the system "during" the whole time range. Your decision, just wanted to make this transparent. |
Thanks for your feedback @flash1293, I think that the goal of these visualisations is to show the "current" state of the cluster no matter what is the time range. So I would say that using I notice that you mention about setting the interval to 2 mins for example so as to have sth bigger than the polling interval but would be the result if a user put a bigger polling period? |
I made some checks again and it seems to work correctly with the |
The downsides are:
|
@flash1293 if the collection period is 5 minutes a user also need to increase the |
@ChrsMark If the interval is smaller than the collection period it will be possible they wont see any data if they are unlucky. |
What does this PR do?
This PR leverages elastic/kibana#126015 in order to solve elastic/integrations#2159
Why is it important?
At the moment the k8s Dashboard can be showing inconsistent values in the views for the "Desired", "Available" and "Unavailable" Pods. The reason is described at elastic/integrations#2159. With this chance we aim to improve the situation so as the views to be showing correct values by using the proper aggregations.
Related issues
Screenshots
Changing the time range of the dashboard was giving inconsistent values in the views. Below find attached the consistent views with different time ranges:
![Screenshot 2022-03-18 at 12 13 17 PM](https://user-images.githubusercontent.com/11754898/159004823-0ef25fb0-fc76-4ed7-aad3-c1b868ac0592.png)
![Screenshot 2022-03-18 at 12 13 13 PM](https://user-images.githubusercontent.com/11754898/159004842-8943098e-0fc1-40e8-a3fd-b08be0d55bdd.png)
![Screenshot 2022-03-18 at 12 13 07 PM](https://user-images.githubusercontent.com/11754898/159004850-a90427b0-fb8d-47c0-969e-5694adc8e9e8.png)