claudiowaldvogel / cloudwatch-loki-shipper Goto Github PK
View Code? Open in Web Editor NEWSample how to forward CloudWatch logs to Loki.
Sample how to forward CloudWatch logs to Loki.
Exception: ('Failed to create log subscription. Is loki-shipper lambda running?', InvalidParameterException('An error occurred (InvalidParameterException) when calling the PutSubscriptionFilter operation: Could not execute the lambda function. Make sure you have given CloudWatch Logs permission to execute your function.'))
I run following command:
python demo/cli.py shipper -l http://abdef4035ea5611e9897f0a855af7b5e-851135046.eu-west-3.elb.amazonaws.com:80 start
Starting lambda: loki-shipper
Traceback (most recent call last):
File "demo/cli.py", line 296, in
cli()
File "/usr/lib64/python2.7/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib64/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib64/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/lib64/python2.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "demo/cli.py", line 118, in shipper
__start_lambda(config) if action == 'start' else __stop_lambda(config)
File "demo/cli.py", line 274, in __start_lambda
raise Exception('Failed to update Lambda function', e)
Exception: ('Failed to update Lambda function', MemoryError())
where am I going wrong?
Can I know how do I configure this lambda function from AWS Console? I am new to AWS CLI
I've deployed a lambda function using the loki-shipper.py. It has LOKI_ENDPOINT as environment variable but it doesn't have any authentication. Loki requires authentication in order to be able to push logs to the endpoint(I'm using grafana cloud and I've configured a loki endpoint on the grafana logs dashboard).
I've made all the changes and updated the docs(Readme.md) . Please check the blow archive as I wasn't able to raise a PR with the changes.
loki-shipper-auth-readme.zip
[ec2-user@ip-172-30-209-119 cloudwatch-loki-shipper]$ python demo/cli.py -p default -r us-east-1 attach /aws/lambda/DevOpsShutdown
Created/Updated LogGroup: /aws/lambda/DevOpsShutdown
Traceback (most recent call last):
File "demo/cli.py", line 297, in
cli()
File "/home/ec2-user/cloudwatch-loki-shipper/venv/lib/python2.7/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/ec2-user/cloudwatch-loki-shipper/venv/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/ec2-user/cloudwatch-loki-shipper/venv/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ec2-user/cloudwatch-loki-shipper/venv/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ec2-user/cloudwatch-loki-shipper/venv/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "demo/cli.py", line 128, in attach
__create_log_subscription(group)
File "demo/cli.py", line 170, in __create_log_subscription
raise Exception('Failed to create log subscription. Is loki-shipper lambda running?', e)
Exception: ('Failed to create log subscription. Is loki-shipper lambda running?', LimitExceededException(u'An error occurred (LimitExceededException) when calling the PutSubscriptionFilter operation: Resource limit exceeded.',))
(venv) [ec2-user@ip-172-30-209-119 cloudwatch-loki-shipper]$ aws lo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.