Skip to content

Commit

Permalink
Fix SLA alert name
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Bigler <[email protected]>
  • Loading branch information
TheBigLee committed Feb 5, 2025
1 parent 40eb33d commit e4470bf
Show file tree
Hide file tree
Showing 23 changed files with 69 additions and 69 deletions.
6 changes: 3 additions & 3 deletions component/vshn_alerting.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local genGenericAlertingRule(serviceName) = {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'PrometheusRule',
metadata: {
name: 'vshn-' + std.asciiLower(serviceName) + '-new-sla',
name: 'vshn-' + std.asciiLower(serviceName) + '-sla',
namespace: params.slos.namespace,
labels: {
syn_team: 'schedar',
Expand All @@ -23,7 +23,7 @@ local genGenericAlertingRule(serviceName) = {
name: 'appcat-' + std.asciiLower(serviceName) + '-sla-target',
rules: [
{
alert: 'vshn-' + std.asciiLower(serviceName) + '-new-sla',
alert: serviceName + 'Sla',
// this query can be read as: if the rate of probes that are not successful is higher than 0.2 in the last 5 minutes and in the last minute, then alert
// rate works on per second basis, so 0.2 means 20% of the probes are failing, which for 5 minutes is 1 minute and for 1 minute is 45 seconds
expr: 'rate(appcat_probes_seconds_count{reason!="success", service="' + serviceName + '", ha="false", maintenance="false"}[5m]) > 0.2 and rate(appcat_probes_seconds_count{reason!="success", service="' + serviceName + '", ha="false", maintenance="false"}[1m]) > 0.75',
Expand All @@ -42,7 +42,7 @@ local genGenericAlertingRule(serviceName) = {
},
},
{
alert: 'vshn-' + std.asciiLower(serviceName) + '-new-sla-ha',
alert: serviceName + 'SlaHA',
// this query can be read as: if the rate of probes that are not successful is higher than 0.2 in the last 5 minutes and in the last minute, then alert
// rate works on per second basis, so 0.2 means 20% of the probes are failing, which for 5 minutes is 1 minute and for 1 minute is 45 seconds
expr: 'rate(appcat_probes_seconds_count{reason!="success", service="' + serviceName + '", ha="true"}[5m]) > 0.2 and rate(appcat_probes_seconds_count{reason!="success", service="' + serviceName + '", ha="true"}[1m]) > 0.75',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnkeycloak-new-sla
name: vshn-vshnkeycloak-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnkeycloak-sla-target
rules:
- alert: vshn-vshnkeycloak-new-sla
- alert: VSHNKeycloakSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnkeycloak-new-sla-ha
- alert: VSHNKeycloakSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnmariadb-new-sla
name: vshn-vshnmariadb-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnmariadb-sla-target
rules:
- alert: vshn-vshnmariadb-new-sla
- alert: VSHNMariaDBSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnmariadb-new-sla-ha
- alert: VSHNMariaDBSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnnextcloud-new-sla
name: vshn-vshnnextcloud-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnnextcloud-sla-target
rules:
- alert: vshn-vshnnextcloud-new-sla
- alert: VSHNNextcloudSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnnextcloud-new-sla-ha
- alert: VSHNNextcloudSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnpostgresql-new-sla
name: vshn-vshnpostgresql-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnpostgresql-sla-target
rules:
- alert: vshn-vshnpostgresql-new-sla
- alert: VSHNPostgreSQLSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnpostgresql-new-sla-ha
- alert: VSHNPostgreSQLSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnredis-new-sla
name: vshn-vshnredis-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnredis-sla-target
rules:
- alert: vshn-vshnredis-new-sla
- alert: VSHNRedisSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnredis-new-sla-ha
- alert: VSHNRedisSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnkeycloak-new-sla
name: vshn-vshnkeycloak-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnkeycloak-sla-target
rules:
- alert: vshn-vshnkeycloak-new-sla
- alert: VSHNKeycloakSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnkeycloak-new-sla-ha
- alert: VSHNKeycloakSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnmariadb-new-sla
name: vshn-vshnmariadb-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnmariadb-sla-target
rules:
- alert: vshn-vshnmariadb-new-sla
- alert: VSHNMariaDBSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnmariadb-new-sla-ha
- alert: VSHNMariaDBSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnnextcloud-new-sla
name: vshn-vshnnextcloud-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnnextcloud-sla-target
rules:
- alert: vshn-vshnnextcloud-new-sla
- alert: VSHNNextcloudSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnnextcloud-new-sla-ha
- alert: VSHNNextcloudSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnpostgresql-new-sla
name: vshn-vshnpostgresql-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnpostgresql-sla-target
rules:
- alert: vshn-vshnpostgresql-new-sla
- alert: VSHNPostgreSQLSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnpostgresql-new-sla-ha
- alert: VSHNPostgreSQLSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnredis-new-sla
name: vshn-vshnredis-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnredis-sla-target
rules:
- alert: vshn-vshnredis-new-sla
- alert: VSHNRedisSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnredis-new-sla-ha
- alert: VSHNRedisSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnkeycloak-new-sla
name: vshn-vshnkeycloak-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnkeycloak-sla-target
rules:
- alert: vshn-vshnkeycloak-new-sla
- alert: VSHNKeycloakSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnkeycloak-new-sla-ha
- alert: VSHNKeycloakSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnmariadb-new-sla
name: vshn-vshnmariadb-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnmariadb-sla-target
rules:
- alert: vshn-vshnmariadb-new-sla
- alert: VSHNMariaDBSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnmariadb-new-sla-ha
- alert: VSHNMariaDBSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnminio-new-sla
name: vshn-vshnminio-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnminio-sla-target
rules:
- alert: vshn-vshnminio-new-sla
- alert: VSHNMinioSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnminio-new-sla-ha
- alert: VSHNMinioSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ metadata:
syn: 'true'
syn_component: appcat
syn_team: schedar
name: vshn-vshnnextcloud-new-sla
name: vshn-vshnnextcloud-sla
namespace: syn-appcat-slos
spec:
groups:
- name: appcat-vshnnextcloud-sla-target
rules:
- alert: vshn-vshnnextcloud-new-sla
- alert: VSHNNextcloudSla
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand All @@ -27,7 +27,7 @@ spec:
syn: 'true'
syn_component: appcat
syn_team: schedar
- alert: vshn-vshnnextcloud-new-sla-ha
- alert: VSHNNextcloudSlaHA
annotations:
summary: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
title: '{{$labels.service}} {{$labels.name}} down in {{$labels.namespace}}'
Expand Down
Loading

0 comments on commit e4470bf

Please sign in to comment.