Hello i’m trying to create an alert for SpringBootTooManyErrorRequests, i want to send error when a particular instance with particular endpoints receive too many error requests, but below doesnt work, it only lists instances not url. How to add both of them in alert ruel
sum(rate(http_server_requests_seconds_count{status=~"5.."}[5m])) by (instance,url) > 0
My alert rule:
rules:
- alert: SpringBootTooManyErrorRequests
expr: |
sum(rate(http_server_requests_seconds_count{status=~"5.."}[5m])) by (instance) > 0
for: 5m
labels:
severity: warning
annotations:
description: '{{ $labels.instance }} of job {{ $labels.job }} has been receiving unsuccessful API requests for more than 5 minutes.'
summary: 'Pod {{ $labels.instance }} cannot successfully fulfill API requests' ```