SumoLogic / sumoshell

A terminal-only version of Sumo written in Go
Apache License 2.0
326 stars 22 forks source link

Does sumo support output to file instead of rendering via curse-based output? #25

Closed tkt028 closed 7 years ago

tkt028 commented 7 years ago

Hi, I want to have a cronjob in server to calculate the statistical report by using sumo. I cannot figure out the option (even Googling) to output restuls to file. Do we have a solution for this? Thank you very much!

Cheers, Khon

rcoh commented 7 years ago

Hi just do --render-all > myfile assuming you're on a Unix

On Sat, Feb 18, 2017, 7:56 AM Khon Trieu notifications@github.com wrote:

Hi, I want to have a cronjob in server to calculate the statistical report by using sumo. I cannot figure out the option (even Googling) to output restuls to file. Do we have a solution for this? Thank you very much!

Cheers, Khon

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SumoLogic/sumoshell/issues/25, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeFZ9_Lw4uMwH9LcHrSEXaf2P4VFKMpks5rdwangaJpZM4MFJKY .

tkt028 commented 7 years ago

Hi rcoh, Thank you the quick response. It failed with this log:

$ cat my-log-file | sumo search | sumo count reqUrl | render --render-all > abc.txt
panic: runtime error: index out of range

goroutine 1 [running]:
panic(0x532ba0, 0xc820012160)
        /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
main.main()
        /home/hajime/go/src/github.com/SumoLogic/sumoshell/render/Render.go:34 +0xbaa

Could you please prove more detail? Thank you! Cheers, Khon

rcoh commented 7 years ago

Hmm you're right I need to fix that. Will do soon.

On Sat, Feb 18, 2017, 8:55 AM Khon Trieu notifications@github.com wrote:

Hi rcoh, Thank you the quick response. It failed with this log:

$ cat my-log-file | sumo search | sumo count reqUrl | render --render-all > abc.txt panic: runtime error: index out of range

goroutine 1 [running]: panic(0x532ba0, 0xc820012160) /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6 main.main() /home/hajime/go/src/github.com/SumoLogic/sumoshell/render/Render.go:34 +0xbaa

Could you please prove more detail? Thank you! Cheers, Khon

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/SumoLogic/sumoshell/issues/25#issuecomment-280854213, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeFZx9Gnmv1nLFMntMR3CIGvHOy_XI_ks5rdxRegaJpZM4MFJKY .

rcoh commented 7 years ago

Fixed in #29, and released in v0.4