Comments (5)
Hi @Eddie4Frost!
In order to help you, I need more context :D
- Sloth logs.
- SLO.
- Are the metrics on the prometheus.
- The generated rules are loaded on Prometheus.
- ...
from sloth.
Hi @slok, my bad! Thank you for your response, below:
The metrics available on Prometheus:
The sloth log:
INFO[0000] SLI plugins loaded plugins=0 svc=storage.FileSLIPlugin version=v0.9.0 window=30d INFO[0000] SLO period windows loaded svc=alert.WindowsRepo version=v0.9.0 window=30d windows=2 INFO[0000] Loading Kubernetes configuration... version=v0.9.0 INFO[0000] Kubernetes controller running version=v0.9.0 window=30d INFO[0000] starting controller controller-id=sloth lib=kooper service=kooper.controller version=v0.9.0 window=30d INFO[0000] Hot-reload http server listening addr=":8082" version=v0.9.0 window=30d INFO[0000] Metrics http server listening addr=":8081" version=v0.9.0 window=30d INFO[0000] OS signals listener started version=v0.9.0 window=30d INFO[0000] Hot-reload manager running version=v0.9.0 window=30d INFO[0001] Hot-reload triggered from http webhook version=v0.9.0 window=30d INFO[0001] SLI plugins loaded plugins=15 svc=storage.FileSLIPlugin version=v0.9.0 window=30d
Grafana Query Inspector query:
Object request:Object url:"api/datasources/proxy/1/api/v1/query_range" method:"POST" data:Object query:"1-( sum_over_time( ( slo:sli_error:ratio_rate1h{sloth_service="myservice",sloth_slo="requests-availability"} * on() group_left() ( month() == bool vector(12) ) )[32d:1h] ) / on(sloth_id) ( slo:error_budget:ratio{sloth_service="myservice",sloth_slo="requests-availability"} *on() group_left() (24 * days_in_month()) ) )" start:1638327600 end:1641006000 step:3600 hideFromInspector:false response:Object status:"**success**" data:Object resultType:"matrix" result:Array[0]
Thank you
from sloth.
Do other SLOs work for you, or happen on all of them?. Maye it's just that you aren't burning anything (rare, but who knows...) so there's nothing to chart. To test, you can use the "fake" plugin to simulate different burn rates (this should show you something always):
---
apiVersion: sloth.slok.dev/v1
kind: PrometheusServiceLevel
metadata:
name: slo-test
labels:
prometheus: prometheus
role: alert-rules
spec:
service: "test"
slos:
- name: "five-nines"
objective: 99.999
sli:
plugin:
id: "sloth-common/fake"
options:
burn_rate: "0.65"
jitter_percent: "10"
alerting:
name: "TestSLOFiveNinesFailing"
pageAlert:
disable: true
ticketAlert:
disable: true
from sloth.
@slok do you think adding a vector(0)
in this case would make sense?
1-(
sum_over_time(
(
slo:sli_error:ratio_rate1h{sloth_service="${service}",sloth_slo="${slo}"}
* on() group_left() (
month() == bool vector(${__to:date:M})
)
)[32d:1h]
)
/ on(sloth_id)
(
slo:error_budget:ratio{sloth_service="${service}",sloth_slo="${slo}"} *on() group_left() (24 * days_in_month())
) or vector(0)
)
from sloth.
Hi @slok I do have the same problem, here's a screenshot for the fake plugin as you mentioned on your last comment:
I'm using the helm chart version
I don't see anything wrong on the sloth pod logs:
INFO[0000] SLI plugins loaded plugins=0 svc=storage.FileSLIPlugin version=v0.9.0 window=30d INFO[0000] SLO period windows loaded svc=alert.WindowsRepo version=v0.9.0 window=30d windows=2 INFO[0000] Loading Kubernetes configuration... version=v0.9.0 INFO[0000] Kubernetes controller running version=v0.9.0 window=30d INFO[0000] Hot-reload http server listening addr=":8082" version=v0.9.0 window=30d INFO[0000] Metrics http server listening addr=":8081" version=v0.9.0 window=30d INFO[0000] Hot-reload manager running version=v0.9.0 window=30d INFO[0000] OS signals listener started version=v0.9.0 window=30d INFO[0000] starting controller controller-id=sloth lib=kooper service=kooper.controller version=v0.9.0 window=30d INFO[0001] Hot-reload triggered from http webhook version=v0.9.0 window=30d INFO[0001] SLI plugins loaded plugins=15 svc=storage.FileSLIPlugin version=v0.9.0 window=30d
Thank you!
from sloth.
Related Issues (20)
- How can I reset the error budget remaining to 100 for 7 days from 30days HOT 3
- Option to generate sloth yaml - using 5m record rule chaining
- Sloth Alerting Rules Not Firing - Graphs Empty on Query Test HOT 1
- Help on Latency SLO definition HOT 1
- Testing an operator which manages Sloth SLOs HOT 1
- Question: Is there a way to refer totalQuery via template variable in errorQuery
- promql expr validation issues HOT 2
- Overriding the `sloth_id` doesn't work
- Feature Request: Provision SLOs from Helm install HOT 2
- Issues making Sloth work with Google Managed Prometheus HOT 1
- what does the current remaining buget -4.69e -12% mean in sloth HOT 2
- Alerting expression changes in Prometheus Alerts browser HOT 1
- 🔴 Project Status HOT 9
- Confusing definitions of errorQuery and totalQuery
- Have you considered creating 'totalQuery' as a recording rule as well?
- grafana dashboard broken for SLOs with dots in the name
- error: "generate" command failed: invalid spec, could not load with any of the supported spec types HOT 1
- How can one add a weekly maintenance window into the calculations for SLO's with sloth? HOT 1
- NaN in SLO dashboard HOT 5
- Sloth pod is not showing SLO metrics HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sloth.