Skip to content

Commit

Permalink
remove ALERT_SEVERITY_VALUE occurences, this value is not being read …
Browse files Browse the repository at this point in the history
…and shown in the Observability alerts table
  • Loading branch information
mgiota committed Aug 18, 2021
1 parent a64b656 commit 46b6201
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 20 deletions.
4 changes: 0 additions & 4 deletions packages/kbn-rule-data-utils/src/technical_field_names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ const ALERT_ID = `${ALERT_NAMESPACE}.id` as const;
const ALERT_REASON = `${ALERT_NAMESPACE}.reason` as const;
const ALERT_RISK_SCORE = `${ALERT_NAMESPACE}.risk_score` as const;
const ALERT_SEVERITY = `${ALERT_NAMESPACE}.severity` as const;
const ALERT_SEVERITY = `${ALERT_NAMESPACE}.severity.level` as const;
// const ALERT_SEVERITY_VALUE = `${ALERT_NAMESPACE}.severity.value` as const;
const ALERT_START = `${ALERT_NAMESPACE}.start` as const;
const ALERT_STATUS = `${ALERT_NAMESPACE}.status` as const;
const ALERT_SYSTEM_STATUS = `${ALERT_NAMESPACE}.system_status` as const;
Expand Down Expand Up @@ -130,7 +128,6 @@ const fields = {
ALERT_START,
ALERT_SEVERITY,
ALERT_SEVERITY,
// ALERT_SEVERITY_VALUE,
ALERT_STATUS,
ALERT_SYSTEM_STATUS,
ALERT_UUID,
Expand Down Expand Up @@ -186,7 +183,6 @@ export {
ALERT_RULE_VERSION,
ALERT_RULE_SEVERITY,
ALERT_SEVERITY,
// ALERT_SEVERITY_VALUE,
ALERT_START,
ALERT_SYSTEM_STATUS,
ALERT_UUID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@ import type {
ALERT_EVALUATION_THRESHOLD as ALERT_EVALUATION_THRESHOLD_TYPED,
ALERT_EVALUATION_VALUE as ALERT_EVALUATION_VALUE_TYPED,
ALERT_SEVERITY as ALERT_SEVERITY_TYPED,
// ALERT_SEVERITY_VALUE as ALERT_SEVERITY_VALUE_TYPED,
ALERT_REASON as ALERT_REASON_TYPED,
} from '@kbn/rule-data-utils';
import {
ALERT_EVALUATION_THRESHOLD as ALERT_EVALUATION_THRESHOLD_NON_TYPED,
ALERT_EVALUATION_VALUE as ALERT_EVALUATION_VALUE_NON_TYPED,
ALERT_SEVERITY as ALERT_SEVERITY_NON_TYPED,
// ALERT_SEVERITY_VALUE as ALERT_SEVERITY_VALUE_NON_TYPED,
ALERT_REASON as ALERT_REASON_NON_TYPED,
// @ts-expect-error
} from '@kbn/rule-data-utils/target_node/technical_field_names';
Expand Down Expand Up @@ -52,7 +50,6 @@ import {
const ALERT_EVALUATION_THRESHOLD: typeof ALERT_EVALUATION_THRESHOLD_TYPED = ALERT_EVALUATION_THRESHOLD_NON_TYPED;
const ALERT_EVALUATION_VALUE: typeof ALERT_EVALUATION_VALUE_TYPED = ALERT_EVALUATION_VALUE_NON_TYPED;
const ALERT_SEVERITY: typeof ALERT_SEVERITY_TYPED = ALERT_SEVERITY_NON_TYPED;
// const ALERT_SEVERITY_VALUE: typeof ALERT_SEVERITY_VALUE_TYPED = ALERT_SEVERITY_VALUE_NON_TYPED;
const ALERT_REASON: typeof ALERT_REASON_TYPED = ALERT_REASON_NON_TYPED;

const paramsSchema = schema.object({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
ALERT_END,
ALERT_ID,
ALERT_SEVERITY,
// ALERT_SEVERITY_VALUE,
ALERT_RULE_TYPE_ID,
ALERT_START,
ALERT_STATUS,
Expand Down Expand Up @@ -130,14 +129,6 @@ export const dynamicIndexPattern = {
aggregatable: true,
readFromDocValues: true,
},
// {
// name: 'ALERT_SEVERITY_VALUE',
// type: 'number',
// esTypes: ['long'],
// searchable: true,
// aggregatable: true,
// readFromDocValues: true,
// },
{
name: ALERT_START,
type: 'date',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const technicalRuleFieldMap = {
[Fields.ALERT_END]: { type: 'date' },
[Fields.ALERT_DURATION]: { type: 'long' },
[Fields.ALERT_SEVERITY]: { type: 'keyword' },
// [Fields.ALERT_SEVERITY_VALUE]: { type: 'long' },
[Fields.ALERT_STATUS]: { type: 'keyword' },
[Fields.ALERT_EVALUATION_THRESHOLD]: { type: 'scaled_float', scaling_factor: 100 },
[Fields.ALERT_EVALUATION_VALUE]: { type: 'scaled_float', scaling_factor: 100 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/
import {
ALERT_SEVERITY,
// ALERT_SEVERITY_VALUE,
ALERT_EVALUATION_VALUE,
ALERT_EVALUATION_THRESHOLD,
ALERT_REASON,
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/uptime/server/lib/alerts/duration_anomaly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import moment from 'moment';
import { schema } from '@kbn/config-schema';
import {
ALERT_SEVERITY,
// ALERT_SEVERITY_VALUE,
ALERT_EVALUATION_VALUE,
ALERT_EVALUATION_THRESHOLD,
ALERT_REASON,
Expand Down Expand Up @@ -136,7 +135,6 @@ export const durationAnomalyAlertFactory: UptimeAlertTypeFactory<ActionGroupIds>
[ALERT_EVALUATION_VALUE]: anomaly.actualSort,
[ALERT_EVALUATION_THRESHOLD]: anomaly.typicalSort,
[ALERT_SEVERITY]: summary.severity,
// [ALERT_SEVERITY_VALUE]: summary.severityScore,
[ALERT_REASON]: generateAlertMessage(
CommonDurationAnomalyTranslations.defaultActionMessage,
summary
Expand Down

0 comments on commit 46b6201

Please sign in to comment.