weaveworks / scope

Monitoring, visualisation & management for Docker & Kubernetes
https://www.weave.works/oss/scope/
Apache License 2.0
5.87k stars 713 forks source link

Container logs terminal lack of output can be confusing #2231

Open abuehrle opened 7 years ago

abuehrle commented 7 years ago

I tried to get the logs on several containers (kube-api server, rabbitMQ and others), but when I try to open the terminal, it doesn't display anything.

Note that the logs do show up on Pods, but not in containers. I see that those terminal buttons both do different things: one has a tooltip for logs (in pods) and the other 'attaches' (in containers). What am I supposed to see in the attached terminal - should I see the Docker logs in there?

Here's a recording:

http://recordit.co/oRRdey5SMV

abuehrle commented 7 years ago

I guess what's going on here is that there is no load on the app, and so there are no messages to display. It might be a good idea to include a message like: 'There are no logs' or something to that effect, so that it shows it's doing something.

2opremio commented 7 years ago

It doesn't show the existing logs but the upcoming logs, but I guess we could display a message until there is done output.

(CC @davkal @bowenli )

bowenli commented 7 years ago

Something like "Attached, waiting for output..." would be fine. Note that a spinner would not be appropriate in this case since the connection is already established.

rade commented 7 years ago

but why is there a "Connection Closed" popping up? I thought that is what you were complaining about, @abuehrle?

abuehrle commented 7 years ago

I think there are a couple of things going on here:

There was also a warning and no logs on viewing the Pod logs of Weave Net, but I will log that one for you separately as it's unrelated: a container name must be specified for pod...

lukemarsden commented 7 years ago

It would be great if this feature could show the latest 40 log lines or so, and/or be reworked to show "Logs" versus "Attach". "Attach" is less helpful than "Exec" now that "Exec" is a thing. cc @rade

rade commented 7 years ago

see also #2234.

rade commented 7 years ago

Note that Scope's 'Get logs' button on the pod detail panel does actually fetch the proper pod log via the k8s API, including history. So this is only an issue for container logs.