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

feat(loki-mixin): updated meta-monitoring support #15786

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

bentonam
Copy link
Contributor

What this PR does / why we need it:

  1. Filtered the logs datasource by default to exclude Loki datasources that match (?!grafanacloud-.+(alert-state-history|usage-insights)).+
  2. Added grr.libsonnet file to add better support for Grizzly so that Dashboard Folders, Dashboards and Prometheus Rules can be sync'd
  3. Adds support for the meta-monitoring chart when used. The meta-monitoring chart was setting the job label to namespace/name-component
rule {
        source_labels = ["__meta_kubernetes_namespace", "__meta_kubernetes_pod_label_app_kubernetes_io_name", "__meta_kubernetes_pod_label_app_kubernetes_io_component"]
        separator = "/"
        regex = "(.*)/(.*)/(.*)"
        replacement = "${1}/${2}-${3}"
        target_label = "job"
      }

This update handles that scenario by injecting ((loki|enterprise-logs)-)? to the selectors i.e.

job="$namespace/((loki|enterprise-logs)-)?querier"

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.

@bentonam bentonam requested a review from a team as a code owner January 16, 2025 05:08
@bentonam bentonam marked this pull request as draft January 22, 2025 14:59
Copy link
Collaborator

@trevorwhitney trevorwhitney left a comment

Choose a reason for hiding this comment

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

I really like where this is going, and the addition of the selectors and the tests. Can we clean up the SSD matchers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants