openvibers/openvibe.host Commits
alerts: when AI throttles free use hard, open a review item (#305)
Changes
@@@ -45,6 +45,15 @@ groups:labels: { severity: page }annotations:summary: 'OpenVibe.AI could not give a {{ $labels.marketplace }} GPU instance back ({{ $value }} tries in a row): it is still running and still being paid for'++ # OpenVibe.AI's free-tier abuse controls (AI server/abuse/, plan E5): a burst of throttles means free capacity is++ # being pushed much harder than usual from one network, device or repeated request. The throttle itself is++ # automatic; this opens a review queue item, with the page at /console/abuse on the AI operator console.++ - alert: OpenVibeAiAbuseThrottling++ expr: sum(ai_abuse_throttles) > 20++ for: 10m++ labels: { severity: ticket }++ annotations:++ summary: 'OpenVibe.AI is throttling free use hard ({{ $value }} requests in 15 minutes): review /console/abuse'- alert: HighErrorRateexpr: |sum by (service) (rate(http_requests_total{status=~"5.."}[10m]))nnew file mode 100644@@@ -0,0 +1,14 @@++'use strict';++// The alert rules shipped in deploy/prometheus/openvibe-rules.yml (loaded by Prometheus' rule_files; `ovhost alerts++// relay` sends what fires). Promtool is not installed on every agent box, so this checks the contract the AI gauge++// and the rule share: the alert names the gauge and carries a severity.++const assert = require('assert');++const fs = require('fs');++const path = require('path');++++const rules = fs.readFileSync(path.join(__dirname, '..', 'deploy', 'prometheus', 'openvibe-rules.yml'), 'utf8');++assert.ok(/alert: OpenVibeAiAbuseThrottling\n/.test(rules), 'the abuse alert exists');++assert.ok(/expr: sum\(ai_abuse_throttles\) > 20/.test(rules), 'it reads the AI gauge');++assert.ok(/alert: OpenVibeAiAbuseThrottling[\s\S]{0,200}severity: ticket/.test(rules), 'it opens a review item, never a page');++assert.ok(/alert: OpenVibeAiProviderBalanceLow\n/.test(rules) && /alert: OpenVibeAiGpuInstanceNotDestroyed\n/.test(rules), 'the earlier AI alerts are untouched');++console.log('prometheus rules: all checks passed');
@@ -45,6 +45,15 @@ groups:
@@ -45,6 +45,15 @@ groups:
labels: { severity: page }
labels: { severity: page }
annotations:
annotations:
summary: 'OpenVibe.AI could not give a {{ $labels.marketplace }} GPU instance back ({{ $value }} tries in a row): it is still running and still being paid for'
summary: 'OpenVibe.AI could not give a {{ $labels.marketplace }} GPU instance back ({{ $value }} tries in a row): it is still running and still being paid for'
+ # OpenVibe.AI's free-tier abuse controls (AI server/abuse/, plan E5): a burst of throttles means free capacity is
+ # being pushed much harder than usual from one network, device or repeated request. The throttle itself is
+ # automatic; this opens a review queue item, with the page at /console/abuse on the AI operator console.
+ - alert: OpenVibeAiAbuseThrottling
+ expr: sum(ai_abuse_throttles) > 20
+ for: 10m
+ labels: { severity: ticket }
+ annotations:
+ summary: 'OpenVibe.AI is throttling free use hard ({{ $value }} requests in 15 minutes): review /console/abuse'
- alert: HighErrorRate
- alert: HighErrorRate
expr: |
expr: |
sum by (service) (rate(http_requests_total{status=~"5.."}[10m]))
sum by (service) (rate(http_requests_total{status=~"5.."}[10m]))
new file mode 100644
new file mode 100644
@@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
+'use strict';
+// The alert rules shipped in deploy/prometheus/openvibe-rules.yml (loaded by Prometheus' rule_files; `ovhost alerts
+// relay` sends what fires). Promtool is not installed on every agent box, so this checks the contract the AI gauge
+// and the rule share: the alert names the gauge and carries a severity.
+const assert = require('assert');
+const fs = require('fs');
+const path = require('path');
+
+const rules = fs.readFileSync(path.join(__dirname, '..', 'deploy', 'prometheus', 'openvibe-rules.yml'), 'utf8');
+assert.ok(/alert: OpenVibeAiAbuseThrottling\n/.test(rules), 'the abuse alert exists');
+assert.ok(/expr: sum\(ai_abuse_throttles\) > 20/.test(rules), 'it reads the AI gauge');
+assert.ok(/alert: OpenVibeAiAbuseThrottling[\s\S]{0,200}severity: ticket/.test(rules), 'it opens a review item, never a page');
+assert.ok(/alert: OpenVibeAiProviderBalanceLow\n/.test(rules) && /alert: OpenVibeAiGpuInstanceNotDestroyed\n/.test(rules), 'the earlier AI alerts are untouched');
+console.log('prometheus rules: all checks passed');