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

Add onboarding troubleshooting #3157

Merged
merged 5 commits into from
Sep 4, 2023

Conversation

mdbirnstiehl
Copy link
Contributor

This PR closes Issue 3116

I've updated the Troubleshoot your logs page to include the information from @yngrdyn 's word doc. I'm adding this as a draft PR because I think there is still room for more discussion and information on what needs to be added. But I thought this would give us a starting point for discussion.

@mdbirnstiehl mdbirnstiehl added backport-8.9 Automated backport with mergify backport-8.10 Automated backport with mergify labels Aug 21, 2023
@mdbirnstiehl mdbirnstiehl self-assigned this Aug 21, 2023
@github-actions
Copy link
Contributor

A documentation preview will be available soon:

@mdbirnstiehl mdbirnstiehl removed the backport-8.9 Automated backport with mergify label Aug 23, 2023
docs/en/observability/logs-troubleshooting.asciidoc Outdated Show resolved Hide resolved
docs/en/observability/logs-troubleshooting.asciidoc Outdated Show resolved Hide resolved
*Solution:*

You need an administrator to give you privileges to create `savedObjects` in {kib} to generate the required `observabilityOnboarding` flow state.
Copy link
Member

Choose a reason for hiding this comment

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

To make this more actionable, could we share here the API call that the admin would have to run?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ruflin Could someone provide this API call? Not sure exactly how to format that.

Copy link
Member

Choose a reason for hiding this comment

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

@weltenwort Could someone in your team help out here?

Copy link
Member

Choose a reason for hiding this comment

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

Are we looking for an API call to grant the privileges? Or instructions to assign them via Kibana's management UI?

Copy link
Member

Choose a reason for hiding this comment

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

I would go for an API call that the user can copy / paste into Dev Tools

Copy link
Member

@weltenwort weltenwort Aug 30, 2023

Choose a reason for hiding this comment

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

Hm, that's a bit tricky as much of the call depends on the specific user and their roles. They'd need to add these privileges to one of the roles of the current user, but we don't know how they've structured their roles. And if the user doesn't have these privileges, they probably don't have the privilege to grant new privileges either.

Would it maybe make sense to ship with a default observability role that grants the privileges and instruct them to ask the admin to grant that role in way appropriate to their configured authentication realms?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ruflin any suggestion here? How do we want to move forward with the docs?

Copy link
Member

Choose a reason for hiding this comment

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

Do we even have that amount of control over the roles in serverless? I haven't seen any communication about that aspect.

Copy link
Member

Choose a reason for hiding this comment

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

Lets take this on in steps. Lets first document the permissions that are needed. From there, we can discuss if we should have a role for it and API calls.

*Solution:*

You need an administrator to give you the necessary permissions listed in the error messages and then to restart the onboarding flow.
Copy link
Member

Choose a reason for hiding this comment

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

To make this more actionable, could we share here the API call that the admin would have to make? Otherwise the admin comes back to the user and asks what exactly they need to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ruflin Same as above. Could someone provide this API call.

Copy link
Member

Choose a reason for hiding this comment

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

docs/en/observability/logs-troubleshooting.asciidoc Outdated Show resolved Hide resolved
docs/en/observability/logs-troubleshooting.asciidoc Outdated Show resolved Hide resolved

* You're an Elastic Cloud Enterprise user without access to the Elastic downloads page.
* The {agent} was fully downloaded previously. In this case, delete previous downloads and restart the onboarding.
Copy link
Member

Choose a reason for hiding this comment

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

If this is the case, can we show a better error message? @yngrdyn

Copy link
Contributor

Choose a reason for hiding this comment

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

Here the error in the console should be more align to

The requested URL returned error: 404

Copy link
Contributor

Choose a reason for hiding this comment

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

Concretely this is what we are showing
image

What do you suggest @ruflin ?

Copy link
Member

Choose a reason for hiding this comment

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

If the agent was already downloaded also the above error shows? I was referring to:

The {agent} was fully downloaded previously. In this case, delete previous downloads and restart the onboarding.

I'm surprised we see a 404 in this case.

Copy link
Contributor

@yngrdyn yngrdyn Sep 1, 2023

Choose a reason for hiding this comment

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

ah no, the 404 it's in case the url for the agent returns the 404 or we cannot connect to kibana to download the script.

In the case of an agent already existing in the host, we would probably would see something like

Error: cannot perform installation as Elastic Agent is already running from this directory

Let me double check this scenario

@mdbirnstiehl mdbirnstiehl marked this pull request as ready for review August 29, 2023 16:58
@mdbirnstiehl mdbirnstiehl requested a review from a team as a code owner August 29, 2023 16:58
@mdbirnstiehl
Copy link
Contributor Author

@ruflin @yngrdyn I think I have made the recommended changes. I've updated the privileges for the for now in the places where we may add API calls. If you could have another look through, we can move forward with this for now, and update as we go on.

+
To fix this, delete previous downloads and restart the onboarding.
* You're an Elastic Cloud Enterprise user without access to the Elastic downloads page.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if there is a solution to this one that we can add as it's more of a cause at this point.

Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Lets get it in and as usual, iterate on it.

Failed to create API key

Something went wrong: Unable to create observability-onboarding-state
Copy link
Member

Choose a reason for hiding this comment

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

This is a comment for the devs, not docs: We should improve this error so users get already details in the error on what to do.

[discrete]
[[logs-troubleshooting-download-agent]]
== Download {agent} failed
Copy link
Member

Choose a reason for hiding this comment

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

Happy to get this section in but I think we should revisit it. It seems odd that someone could have a link for a not supported platform in the first place?

@mdbirnstiehl mdbirnstiehl merged commit 9552649 into elastic:main Sep 4, 2023
1 check passed
@mdbirnstiehl mdbirnstiehl deleted the update-logs-troubleshooting branch September 4, 2023 14:41
mergify bot pushed a commit that referenced this pull request Sep 4, 2023
mdbirnstiehl added a commit that referenced this pull request Sep 4, 2023
(cherry picked from commit 9552649)

Co-authored-by: Mike Birnstiehl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.10 Automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a logs troubleshooting page
5 participants