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

Link to aggregated logs from mig-ui #1167

Open
djwhatle opened this issue Apr 12, 2021 · 1 comment
Open

Link to aggregated logs from mig-ui #1167

djwhatle opened this issue Apr 12, 2021 · 1 comment

Comments

@djwhatle
Copy link
Contributor

djwhatle commented Apr 12, 2021

Overview

It would be helpful to link to the unified log streams for each cluster from the UI. We could show a link to view all logs for the source or target cluster. It appears (looking at 3.11 and 4.6) that the URL to the logs is the same. We will need to resolve:

  • the route name for the console
  • the current pod name for mig-log-reader

There are a couple of options for how we could feed this info to UI. Perhaps the most suitable would be to provide a new endpoint on the discovery service that would feed back a logs URL for a particular MigCluster.

Sample OCP 3 unified logs URL

https://<console_url_here>/k8s/ns/openshift-migration/pods/migration-log-reader-5bc98b97cd-njhf6/logs

To build the URL above, we need

  1. the console URL (oc get route console -n openshift-console)
  2. the migration-log-reader pod name (oc get pod -n openshift-migration -l logreader=mig)

image

Sample OCP 4 unified logs URL

https://<console_url_here>/k8s/ns/openshift-migration/pods/migration-log-reader-7cc944f5d4-gmpt7/logs?container=plain

To build the URL above, we need

  1. the console URL (oc get route console -n openshift-console
  2. the migration-log-reader pod name (oc get pod -n openshift-migration -l logreader=mig)

image

@djwhatle
Copy link
Contributor Author

djwhatle commented Apr 12, 2021

@ibolton336 @vconzola @eriknelson for CLI-based logs, we just need to give the user one command:

oc logs --follow --namespace openshift-migration --selector logreader=mig --container color

This will work on any cluster where MTC is installed, assuming the user has enabled mig-log-reader (enabled by default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant