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)
- Surface Pyrra version HOT 1
- Feature - Add link to Pyrra in alerts HOT 1
- Grafana Dashboard HOT 5
- Feature: Allow customisation of warning/critical alert levels HOT 2
- [Feature] Link Grafana Dashboard to Pyrra equivalent HOT 1
- Environment variables support in Pyrra HOT 1
- SLO dependencies / levels / hierarchy HOT 3
- Custom PropagationLabelsPrefix HOT 2
- No data Budget and Availability HOT 1
- Doubt - Error Budget
- Issue when showing some SLOs (white screen) HOT 3
- Pyrra causes instability of Prometheus HOT 1
- Fix typo in Kubernetes example readme HOT 1
- Allow providing an error rate query rather than a error count query HOT 1
- ConfigMapMode not working with option --config-map-mode=true
- Webhook Panic on Unexpected Parser Expression HOT 2
- Allow Prometheus Rules to Publish Rules to Azure Managed Prometheus HOT 3
- Grafana Alerting & Mimir support HOT 9
- Latency format incorrect when using milliseconds HOT 1
- Latency SLOs - Duplicated "p100" percentile in duration graph (UI) 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.