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

Merged
merged 13 commits into from
Jul 11, 2024

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
@marcinlawnik marcinlawnik requested a review from nieomylnieja July 1, 2024 20:14
@paulina-n9
Copy link

lgtm

@marcinlawnik marcinlawnik merged commit 77ff3d4 into main Jul 11, 2024
5 checks passed
@marcinlawnik marcinlawnik deleted the PC-13045-splunk-single-query branch July 11, 2024 10:12
renovate bot referenced this pull request in nobl9/sloctl Jul 12, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/nobl9/nobl9-go](https://togithub.com/nobl9/nobl9-go) |
`v0.83.0-rc3` -> `v0.83.0-rc4` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fnobl9%2fnobl9-go/v0.83.0-rc4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fnobl9%2fnobl9-go/v0.83.0-rc4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fnobl9%2fnobl9-go/v0.83.0-rc3/v0.83.0-rc4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fnobl9%2fnobl9-go/v0.83.0-rc3/v0.83.0-rc4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>nobl9/nobl9-go (github.com/nobl9/nobl9-go)</summary>

###
[`v0.83.0-rc4`](https://togithub.com/nobl9/nobl9-go/releases/tag/v0.83.0-rc4)

[Compare
Source](https://togithub.com/nobl9/nobl9-go/compare/v0.83.0-rc3...v0.83.0-rc4)

#### What's Changed

- feat: Define manifest objects examples in code by
[@&#8203;nieomylnieja](https://togithub.com/nieomylnieja) in
[https://github.com/nobl9/nobl9-go/pull/477](https://togithub.com/nobl9/nobl9-go/pull/477)
- chore: Add Alert Method e2e tests by
[@&#8203;nieomylnieja](https://togithub.com/nieomylnieja) in
[https://github.com/nobl9/nobl9-go/pull/481](https://togithub.com/nobl9/nobl9-go/pull/481)
- chore: Update module github.com/aws/aws-sdk-go to v1.54.16 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/nobl9/nobl9-go/pull/487](https://togithub.com/nobl9/nobl9-go/pull/487)
- chore: Add v1alpha RoleBinding e2e tests by
[@&#8203;nieomylnieja](https://togithub.com/nieomylnieja) in
[https://github.com/nobl9/nobl9-go/pull/486](https://togithub.com/nobl9/nobl9-go/pull/486)
- chore: Add Alert Method e2e tests by
[@&#8203;nieomylnieja](https://togithub.com/nieomylnieja) in
[https://github.com/nobl9/nobl9-go/pull/488](https://togithub.com/nobl9/nobl9-go/pull/488)
- chore: Update module github.com/aws/aws-sdk-go to v1.54.17 by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/nobl9/nobl9-go/pull/489](https://togithub.com/nobl9/nobl9-go/pull/489)
- feat: PC-13045 Good total single query experimental support by
[@&#8203;marcinlawnik](https://togithub.com/marcinlawnik) in
[https://github.com/nobl9/nobl9-go/pull/458](https://togithub.com/nobl9/nobl9-go/pull/458)

**Full Changelog**:
nobl9/nobl9-go@v0.83.0-rc3...v0.83.0-rc4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 10pm every weekday,before 5am
every weekday,every weekend" (UTC), Automerge - At any time (no schedule
defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/nobl9/sloctl).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJnb2xhbmciLCJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

5 participants