Comments (9)
Any rules without equality matchers should do. I think I was using this one:
alert: CPUOverUse
expr: process_cpu_seconds_total > 0.12
for: 0m
labels:
severity: Low
annotations:
summary: "Instance {{ $labels.instance }} CPU over use"
description: "{{ $labels.instance }} of job {{ $labels.job }} has used too much CPU."
from loki-k8s-operator.
@rbarry82 do you mind submitting that /
to _
replacement fix?
ok I see it's just because loki wasn't pushed yet since the fix
Revision Version Created at Status
13 13 2022-01-28 released
from loki-k8s-operator.
@dstathis Probably should be pushed to avoid the path nested from units
from loki-k8s-operator.
Hi @sed-i
When I replaced the rule with the following, Loki was happy
groups: - name: example rules: - alert: HighThroughputLogStreams expr: absent_over_time({namespace="dev",job=~".*-logs"}[2m]) for: 2m
Do you have a previous alert rule example that fails?
from loki-k8s-operator.
Any rules without equality matchers should do. I think I was using this one:
alert: CPUOverUse expr: process_cpu_seconds_total > 0.12 for: 0m labels: severity: Low annotations: summary: "Instance {{ $labels.instance }} CPU over use" description: "{{ $labels.instance }} of job {{ $labels.job }} has used too much CPU."
If the expression is: expr: process_cpu_seconds_total >= 0.12
or expr: process_cpu_seconds_total = 0.12
I get the same error... Seems it is not only the equality matcher... I'm asking in #Loki slack channel to understand if it's a Loki bug.
from loki-k8s-operator.
I guess the obvious answer for us is to use the cortex/prometheus validator.
from loki-k8s-operator.
I guess the obvious answer for us is to use the cortex/prometheus validator.
I think we have something interesting: https://github.com/grafana/cortex-tools#rules-lint
from loki-k8s-operator.
From the docs:
The linter's aim is not to verify correctness
from loki-k8s-operator.
The linter's aim is not to verify correctness but just YAML and PromQL expression formatting within the rule file.
We do not want to check the correctness of the expression in terms of it is going to retrieve valid/relevant data. We want to check if it is syntactically valid. Anyway we need to check it,
This issue started because the was no "=" in the expression.
from loki-k8s-operator.
Related Issues (20)
- Pebble ConnectionError on logging relation joined HOT 3
- Loki alerts are not being pushed to AlertManager
- charm tracing fails over tls
- add public method to `LogForwarder` to retrieve the full endpoint urls HOT 1
- LogForwader doesn't handle alert rules HOT 3
- Incorrectly assuming that `job` label is always there when replacing `%%juju_topology%%` HOT 4
- The LogForwarder should put charm to block state when Juju < 3.4 HOT 1
- TLS not working HOT 2
- Loki crashes after ResourceExhausted exc HOT 4
- Loki unit fails with "logging-relation-departed" after integrating with grafana-agent HOT 3
- Loki's own logs are stored with the "unit" labels instead of "juju_unit"
- Write a Loki data migration HOW-TO HOT 1
- warn: Maximum active stream limit exceeded HOT 2
- Revisit interactions with pebble. HOT 1
- Dashboards have confusing panels and dropdowns HOT 1
- Loki-k8s integration with tempo-k8s errors out HOT 5
- Alerts have wrong source urls (GeneratorURL) HOT 1
- Cardinality too high due to `filename` label in some use-cases HOT 5
- "Message Total" and "Messages Input" panels are still empty out of the box HOT 1
- upgrade tests to scenario 7
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 loki-k8s-operator.