Skip to content

OpenSLOs won't validate #496

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

Closed
kaosmonk opened this issue Apr 10, 2023 · 4 comments
Closed

OpenSLOs won't validate #496

kaosmonk opened this issue Apr 10, 2023 · 4 comments
Labels

Comments

@kaosmonk
Copy link

Hi team,

I am trying to generate some prometheus rules based on OpenSLO specification but even though my yaml is slightly different from the one provided by you, I am getting the following error:

error: "generate" command failed: could not generate OpenSLO format rules: could not generate prometheus rules: invalid SLO group: Key: 'SLOGroup.SLOs[0].SLI.Raw.ErrorRatioQuery' Error:Field validation for 'ErrorRatioQuery' failed on the 'template_vars' tag%

The yaml against which I am running sloth generate is as follows:

apiVersion: openslo/v1alpha
kind: SLO
metadata:
  name: pri-disk
  displayName: "SAP HANA volume free space size"
spec:
  service: hana
  description: "Common SLO based on volume free space size"
  budgetingMethod: Timeslices
  objectives:
    - ratioMetrics:
        good:
          source: prometheus
          queryType: promql
          query: "(sum(hana_disk_total_size_mb{instance='pri',path='/data/HA0'}) - sum(hanadb_disk_used_size_mb{instance='pri',path='/data/HA0/'}))"
        total:
          source: prometheus
          queryType: promql
          query: "sum(hanadb_disk_total_size_mb{instance='pri',path='/data/HA0/'})"
      target: 0.25
  timeWindows:
    - count: 1
      unit: Day

What am I doing wrong? I am not even using a Raw ratio as one can see in the example above.

@r3code
Copy link
Contributor

r3code commented Apr 11, 2023

Did you validate this spec with oslo?

@kaosmonk
Copy link
Author

kaosmonk commented May 1, 2023

Yes, am able to validate the above specs with oslo.

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

@github-actions github-actions bot added the stale label Mar 29, 2025
Copy link

This issue was closed because it has been stale for 15 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants