-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Uptime] Redirect to error page when Heartbeat mappings are missing #110857
[Uptime] Redirect to error page when Heartbeat mappings are missing #110857
Conversation
iconType="cross" | ||
// TODO: placeholder copy | ||
title={<div>Heartbeat mappings are not installed</div>} | ||
body={<div>You need to stop Heartbeat, delete your indices, and restart Heartbeat.</div>} |
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 copy WDYT of:
Incorrect mappings detected! Perhaps you forgot to run the heartbeat
setup
command? See the heartbeat quickstart for more information.
I'm also thinking maybe we should add a dedicated docs page for this and link to that. Thoughts?
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.
Dedicated docs might be nice, since it's such a common issue. We could include explicit remediation instructions there, since the quick-start guide doesn't address this problem directly.
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've opened elastic/observability-docs#1018 to track the docs
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 think having inline docs is always amazing, can we also keep instructions inline preferabbly with commands to run and lead to details step by step docs page,
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.
Docs PR: elastic/observability-docs#1046
@elasticmachine merge upstream |
8ae8789
to
8c58cc5
Compare
Pinging @elastic/uptime (Team:uptime) |
d69da0b
to
1cb42f8
Compare
@elasticmachine merge upstream |
@elasticmachine merge upstream |
try { | ||
return await libs.requests.getFilterBar({ | ||
uptimeEsClient, | ||
dateRangeStart, | ||
dateRangeEnd, | ||
search: parsedSearch, | ||
filterOptions: objectValuesToArrays<string>({ | ||
locations, | ||
ports, | ||
schemes, | ||
tags, | ||
}), | ||
}); | ||
} catch (e) { | ||
/** | ||
* This particular error is usually indicative of a mapping problem within the user's | ||
* indices. It's relevant for the UI because we will be able to provide the user with a | ||
* tailored message to help them remediate this problem on their own with minimal effort. | ||
*/ | ||
if (e.name === 'ResponseError') { | ||
return response.badRequest({ body: e }); | ||
} | ||
throw e; | ||
} | ||
}, | ||
}); |
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.
This route has been , infact this whole API has been removed in our filters API, so i wonder if this is the correct appraoch to handle this kind of error.
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.
Yes I overlooked that - a dedicated route may be the way to go. The inclination for this approach is, we don't want to slow down the happy path that 99% of users will experience for the sake of this one other case. While it's a common error, it's rare for people to experience it.
Perhaps we should depend on the filters PR and adjust the logic in this PR to fit the error in that one, since the error should still occur with the new fetch procedure.
@elasticmachine merge upstream |
…kibana into 359/detect-mapping-failure
@elasticmachine merge upstream |
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, Great work, it's really going to be useful for our users !!
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
…lastic#110857) * Initial PoC of redirect on mapping error is working. * Update copy. Add comments. * Include headline element for page title. * Create mappings for failing functional tests. * Add functional test for mappings error page. * Add mapping for certs check.
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…110857) (#112951) * Initial PoC of redirect on mapping error is working. * Update copy. Add comments. * Include headline element for page title. * Create mappings for failing functional tests. * Add functional test for mappings error page. * Add mapping for certs check. Co-authored-by: Justin Kambic <[email protected]>
Summary
Resolves elastic/uptime#359.
This is
WIPcode resulting from a spike. It requires design input and further refinement from a code standpoint, as well as some copy updates.This change would add a new page, mapping error, to the Uptime app's routes list. It should include helpful information that lets the user know that they need to fix their indices when Heartbeat's mappings were not appropriately installed.
At the moment, I've only modified one component on the Overview page to perform the redirect. Essentially, we catch this specific error from Elasticsearch and return it to the client; all other errors remain in a thrown state.
Testing
curl -u elastic:{PASSWORD} -X DELETE "http://localhost:9200/{HEARTBEAT_INDEX}"
curl -u elastic:{PASSWORD} -X DELETE "http://localhost:9200/{HEARTBEAT_INDEX}"
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers