GithubHelp home page GithubHelp logo

Comments (8)

himanshu219 avatar himanshu219 commented on August 10, 2024 1

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.

himanshu219 avatar himanshu219 commented on August 10, 2024

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.

mwarkentin avatar mwarkentin commented on August 10, 2024

@himanshu219 Thanks, I'll look into it!

from sumologic-aws-lambda.

mwarkentin avatar mwarkentin commented on August 10, 2024

Added an idea to the portal: https://ideas.sumologic.com/ideas/SLP-I-3051

from sumologic-aws-lambda.

sumo-apps-team avatar sumo-apps-team commented on August 10, 2024

@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.

mwarkentin avatar mwarkentin commented on August 10, 2024

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.

himanshu219 avatar himanshu219 commented on August 10, 2024

The function now supports existing log groups.

from sumologic-aws-lambda.

mwarkentin avatar mwarkentin commented on August 10, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.