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: PC-13045 Good total single query experimental support #458

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

marcinlawnik
Copy link
Contributor

@marcinlawnik marcinlawnik commented Jun 12, 2024

Motivation

Enabling support for gathering godd and total points using single query.
Currently for Splunk only.

Sample YAML:

---
apiVersion: n9/v1alpha
kind: SLO
metadata:
  name: splunk-counts-calendar
  project: splunk
spec:
  service: splunk-service
  indicator:
    metricSource:
      kind: Agent
      name: splunk
      project: splunk
  timeWindows:
    - unit: Day
      count: 1
      calendar:
        startTime: 2021-04-09 00:00:00
        timeZone: Europe/Warsaw
  budgetingMethod: Occurrences
  objectives:
    - displayName: So so
      target: 0.80
      name: objective-1
      countMetrics:
        incremental: false
        goodTotal:
          splunk:
            query:  |-
              | mstats avg("spl.intr.resource_usage.IOWait.data.avg_cpu_pct") as n9good WHERE index="_metrics" span=15s 
              | join type=left _time [
              | mstats avg("spl.intr.resource_usage.IOWait.data.max_cpus_pct") as n9total WHERE index="_metrics" span=15s
              ]
              | rename _time as n9time
              | fields n9time n9good n9total

Summary

Added new goodTotal field to count metrics spec
Added validation for splunk query with new field names n9time, n9good, n9total

Testing

  • Unit tests
  • Manual planned tests after sloctl and platform changes

No release notes, as this is in experimental stage.

cspell.yaml Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants