Comments (7)
Glad you found a solution!
--generic-rules
actually only works on the filesystem
, kubernetes
or generate
sub commands. It doesn't work on the default api
command as that one only serves APIs and UIs and never generates anything.
from pyrra.
Are you using it correctly 🤔? I got same error only if I use it wrongly, like:
$ docker run -ti ghcr.io/pyrra-dev/pyrra:v0.7.0 --generic-rules
pyrra: error: unknown flag --generic-rules
If I use it in correct way, then there is no such an error:
$ docker run -ti ghcr.io/pyrra-dev/pyrra:v0.7.0 generate --generic-rules
level=info ts=2023-10-25T13:27:24.404827723Z caller=main.go:142 msg="using Prometheus" url=http://localhost:9090
from pyrra.
Maybe it would be great to specify which image/chart you are using 🙄.
from pyrra.
Oh sorry about that, I am just using the ghcr.io/pyrra-dev/pyrra:v0.7.0
image that is deployed as part of your kubernetes examples
from pyrra.
Yup, looks like that was it. I have an issue with the structure of my generic-rules.yaml
file now it looks like :
level=info ts=2023-10-25T13:43:47.683319981Z caller=main.go:142 msg="using Prometheus" url=http://localhost:9090
level=error ts=2023-10-25T13:43:47.684517622Z caller=generate.go:33 msg="generating rule files" err="failed to get objective: failed to unmarshal objective \"/etc/pyrra/generic-rules.yaml\": error unmarshaling JSON: while decoding JSON: json: unknown field \"recordingRules\
but at least was able to progress, thanks!
from pyrra.
The structure should look like:
apiVersion: pyrra.dev/v1alpha1
kind: ServiceLevelObjective
metadata:
name: loki-availability
namespace: monitoring
labels:
release: k8s
role: alert-rules
spec:
description: Loki availability based on duration of requests
target: "99"
window: 7d
indicator:
ratio:
errors:
metric: loki_request_duration_seconds_count{namespace="monitoring", job="loki-querier", status_code=~"5[0-9]{2}"}
total:
metric: loki_request_duration_seconds_count{namespace="monitoring", job="loki-querier"}
If you are happy with the solution of this issue, then you can proceed with closing this ticket.
from pyrra.
Awesome, thanks! Will close now.
from pyrra.
Related Issues (20)
- Using Kubernetes labels/annotation as Prometheus alert labels and annotations is limiting HOT 4
- 0s burnrate generated HOT 3
- Unexpected grouping for ratios HOT 1
- Issue with Grouping in Latency indicator HOT 3
- Google Managed Prometheus breaks on `partial_reponse` in queries. HOT 2
- Allow customisation of the name of the recording rules HOT 1
- Error Budget showing strange skew HOT 1
- Using Grafana UI with standard generated prometheus rules HOT 2
- One faulty slo disables all slos HOT 1
- Setting dashboard view longer than 4w HOT 1
- Time based error budget (feature request) HOT 1
- Proposal for Saturation SLO HOT 2
- pyrra_errors_total inaccurate in Grafana dashboard
- New line inserted in the generated files HOT 1
- Rules are not valid with latest prometheus-operator HOT 2
- Invalid prometheus rule when trying to add grouping to SLO HOT 7
- Generic rules causes incorrect graphs in grafana HOT 3
- Customizable reload URI HOT 1
- Reconcile errors "prometheus rule not found" HOT 2
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 pyrra.