Skip to content

Commit ee0b037

Browse files
authored
Cassandra mixin updates .lint and alerts with better filtering on metrics (#1173)
1 parent 7c2b360 commit ee0b037

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

apache-cassandra-mixin/.lint

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ exclusions:
1717
- panel: "Keyspaces count"
1818
- panel: "Repair jobs started"
1919
- panel: "Repair jobs completed"
20+
panel-datasource-rule:
21+
reason: "Loki datasource variable is being named as loki_datasource now while linter expects 'datasource'"
2022
template-datasource-rule:
2123
reason: "Based on new convention we are using variable names prometheus_datasource and loki_datasource where as linter expects 'datasource'"
2224
template-instance-rule:

apache-cassandra-mixin/alerts/alerts.libsonnet

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
{
116116
alert: 'HighCpuUsage',
117117
expr: |||
118-
jvm_process_cpu_load * 100 > %(alertsCriticalHighCpuUsage5m)s
118+
jvm_process_cpu_load{job=~"integrations/apache-cassandra"} * 100 > %(alertsCriticalHighCpuUsage5m)s
119119
||| % $._config,
120120
'for': '5m',
121121
labels: {
@@ -133,7 +133,7 @@
133133
{
134134
alert: 'HighMemoryUsage',
135135
expr: |||
136-
sum(jvm_memory_usage_used_bytes{area="Heap"}) / sum(jvm_physical_memory_size) * 100 > %(alertsCriticalHighMemoryUsage5m)s
136+
sum(jvm_memory_usage_used_bytes{job=~"integrations/apache-cassandra", area="Heap"}) / sum(jvm_physical_memory_size{job=~"integrations/apache-cassandra"}) * 100 > %(alertsCriticalHighMemoryUsage5m)s
137137
||| % $._config,
138138
'for': '5m',
139139
labels: {

0 commit comments

Comments
 (0)