Dashboard: Add option to refresh logs

Created on 4 Jul 2017  路  15Comments  路  Source: kubernetes/dashboard

Environment
Dashboard version: 1.6.1
Kubernetes version: 1.5.2
Operating system: Centos 7.3

I'm running the latest kube-dashboard, and my devs have been complaining that the logs viewer is clunky, especially how logs are grouped into pages.
Is it possible to enable endless scrolling of logs somehow, or have (finer) control over the log time period?

kinfeature

Most helpful comment

Before we implemented paging we discussed endless scroling and decided against it for some reason. Would ist be helpful to provide a button that opens a new tab and dumps the log file into it unformated?

All 15 comments

It's done this way for performance reasons. Most often you only want to look at the beginning/end of logs +/- few pages or look at the specific period of time. We are planning to add since time selector. No ETA though.

Thanks for the reply.
There's no way to increase page size too? Or would the time selector do this?
Our homebrew apps spit out a lot of logs, and even looking at logs for a few minute intervals requires lots of clicking. Any way to do this would be very nice.

Probably we could increase logs viewer size a bit. Unfortunately Kubernetes does not offer good api for logs, i.e. paging option is missing. We have to handle it on our own. That is why we have only this limited option to page through the logs. We have had to find some balance between performance and usability because there were many reports that log page crashes dashboard.

Before we implemented paging we discussed endless scroling and decided against it for some reason. Would ist be helpful to provide a button that opens a new tab and dumps the log file into it unformated?

@cheld that would be great. If it could liveupdate like a jenkins job's console output, that would be great functionality to have, but just an unformatted dump from that moment would already be helpful.

Would ist be helpful to provide a button that opens a new tab and dumps the log file into it unformated?

I think that this option would once again cause dashboard crash for big log files. We would have to download full log and stream it to user so for small memory limits dashboard would crash. What we could do is to add download button. Then we could only stream chunks of data at the time and not overload dashboard.

hmm...I have not done this before in golang, but I would expect that we can read the log file byte by byte and write it directly to the response-output. I would assume that the http server sends portions before request is closed. Again, just guessing...

I'd be interested in implementing the log dump, does that sound good? @floreks @cheld

I think that @cheld is already working on that.

What about refresh button? Right now im switching to another link and going back to the log , i would love get the same functionality like kubectl logs -f or at least a refresh button

You can use pagination buttons. On every click logs are loaded again from the server.

@innovia

Adding a refresh button that reloads the contents would be fairly simple. Of course, streaming or something like that would be much nicer but a lot of work.

@floreks
I could make the page speed load for the default (last) page much faster by decreasing read limit to 100 lines. In this case freaquent reloads do not cause much load. 1s or less is no problem. WDYT?

@cheld refresh would fix the annoying issue of using back and forth on pagination just to see last data

Changed the title of the issue as it seems to be missing thing because log dump is already there implemented by @cheld.

Closing as #2496 will add support for basic log following and this is not required anymore. Will be tracked from #1828.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kasunsjc picture kasunsjc  路  3Comments

MichaelJCole picture MichaelJCole  路  5Comments

eloyekunle picture eloyekunle  路  3Comments

maciaszczykm picture maciaszczykm  路  3Comments

lukmanulhakimd picture lukmanulhakimd  路  4Comments