Skip to content
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

[Monitoring] Fix alert status for nodes listing view #101941

Merged
merged 3 commits into from
Jun 17, 2021

Conversation

neptunian
Copy link
Contributor

@neptunian neptunian commented Jun 10, 2021

Resolves: #101898 where alerts for Nodes are always "clear".

Screen Shot 2021-06-10 at 8 53 49 AM

For some reason in #89410, the comparison function was changed to compare node.id from the firing alerts state to node.resolver.uuid instead of node.id from the list of nodes in the cluster. As far as I can see there is no uuid returned and the rest of the page uses node.resolver. The snapshot tests also check for resolver and not resolver.uuid.

After this change, after generating alerts for a node you should see them appear in node listing:
Screen Shot 2021-06-10 at 2 16 16 PM
Indices alerts should also function as normal.

@neptunian neptunian added bug Fixes for quality problems that affect the customer experience v8.0.0 Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.14.0 release_note:fix labels Jun 10, 2021
@neptunian neptunian marked this pull request as ready for review June 10, 2021 19:32
@neptunian neptunian requested a review from a team June 10, 2021 19:32
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@neptunian neptunian added the Team:Monitoring Stack Monitoring team label Jun 10, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/stack-monitoring (Team:Monitoring)

@neptunian neptunian self-assigned this Jun 10, 2021
@neptunian
Copy link
Contributor Author

@elasticmachine merge upstream

@@ -137,7 +137,7 @@ const getColumns = (showCgroupMetricsElasticsearch, setupMode, clusterUuid, aler
<AlertsStatus
showBadge={true}
alerts={alerts}
stateFilter={(state) => (state.nodeId || state.nodeUuid) === node.resolver.uuid}
stateFilter={(state) => (state.nodeId || state.nodeUuid) === node.resolver}
Copy link
Member

@jasonrhodes jasonrhodes Jun 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, this definitely looks like it was just a bug from a previous PR.

One thing, though: I can't tell if that filter is doing what we want or not? Are we falling back to state.nodeUuid only if state.nodeId isn't present? At first I thought we might be trying to compare either/or to node.resolver, i.e. we meant to do (state.nodeId === node.resolver) || (state.nodeUuid === node.resolver) so it threw me off.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the former. In my local environment state.nodeUuid is always undefined.

@neptunian
Copy link
Contributor Author

@elasticmachine merge upstream

@spalger
Copy link
Contributor

spalger commented Jun 16, 2021

jenkins, test this

(restarting due to jenkins upgrade)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
monitoring 730.9KB 730.9KB -5.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @neptunian

Copy link
Member

@jasonrhodes jasonrhodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@neptunian neptunian merged commit ae411dd into elastic:master Jun 17, 2021
neptunian added a commit to neptunian/kibana that referenced this pull request Jun 17, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
neptunian added a commit that referenced this pull request Jun 17, 2021
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:fix Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services Team:Monitoring Stack Monitoring team v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Monitoring] Alert status always shows clear despite existing alert
5 participants