Skip to content

Commit

Permalink
added flake.nix part
Browse files Browse the repository at this point in the history
  • Loading branch information
AronNovak committed Feb 28, 2024
1 parent d4b421c commit 4c4b101
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion Guide/deployment.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,43 @@ Mind the region of your EC2 instance for these steps.
]
}
```
- Configure the `services.vector` part in your `flake.nix` to activate logging.
- Configure the `services.vector` part in your `flake.nix` to activate logging:
```
services.vector = {
enable = true;
journaldAccess = true;
settings = {
sources.journald = {
type = "journald";
include_units = ["app.service" "nginx.service" "worker.service"];
};
transforms.remap_remove_specific_keys = {
type = "remap";
inputs = ["journald"];
source = ''
del(._STREAM_ID)
del(._SYSTEMD_UNIT)
del(._BOOT_ID)
del(.source_type)
'';
};
sinks.out = {
auth = {
access_key_id = "YOUR-IAM-ACCESS-KEY";
secret_access_key = "YOUR-IAM-ACCESS-KEY";
};
inputs = ["remap_remove_specific_keys"];
type = "aws_cloudwatch_logs";
compression = "gzip";
encoding.codec = "json";
region = "us-east-1";
group_name = "tpp-qa";
stream_name = "in";
};
};
};
```
- Review the incoming log entries, adjust remapping accordingly. You might want to remove or transform more entries to make the logs useful for alerts or accountability.

### Connecting to the EC2 / Virtual Machine Instance

Expand Down

0 comments on commit 4c4b101

Please sign in to comment.