-
Notifications
You must be signed in to change notification settings - Fork 5
Feat/83 grafana alerts and rules #129
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
de6a7e2
feat(grafana-and-prometheus): add prometheus alerts and rules
luaraggio 77fb339
feat(prometheus-and-grafana): add alertmanager to handle alerts with …
luaraggio 1063d40
fix(prometheus): change proxy redirect for prometheus serving metrics
luaraggio b81b068
feat(grafana):add dashboards and configs for use exporters in UI
luaraggio e6ef5fe
fix(grafana-alerts): add Mount it as read-only in alertmanager volume
luaraggio ff5c90b
refactor(grafana-alerts): update infra/prometheus/config/alerts.yml
luaraggio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| global: | ||
| resolve_timeout: 5m | ||
|
|
||
| route: | ||
| receiver: default | ||
| group_by: ["alertname", "job", "severity"] | ||
| group_wait: 30s | ||
| group_interval: 5m | ||
| repeat_interval: 2h | ||
|
|
||
| receivers: | ||
| - name: default | ||
|
|
||
| inhibit_rules: | ||
| - source_matchers: | ||
| - severity="critical" | ||
| target_matchers: | ||
| - severity="warning" | ||
| equal: ["alertname", "job", "instance"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| groups: | ||
| - name: availability | ||
| rules: | ||
| - alert: TargetDown | ||
| expr: up == 0 | ||
| for: 2m | ||
| labels: | ||
| severity: critical | ||
| annotations: | ||
| summary: "Target down: {{ $labels.job }}" | ||
| description: "The target {{ $labels.instance }} has been down for more than 2 minutes." | ||
|
|
||
| - alert: HttpProbeFailed | ||
| expr: probe_success{job="blackbox-http"} == 0 | ||
|
luaraggio marked this conversation as resolved.
Outdated
|
||
| for: 2m | ||
| labels: | ||
| severity: critical | ||
| annotations: | ||
| summary: "HTTP probe failed: {{ $labels.instance }}" | ||
| description: "Blackbox probe for {{ $labels.instance }} has failed for more than 2 minutes." | ||
|
|
||
| - name: host-resources | ||
| rules: | ||
| - alert: HostHighCpuUsage | ||
| expr: 100 - (avg by(instance)(irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 85 | ||
| for: 10m | ||
| labels: | ||
| severity: warning | ||
| annotations: | ||
| summary: "High CPU usage on {{ $labels.instance }}" | ||
| description: "CPU usage has been above 85% for 10 minutes." | ||
|
|
||
| - alert: HostHighMemoryUsage | ||
| expr: (1 - ((node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes))) * 100 > 90 | ||
| for: 10m | ||
| labels: | ||
| severity: warning | ||
| annotations: | ||
| summary: "High memory usage on {{ $labels.instance }}" | ||
| description: "Memory usage has been above 90% for 10 minutes." | ||
|
|
||
| - name: containers | ||
| rules: | ||
| - alert: ContainerRestartSpike | ||
| expr: increase(container_start_time_seconds[15m]) > 2 | ||
| for: 0m | ||
| labels: | ||
| severity: warning | ||
| annotations: | ||
| summary: "Container restart spike" | ||
| description: "Container {{ $labels.name }} restarted multiple times in 15 minutes." | ||
|
luaraggio marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.