Skip to content
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

[PL-133028] alloy configuration for the mysql slow log #1269

Open
wants to merge 1 commit into
base: fc-24.11-dev
Choose a base branch
from

Conversation

PhilTaken
Copy link
Member

@flyingcircusio/release-managers

PL-133028

based on #1264

Release process

  • Created changelog entry using ./changelog.sh

PR release workflow (internal)

  • PR has internal ticket
  • internal issue ID (PL-…) part of branch name
  • internal issue ID mentioned in PR description text
  • ticket is on Platform agile board
  • ticket state set to Pull request ready
  • if ticket is more urgent than within the next few days, directly contact a member of the Platform team

Design notes

  • Provide a feature toggle if the change might need to be adjusted/reverted quickly depending on context. Consider whether the default should be on or off. Example: rate limiting.
  • All customer-facing features and (NixOS) options need to be discoverable from documentation. Add or update relevant documentation such that hosted and guided customers can understand it as well.

Security implications

@PhilTaken PhilTaken requested review from sysvinit and ctheune February 4, 2025 14:47
@PhilTaken PhilTaken force-pushed the PL-133028_mysql-slowlog-alloy branch from 6e9555f to cb217b7 Compare February 6, 2025 08:41

### NixOS XX.XX platform

- Add configuration for alloy that exports MySQL's slow logs to loki if configured for the resource group
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't been writing changelogs for Loki-related platform features given that the integration is still considered WIP. But if you do leave it in, adding a ticket number would be nice.

@@ -10,6 +10,7 @@ let
fclib = config.fclib;
supportedPerconaVersions = ["8.0" "8.3" "8.4"];
removeDot = builtins.replaceStrings ["."] [""];
lokiServer = fclib.findOneService "loki-collector";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an implementation detail which shouldn't need to be visible for roles which provide Alloy/Loki integration, but that's something we can solve separately later.

forward_to = [loki.write.fcio_rg_loki.receiver]

stage.multiline {
firstline = "^# Time: (?P<time>.+?)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: there's multiple "weird" whitespace choices here ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah fair, I just copied the bulk of this from what alloy generated for the previous prometheus config and removed some fields that were not required or straight up caused issues when attempting to run it

@PhilTaken PhilTaken force-pushed the PL-133028_mysql-slowlog-alloy branch from cb217b7 to 1b071d6 Compare February 6, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants