diff --git a/src/common/alertmanager/alerts/CriticalMissedProposes.ts b/src/common/alertmanager/alerts/CriticalMissedProposes.ts index 4f8f6ee..e041bce 100644 --- a/src/common/alertmanager/alerts/CriticalMissedProposes.ts +++ b/src/common/alertmanager/alerts/CriticalMissedProposes.ts @@ -8,9 +8,7 @@ import { RegistrySourceOperator } from 'validators-registry'; import { Alert, AlertRequestBody, AlertRuleResult } from './BasicAlert'; -const validatorsWithMissedProposalsCountThreshold = (quantity: number) => { - return Math.min(quantity / 3, 1000); -}; +const VALIDATORS_WITH_MISSED_PROPOSALS_COUNT_THRESHOLD = 1 / 3; export class CriticalMissedProposes extends Alert { constructor(config: ConfigService, storage: ClickhouseService, operators: RegistrySourceOperator[]) { @@ -27,7 +25,7 @@ export class CriticalMissedProposes extends Alert { (a) => a.val_nos_id != null && +a.val_nos_module_id == operator.module && +a.val_nos_id == operator.index, ); if (!proposeStats) continue; - if (proposeStats.missed > validatorsWithMissedProposalsCountThreshold(proposeStats.all)) { + if (proposeStats.missed > proposeStats.all * VALIDATORS_WITH_MISSED_PROPOSALS_COUNT_THRESHOLD) { result[operator.name] = { all: proposeStats.all, missed: proposeStats.missed }; } }