pyrra
pyrra copied to clipboard
Pyrra - Sloth integration
This might be better suited as a separate project. But it could be cool if the Pyrra api layer was able to also watch for Sloth manifests, and report them in a similar way to Pyrra SLOs.
Interesting use case. I would want to avoid integrating Pyrra with all sorts of other projects directly for now. I think another project is probably the way to go indeed.
I do enjoy Sloths ability to create multiple SLOs for a single service.
Not having closely looked at how Sloth does it, this should be possible with Pyrra too. You could for example use a pyrra.dev/service=my-service label in the config and then filter based on those attached labels. Is there something more to it, that I'm missing?
ya, that would work it's just first class in sloth as service is a top level object and than you have an array of SLOs
service: "myservice"
labels:
owner: "myteam"
repo: "myorg/myservice"
tier: "2"
slos:
- name: "requests-availability"
objective: 99.9
description: "Common SLO based on availability for HTTP request responses."
sli:
events:
errorQuery: sum(rate(http_request_duration_seconds_count{job="myservice",code=~"(5..|429)"}[{{.window}}]))
totalQuery: sum(rate(http_request_duration_seconds_count{job="myservice"}[{{.window}}]))
alerting:
name: MyServiceHighErrorRate
labels:
category: "availability"
annotations:
summary: "High error rate on 'myservice' requests responses"
pageAlert:
labels:
severity: pageteam
routing_key: myteam
ticketAlert:
labels:
severity: "slack"
slack_channel: "#alerts-myteam"
I see! Thanks for posting this above. While I see how we could create some higher abstraction to group SLOs for each service, I strongly believe that what we have is more flexible and filtering for a service label should do the trick the same.