awslogs icon indicating copy to clipboard operation
awslogs copied to clipboard

Stream management

Open pproux opened this issue 4 years ago • 2 comments

Hi,

Currently the stream expression is (obviously) an expression so it takes lot of times to search and match against all existing streams. It would be great to have a way specifying that we don't want a "search and match" but only "get me that stream".

Here is a time comparaison between awslogs and aws logs to get the same thing

admin@xxxxxxx:~$ time /home/admin/.local/bin/awslogs get /aws/transfer/s-047f907xxxxxxxxxxx global-dva-ci.0258452002e64965
[...]

real	0m47.783s
user	0m6.016s
sys	0m0.244s
admin@xxxxxxx:~$ time aws logs get-log-events --log-group-name "/aws/transfer/s-047f907xxxxxxxxxxx" --log-stream-name "global-dva-ci.0258452002e64965" --query 'events[].[message]' --output text
[...]

real	0m0.920s
user	0m0.548s
sys	0m0.064s

I could use aws logs in that case of course but awslogs is better for printing human readable timestamp.

pproux avatar Oct 12 '20 09:10 pproux

FYI: There is a pull request that fixes this https://github.com/jorgebastida/awslogs/pull/319. I don't know will it get merged, but if you want this functionality you can manually build from the fork that initiated the pull request https://github.com/Miksu82/awslogs

Miksu82 avatar Nov 12 '20 11:11 Miksu82

@Miksu82 thank you for pointing to this PR. It looks exactly as something we need too, since we have thousands of log streams in single group and we know exactly the name of stream. Currently awslogs simply never (at least in an hour ;)) return any result.

@jorgebastida do you intend to merge #319 anytime soon?

kurrak avatar Apr 12 '21 10:04 kurrak