-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add loki integration #21
Conversation
Test coverage for e7dc373
Static code analysis report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! questions for my own understandings only :D
Btw, would you have integration tests for loki logs? Perhaps something like https://github.com/canonical/jenkins-k8s-operator/blob/main/tests/integration/test_cos.py#L60 might suffice :D |
Good point, thanks for sharing, I'll add one in a further PR. |
@@ -0,0 +1,8 @@ | |||
alert: MaubotErrorFound | |||
expr: rate({%%juju_topology%%, pebble_service="maubot"} |= "level=error"[1m]) > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amandahla Since alerts should always be actionable, is it expected that there is an action for every logged error? Might it be worth raising the threshold a bit (e.g. 5 errors per minute, which would be > 0.083
)? Same for the NGINX alert below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I have no idea how Maubot behaves in a production environment with high usage, I decided to be extra cautious. I don't have a strong opinion, so we could start with a 5m rate and see what happens.
Applicable spec:
Overview
This PR adds loki integration. Collects metrics from workload and the charm. Also provides alert rules in case of errors.
Rationale
Collect and monitor logs.
Juju Events Changes
Module Changes
Library Changes
lib/charms/observability_libs/
Checklist
src-docs
urgent
,trivial
,complex
)