jorgebastida / awslogs

AWS CloudWatch logs for Humans™

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't show logs

jordisantamaria opened this issue · comments

Hi, I installed this cli and It's not returning logs when I do awslogs get stream.
It's not giving any error, It just return nothing.

awslogs groups works correctly showing all groups, but when I use awslogs streams It don't return all streams also.

Is there something I'm missing? I didn't configure anything, just expected It to work with aws cli credentials.

Aws cli returns cloudwatch log without problem, so I don't think It's a permissions problem.

same problem

Hi @jordisantamaria @xinhuagu

You should to define the log_group_name to search streams in it. It's a positional argument.
For example (replace group name):

awslogs streams '/aws/lambda/cdkworkshop-HelloHandler2E4FBA4D-j0QXnaK050Xv'

Same issue here , but for Elastic beanstalk that have their logs separated for each instance:
>awslogs streams /aws/elasticbeanstalk/MessageStoreApi-qa/var/log/docker-events.log
does not return anything.

Adding the instance on the end, throws the error: The specified log group does not exist. :
>awslogs streams /aws/elasticbeanstalk/MessageStoreApi-qa/var/log/docker-events.log/i-096bc814d35a469e0

File "c:\users\rsilva\source\elastic_beanstalk_cdk\.venv\lib\site-packages\botocore\client.py", line 386, in _api_call return self._make_api_call(operation_name, kwargs) File "c:\users\rsilva\source\elastic_beanstalk_cdk\.venv\lib\site-packages\botocore\client.py", line 705, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the DescribeLogStreams operation: The specified log group does not exist.

Hi @jordisantamaria @xinhuagu

You should to define the log_group_name to search streams in it. It's a positional argument.
For example (replace group name):

awslogs streams '/aws/lambda/cdkworkshop-HelloHandler2E4FBA4D-j0QXnaK050Xv'

I know, thats what I'm doing. Btw with cloudwatch logs generated by cdk It works correctly, but with cloudwatch logs I created with sam cli and cloudformation without cdk... It don't works, It returns nothing, but logs exist and I can watch them with aws cli.
スクリーンショット 2021-07-04 0 12 17

Even if you try plain?

awslogs get "/aws/lambda/test"

Maybe they are too old and you have to set --start argument to try find older ones.

Even if you try plain?

awslogs get "/aws/lambda/test"

Maybe they are too old and you have to set --start argument to try find older ones.

I see, putting --start parameter It works, but what is too old for you? streams created today are not being returned without --start parameter.

Even if you try plain?

awslogs get "/aws/lambda/test"

Maybe they are too old and you have to set --start argument to try find older ones.

I see, putting --start parameter It works, but what is too old for you? streams created today are not being returned without --start parameter.

Hi, sorry, I'm not an author/maintainer of the project, I'm the same user as you 😅 I think it's about smart defaults to prevent querying to many logs.

And I don't think that it's about old/new streams, it's more about new logs entries.