-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Migrate fastly log processor to pluto #388
base: master
Are you sure you want to change the base?
Conversation
users.users.nix-metrics = | ||
{ isNormalUser = true; | ||
description = "Nix Metrics Collection"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a statically allocated user (and uid), or can the service use the DynamicUser
feature, which creates an ad hoc user, when the service runs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's probably possible. But it does need to have the AWS credentials somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In which case we could probably use LoadCredential
.
systemd.services.process-raw-nix-logs.serviceConfig.LoadCredential = [
"aws-cred:/path/to/actual/aws-cred-file"
];
The secret will then be provided at $CREDENTIALS_DIRECTORY/aws-cred
.
We currently deploy secrets through agenix. I can help integrate the secret, if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can share the secret with me via Bitwarden and I'll create the age file? Feel free to reach out on Matrix to expedite this process.
This makes the service that ingest raw fastly logs and generates summaries (see https://github.com/NixOS/infra/tree/master/metrics/fastly) to
pluto
. Currently it's running on one of my home machines.This service runs once a week and kicks off some AWS Athena queries. It expects the credentials for the
fastly-log-processor
AWS user in/home/nix-metrics/.aws/config
. That user has access to thenixos-metrics
,nixos-athena
and fastly logs buckets.