mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[ML] fix alert instance key for the single metric job (#93442)
This commit is contained in:
parent
a0881f90e2
commit
a8d45e7457
1 changed files with 3 additions and 1 deletions
|
@ -258,7 +258,9 @@ export function alertingServiceProvider(mlClient: MlClient, esClient: Elasticsea
|
||||||
} else if (source.result_type === ANOMALY_RESULT_TYPE.RECORD) {
|
} else if (source.result_type === ANOMALY_RESULT_TYPE.RECORD) {
|
||||||
const fieldName = getEntityFieldName(source);
|
const fieldName = getEntityFieldName(source);
|
||||||
const fieldValue = getEntityFieldValue(source);
|
const fieldValue = getEntityFieldValue(source);
|
||||||
alertInstanceKey += `_${source.detector_index}_${source.function}_${fieldName}_${fieldValue}`;
|
const entity =
|
||||||
|
fieldName !== undefined && fieldValue !== undefined ? `_${fieldName}_${fieldValue}` : '';
|
||||||
|
alertInstanceKey += `_${source.detector_index}_${source.function}${entity}`;
|
||||||
}
|
}
|
||||||
return alertInstanceKey;
|
return alertInstanceKey;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue