Comments (8)
Here is the documentation https://help.sumologic.com/Send-Data/Collect-from-Other-Data-Sources/Auto-Subscribe_AWS_Log_Groups_to_a_Lambda_Function. See Step 5. Use the function to auto-subscribe existing log groups
from sumologic-aws-lambda.
If you know the exact name then you can modify the function's handler and directly invoke
subscribeToLambda(logGroupName, env.LAMBDA_ARN, errorHandler)
if you know the regex and you have multiple log group function that will require fetching loggroup names using describeLogGroups api (https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudWatchLogs.html#describeLogGroups-property) and filtering the loggroups.
Also you can request for features in our aha portal (https://ideas.sumologic.com/ideas).You can also add your use case , upvote to increase its visibility.
from sumologic-aws-lambda.
@himanshu219 Thanks, I'll look into it!
from sumologic-aws-lambda.
Added an idea to the portal: https://ideas.sumologic.com/ideas/SLP-I-3051
from sumologic-aws-lambda.
@mwarkentin : just curious, do you have a lot of existing log groups? You can manually subscribe a log group from the console to an existing function as well
from sumologic-aws-lambda.
Yes, we have a bunch of log groups. I ended up scripting a little shell script w/ the cli to subscribe our existing groups:
log_groups=$(aws logs describe-log-groups --log-group-name-prefix "${lg_prefix}" --profile ${profiles[${env}]} --query "logGroups[].logGroupName" --output text)
for lg in ${log_groups} ; do
echo "Subscribing ${arns[${env}]} to ${lg}..."
aws logs put-subscription-filter --log-group-name "${lg}" --filter-name "${env}-sumologic-cloudwatch" --filter-pattern "" --destination-arn "${arns[${env}]}" --profile ${profiles[${env}]}
done
from sumologic-aws-lambda.
The function now supports existing log groups.
from sumologic-aws-lambda.
@himanshu219 Thanks, I assume that's this change here: #57
Are there any details around how this works / how to use it?
from sumologic-aws-lambda.
Related Issues (20)
- Node.js 8.10 is EOL, please migrate your functions to a newer runtime version HOT 10
- Cannot process Nodejs10 Cloudwatch logs
- Lambda connector - create subscription fails due to throttling HOT 1
- First event into new logGroup won't invoke the subscribing function. HOT 1
- Update descripttion of logstream prefix HOT 1
- Subscription not spelled correctly in CF template
- nodejs12 support? HOT 2
- Any plan for a new release? The last one (v1.2.8) was created in Oct 2019. HOT 2
- using _sumo_metadata with non json logs
- Support China region deployment HOT 2
- Potential SAR Vulnerability HOT 1
- Support arm64 runtime and Node16? HOT 3
- Dead link in cloudwatchlogs README.md HOT 1
- Documentation HOT 1
- Linting CloudFormation templates would make them simpler HOT 1
- Support filter pattern in loggroup lambda connector
- Update deprecated Lambda runtime for SecurityHubCollectorFunction HOT 1
- cloudwatchlog_lambda.js creates a log loop by sending logs that indicate a log has been sent to SumoLogic
- Slow Log Processing with DLQ Lambda HOT 9
- The containing application will need be updated before it can be deployed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sumologic-aws-lambda.