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

OpenSLOs won't validate #496

Open
kaosmonk opened this issue Apr 10, 2023 · 2 comments
Open

OpenSLOs won't validate #496

kaosmonk opened this issue Apr 10, 2023 · 2 comments

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

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.

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

No branches or pull requests

2 participants