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

[APM] InfraOps cannot display hosts linked from APM UI #24481

Closed
formgeist opened this issue Oct 24, 2018 · 16 comments
Closed

[APM] InfraOps cannot display hosts linked from APM UI #24481

formgeist opened this issue Oct 24, 2018 · 16 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support v6.5.0

Comments

@formgeist
Copy link
Contributor

formgeist commented Oct 24, 2018

Created a new ticket, since the PR was closed.

When clicking the InfraOps links in the ActionsMenu, you're taken to an error state in InfraOps, saying that it cannot locate the host.

screenshot 2018-10-24 at 12 54 41

I don't know if it's related, but the links are using context.system.host.name rather than host.name which is added to the transaction document. host.name uses the same ID as beat.hostname which I assume would show metrics.

screenshot 2018-10-24 at 11 57 00

cc @makwarth

@formgeist formgeist added bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support v6.5.0 labels Oct 24, 2018
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui

@roncohen
Copy link
Contributor

For context, context.system.hostname is the hostname of the host where the agent is running. host.name is the hostname of where the APM Server is running. We want to link to the metrics for where the agent is running.

@makwarth
Copy link

makwarth commented Oct 24, 2018 via email

@jasonrhodes
Copy link
Member

Do we expect Opbeans test data to work with the infra metrics and logs links? When I tried to test them yesterday, the links ended up in the infra UI but didn't find anything, and I assumed it was because of the test data.

@sorenlouv
Copy link
Member

For InfraOps to work you need to setup Logstash or filebeat to send the logs to ES.

@formgeist
Copy link
Contributor Author

@makwarth Updated the description with a screenshot from InfraOps.

@jasonrhodes I'm running the setup locally with metricbeat and filebeat, but not sure if we can count on the agent test data to carry the appropiate host names. Never seen it work besides when browsing InfraOps metrics and logs where it does show data.

@formgeist formgeist changed the title [APM] InfraOps links don't work [APM] InfraOps cannot display hosts linked from APM UI Oct 24, 2018
@weltenwort
Copy link
Member

Would it be possible to get a sample of the links that are being generated in this case?

@weltenwort
Copy link
Member

Based on these links, the InfraOps and logging UI filter the data such that only documents with beats.hostname === 2bf5b40123ef (to be changed to host.name after the migration to ECS) are taken into account.

The hostname looks like a hostname inside a docker container. If the corresponding metricbeat and filebeat processes do not run in the same container they will annotate their documents with a different beat.hostname (i.e. the host/container they are running in).

@roncohen
Copy link
Contributor

I also took a look and I agree with what @weltenwort said: When APM agents run inside containers, their hostname becomes the first part of the container id. That's the only hostname we have at the moment. Filebeat, on the other hand, will report the container id of the container it's running in as it's hostname. For these links to actually work, both would need to instead supply the hostname of the parent host. AFAICT getting the hostname of the parent host from inside a container is not simple.

If this was a situation with no docker involved, this would probably work out of the box. With things running in Docker, it doesn't work and as it is currently, it's not a great user experience.

We could either:

  1. remove the link for this version and work on something better
  2. disable the button if there is no matching documents
  3. leave it as is

I think i would vote for (1) now and (2) in the next iteration.

@roncohen
Copy link
Contributor

@weltenwort @simianhacker what do you think about changing the Infraui GraphQL error message to something more user friendly?

@weltenwort
Copy link
Member

what do you think about changing the Infraui GraphQL error message to something more user friendly?

That certainly can't hurt 👍 -> #24493

@alvarolobato
Copy link

alvarolobato commented Oct 25, 2018

@weltenwort , @simianhacker the links in the other direction are also not working.
When clicking "View APM Traces" in InfraOps the services list is always empty.

  • If you are in a host view it will generate a link to beat.hostname : "apm-ui-dev" but it should be context.system.hostname : "apm-ui-dev"
  • If you are in a container, the link generated filtering on docker.container.name : "localtesting_7.0.0-alpha1_opbeans-node" but it should be context.system.hostname : "94f3902390c3" where 94f3902390c3

Is it possible to change these links?, the second one would probably be temporary until we land https://github.com/elastic/apm-dev/issues/263

@formgeist
Copy link
Contributor Author

Due to limited resources and we're pushing hard for other issues to be fixed in time for release, we're opting to remove the InfraOps links from APM and pushing it to next release. I've made a ticket in APM UI which describes the change #24562

It also looks like the opposite way (going from InfraOps -> APM) link doesn't work either when APM runs in containers, which means the services list will eventually be empty and it's not helpful for users. We're suggesting that the link from Metrics (in the context menu for hosts and containers) should be removed until next release. By then we should also have our routing in place so you can link to Traces, and not Services, as the link in the UI describes.

Example of a link from Host metrics -> APM services from a host;

screenshot 2018-10-25 at 11 12 50

screenshot 2018-10-25 at 11 14 44

Thoughts?

@formgeist
Copy link
Contributor Author

@alvarolobato and I had the same idea at the same time. Mine is a little more visual though... 😉

@roncohen
Copy link
Contributor

We decided to remove all the cross links at this time and instead shoot for a great UX in the next iteration: #24562

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 Team:APM All issues that need APM UI Team support v6.5.0
Projects
None yet
Development

No branches or pull requests

8 participants