File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ module "monitoring" {
3434
3535## Architecture
3636
37- ```
37+ ``` text
3838Prometheus (rancher-monitoring)
3939 │ evaluates PrometheusRule CRDs labelled release=rancher-monitoring
4040 ▼
@@ -253,7 +253,7 @@ A Google Chat card should appear within a few seconds.
253253Each alert produces one card. The card structure is defined in a Go template
254254stored in the ` calert-config ` Secret and rendered by calert at runtime.
255255
256- ```
256+ ``` text
257257┌─────────────────────────────────────────────────────┐
258258│ (WARNING) LonghornDiskUsageHigh | Firing │ ← header
259259├─────────────────────────────────────────────────────┤
@@ -269,7 +269,7 @@ stored in the `calert-config` Secret and rendered by calert at runtime.
269269
270270** "View Alert" button** is only rendered when ` alertmanager_url ` is set. It
271271links to:
272- ```
272+ ``` text
273273<alertmanager_url>/#/alerts?filter={alertname="<name>"}
274274```
275275
Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ provider "kubernetes" {
2828}
2929
3030module "monitoring" {
31- source = " github.com/wso2-enterprise/open-cloud-datacenter//modules/monitoring?ref=v0.3.0 "
31+ source = " ../../ "
3232
3333 # Identifiers
34- environment = " lk "
34+ environment = var . environment
3535 kubeconfig_path = var. kubeconfig_path
3636 kubeconfig_context = var. kubeconfig_context
3737
@@ -61,6 +61,11 @@ output "monitoring_resources" {
6161 }
6262}
6363
64+ variable "environment" {
65+ type = string
66+ description = " Short environment identifier used in resource names (e.g. \" lk\" )."
67+ }
68+
6469variable "kubeconfig_path" {
6570 type = string
6671 default = " ~/.kube/harvester-lk.yaml"
Original file line number Diff line number Diff line change @@ -486,7 +486,7 @@ resource "kubernetes_manifest" "prometheus_rule_storage" {
486486 },
487487 {
488488 alert = " LonghornEvictionWithDegradedVolumes"
489- expr = " longhorn_disk_eviction_requested == 1"
489+ expr = " longhorn_disk_eviction_requested == 1 and on() count(longhorn_volume_robustness{robustness= \" degraded \" }) > 0 "
490490 for = " 5m"
491491 labels = { severity = " critical" }
492492 annotations = {
You can’t perform that action at this time.
0 commit comments