Skip to content

Sinks | Add AWS CloudWatch support #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ Set the secrets below associated with your desired log destination
| `AWS_REGION` | Region for the bucket |
| `S3_ENDPOINT` | (optional) Endpoint URL for S3 compatible object stores such as Cloudflare R2 or Wasabi |

### AWS CloudWatch

| Secret | Description |
| ----------------------- | --------------------------------------------------------------------------------------- |
| `AWS_ACCESS_KEY_ID` | AWS Access key with access to the log bucket |
| `AWS_SECRET_ACCESS_KEY` | AWS secret access key |
| `AWS_REGION` | Region for CloudWatch |
| `CLOUDWATCH_LOG_GROUP_NAME` | Log Group to send logs to in CloudWatch |

### Axiom

| Secret | Description |
Expand Down
12 changes: 12 additions & 0 deletions vector-configs/sinks/aws_cloudwatch.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[sinks.aws_cloudwatch]
type = "aws_cloudwatch_logs"
inputs = [ "log_json" ]
create_missing_group = true
create_missing_stream = true
group_name = "${CLOUDWATCH_LOG_GROUP_NAME}"
compression = "none"
region = "${AWS_REGION}"
stream_name = "{{ fly.app.name }}/{{ host }}"

[sinks.aws_cloudwatch.encoding]
codec = "json"