Skip to content

Commit

Permalink
Legger til alert for publisering av meldinger.
Browse files Browse the repository at this point in the history
  • Loading branch information
ramrock93 committed Aug 31, 2023
1 parent 988dbf0 commit 3332796
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nais/alerterator-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ spec:
namespace: {{namespace}}
severity: danger

- alert: Publisering av meldinger feiler
expr: ceil(increase(spring_kafka_template_seconds_count{result="failure", app="{{app}}"}[3m])) > 0
for: 1m
annotations:
summary: "Publisering av melding med \{{ $labels.name }} feiler med \{{ $labels.exception }}. Sjekk loggene for å finne ut hvorfor dette feiler."
action: "`kubectl logs \{{ $labels.pod }} -n \{{ $labels.namespace }} -c \{{ $labels.app }}`"
labels:
namespace: {{namespace}}
severity: danger

- alert: Helsesjekk feiler
expr: floor(increase(http_server_requests_seconds_count{status!~"200", uri="/actuator/health", app="{{app}}"}[3m])) > 0
for: 2m
Expand Down
10 changes: 10 additions & 0 deletions nais/alerterator-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ spec:
namespace: {{namespace}}
severity: danger

- alert: Publisering av meldinger feiler
expr: ceil(increase(spring_kafka_template_seconds_count{result="failure", app="{{app}}"}[3m])) > 0
for: 1m
annotations:
summary: "Publisering av melding med \{{ $labels.name }} feiler med \{{ $labels.exception }}. Sjekk loggene for å finne ut hvorfor dette feiler."
action: "`kubectl logs \{{ $labels.pod }} -n \{{ $labels.namespace }} -c \{{ $labels.app }}`"
labels:
namespace: {{namespace}}
severity: danger

- alert: Helsesjekk feiler
expr: floor(increase(http_server_requests_seconds_count{status!~"200", uri="/actuator/health", app="{{app}}"}[3m])) > 0
for: 2m
Expand Down

0 comments on commit 3332796

Please sign in to comment.