Add logs from AWS
You can use SolarWinds Observability to monitor logs from your Amazon AWS cloud.
To configure logs, you need a Lambda function for your AWS account. You can create this manually or using the Add AWS Host wizard. Add triggers for the log groups to be ingested in SolarWinds Observability.
Create the Lambda function once per AWS Cloud account, either manually or using the wizard. To monitor other aspects of your AWS infrastructure, add triggers for multiple log groups.
Configure the Lambda function
The Lambda function you configure is available only in the selected AWS region
Copy or create an API token (Ingestion type), found in the settings area of SolarWinds Observability.
You will need it later.See API Tokens for details.
Log in to the AWS Console and open the AWS Lambda console.
Create a new function using the public SolarWinds-Observability-Logs application available in the AWS Serverless Application Repository. See How to Deploy Applications for information about deploying serverless applications.
Configure the application with the following settings:
Paste the ingestion token you copied in step 1.
Enter an OTLP endpoint parameter or use the default value. The OTLP endpoint will change depending on the URL used to access SolarWinds Observability. See Data centers and endpoint URIs to determine your organization's endpoint.
Deploy the application to your AWS account.
For each log group that you want to monitor, configure the log events in a log group to trigger the Lambda function. If you are using EKS or Cloudtrail, send the logs and traced events to CloudWatch first, then set up your trigger.
After you complete the configuration, the AWS logs can be seen in the Logs Explorer.
Traced events and logs from Amazon services, such as EKS and CloudTrail, can be sent to a log group in CloudWatch Logs. Once the logs are configured to go to CloudWatch Logs, a trigger can be used to send the CloudWatch logs to SolarWinds Observability.
Capture CloudTrail events
If you want to capture traced events from CloudTrail service and send them to SolarWinds Observability using CloudWatch log events, configure the CloudTrail events capture.
In your AWS account, navigate to CloudTrail > Dashboard.
Create a trail and specify required parameters for a new trail, or navigate to an existing trail.
Under CloudWatch Logs, click the Enabled box and specify the target log group and access role.
Capture EKS logs
To make EKS logs available to CloudWatch and send them to SolarWinds Observability, see Logging for Amazon EKS - AWS Prescriptive Guidance in the Amazon AWS documentation.
After setting up, the following log groups will be available:
Configure log events that will trigger the Lambda function. With the newly created Lambda function open do the following:
Select CloudWatch Logs in the drop-down menu.
Either select the log group that serves as the event source or define a filter pattern.
Add more triggers, if appropriate.
(Optional) Secure the API token and OTLP endpoint parameters
To prevent the API token from being viewed in the Lambda web console, encrypt the token.
In the Lambda web console, navigate to SendLogsFunction in the Functions section.
Click the Configuration tab, and click Edit in the Environment variables section.
Click Enable helpers for encryption in transit and click Encrypt for the
API_TOKENenvironment variable. The Encryption in transit window opens.
Select your AWS KMS key, copy the text from the Execution role policy, and click Encrypt.
Repeat this operation for the
USE_ENCRYPTIONenvironment variable to
yesand click Save.
Navigate to the SendLogsFunction execution role in the IAM web console. This can be found in Configuration > Permissions > Execution role.
In the Permissions tab, choose Add permissions > Create inline policy.
In the Create policy window, activate the JSON tab and paste the execution policy previously copied from the Environment variable encryption dialog.
Click Review policy, specify the policy name, and click Create policy.
Navigate to the SendLogsFunction page and go to the Test tab.
Select CloudWatch Logs from the drop-down and click Test to verify that encrypted parameters can be accessed by the function.
If the Lambda function was created by the Add AWS Cloud Account wizard, the function will be removed when you remove the AWS cloud account integration.
If you added the Lambda function manually and do not want to monitor the AWS cloud account anymore, remove the
send-logs-app stack. Calling the function consumes resources and is subject to charge.
To remove the
- Log in to your AWS Console.
- Navigate to CloudFormation > Stacks page
- Find the
send-logs-appstack, click Delete.
The application stack and Lambda function associated with it will be removed from the account.