fix: guard configurable monitoring ratios

This commit is contained in:
hectorzhao
2026-08-14 17:59:22 +08:00
parent 6ccc102830
commit 0cd09441da
4 changed files with 12 additions and 7 deletions
@@ -10,6 +10,8 @@ describe('InfrastructureAlertSettingsService', () => {
expect(rules).toContain('HostCpuUsageWarning');
expect(rules).toContain('CmppGatewayQueueDelayedCritical');
expect(rules).toContain('threshold: "120秒"');
expect(rules).toContain('redis_memory_max_bytes > 0');
expect(rules).toContain('sum(increase(cmpp_api_http_requests_total');
});
it('rejects unknown keys and warning thresholds that are not below critical', () => {