Skip to content

Commit

Permalink
fix(infra): change threshold after test (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssupecial authored May 30, 2024
1 parent d0740b4 commit 0b8d76a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions config/prometheus/rules/cpu_rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ groups:
- name: cpu_alerts_per_container
rules:
- alert: HighCpuUsageClientAPIWarning
expr: (sum by (instance) (avg_over_time(system_cpu_utilization{job="backend-client-metric", system_cpu_state!="idle"}[5m])) + sum by (instance) (avg_over_time(process_cpu_utilization{job="backend-client-metric"}[5m]))) > 0.01
expr: (sum by (instance) (avg_over_time(system_cpu_utilization{job="backend-client-metric", system_cpu_state!="idle"}[5m])) + sum by (instance) (avg_over_time(process_cpu_utilization{job="backend-client-metric"}[5m]))) > 0.8
for: 1m
labels:
severity: warning
annotations:
summary: "High CPU usage detected on {{ $labels.instance }} of Client API"
description: 'CPU usage is above 80% for 1 minute (currently {{ $value | printf "%.2f" }}%)'
description: 'CPU usage is above 80% for 1 minute (currently {{ $value | printf "%.2f" }})'
value: '{{ $value | printf "%.2f" }}'

- alert: HighCpuUsageClientAPICritical
Expand All @@ -18,7 +18,7 @@ groups:
severity: 'critical'
annotations:
summary: "High CPU usage detected on {{ $labels.instance }} of Client API"
description: 'CPU usage is above 90% for 1 minute (currently {{ $value | printf "%.2f" }}%)'
description: 'CPU usage is above 90% for 1 minute (currently {{ $value | printf "%.2f" }})'
value: '{{ $value | printf "%.2f" }}'


Expand All @@ -29,7 +29,7 @@ groups:
severity: warning
annotations:
summary: "High CPU usage detected on {{ $labels.instance }} of Admin API"
description: 'CPU usage is above 80% for 1 minute (currently {{ $value | printf "%.2f" }}%)'
description: 'CPU usage is above 80% for 1 minute (currently {{ $value | printf "%.2f" }})'
value: '{{ $value | printf "%.2f" }}'

- alert: HighCpuUsageAdminAPICritical
Expand All @@ -39,7 +39,7 @@ groups:
severity: 'critical'
annotations:
summary: "High CPU usage detected on {{ $labels.instance }} of Admin API"
description: 'CPU usage is above 90% for 1 minute (currently {{ $value | printf "%.2f" }}%)'
description: 'CPU usage is above 90% for 1 minute (currently {{ $value | printf "%.2f" }})'
value: '{{ $value | printf "%.2f" }}'

# - name: cpu_alerts per instance
Expand Down

0 comments on commit 0b8d76a

Please sign in to comment.