You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- SAS Job Launcher: `:sas_launcher_pod_status:`(recording rule)
94
+
95
+
### Alert Expression Format
55
96
56
-
#### Namespace Adjustments
57
-
Some alerts reference specific namespaces that need to be adjusted for your environment:
58
-
- In several rules (like `viya-pod-restart-count-high.yaml`), the namespace is set to "viya" with `namespace="viya"`. Change this to match your SAS Viya namespace.
59
-
60
-
#### Alert Expression Format
61
97
Alert expressions in these samples use a multi-part approach for better compatibility with newer Grafana versions:
62
-
- Part A: Fetches the raw metric
63
-
- Part B: Reduces the result (using the "reduce" function)
64
-
- Part C: Applies the threshold using a dedicated threshold component
65
98
66
-
This approach addresses issues where direct threshold comparisons (e.g., `metric > threshold`) might not work properly in recent Grafana versions.
99
+
- **Part A**: Fetches the raw metric
100
+
- **Part B**: Reduces the result (using the "reduce" function)
101
+
- **Part C**: Applies the threshold using a dedicated threshold component
102
+
103
+
This approach addresses issues where direct threshold comparisons (e.g., `metric > threshold`) might not work properly in recent Grafana versions. If you experience "no data" results when the underlying metric has data, ensure your alert is using this multi-part approach.
104
+
105
+
For example, instead of:
106
+
```yaml
107
+
expr: cas_thread_count > 400
108
+
```
109
+
110
+
Use:
111
+
```yaml
112
+
# Part A: Fetch the metric
113
+
expr: cas_thread_count
114
+
115
+
# Part B: Reduce the result
116
+
type: reduce
117
+
expression: A
118
+
119
+
# Part C: Apply threshold
120
+
type: threshold
121
+
expression: B
122
+
evaluator:
123
+
type: gt
124
+
params:
125
+
- 400
126
+
```
67
127
68
128
For more detailed information on Grafana alerting, see the [Grafana documentation](https://grafana.com/docs/grafana/latest/alerting/).
0 commit comments