Skip to content

Commit

Permalink
temporarily remove severity value occurences
Browse files Browse the repository at this point in the history
  • Loading branch information
mgiota committed Aug 18, 2021
1 parent 4ad4b79 commit a64b656
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
7 changes: 3 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 @@ -33,7 +33,7 @@ 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_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 +130,7 @@ const fields = {
ALERT_START,
ALERT_SEVERITY,
ALERT_SEVERITY,
ALERT_SEVERITY_VALUE,
// ALERT_SEVERITY_VALUE,
ALERT_STATUS,
ALERT_SYSTEM_STATUS,
ALERT_UUID,
Expand Down Expand Up @@ -186,8 +186,7 @@ export {
ALERT_RULE_VERSION,
ALERT_RULE_SEVERITY,
ALERT_SEVERITY,
ALERT_SEVERITY,
ALERT_SEVERITY_VALUE,
// 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,14 @@ 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_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_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 +52,7 @@ 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_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 Expand Up @@ -259,7 +259,7 @@ export function registerTransactionDurationAnomalyAlertType({
[TRANSACTION_TYPE]: transactionType,
[PROCESSOR_EVENT]: ProcessorEvent.transaction,
[ALERT_SEVERITY]: severityLevel,
[ALERT_SEVERITY_VALUE]: score,
// [ALERT_SEVERITY_VALUE]: score,
[ALERT_EVALUATION_VALUE]: score,
[ALERT_EVALUATION_THRESHOLD]: threshold,
[ALERT_REASON]: formatTransactionDurationAnomalyReason({
Expand Down
18 changes: 9 additions & 9 deletions x-pack/plugins/observability/public/pages/alerts/example_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
ALERT_END,
ALERT_ID,
ALERT_SEVERITY,
ALERT_SEVERITY_VALUE,
// ALERT_SEVERITY_VALUE,
ALERT_RULE_TYPE_ID,
ALERT_START,
ALERT_STATUS,
Expand Down Expand Up @@ -130,14 +130,14 @@ export const dynamicIndexPattern = {
aggregatable: true,
readFromDocValues: true,
},
{
name: ALERT_SEVERITY_VALUE,
type: 'number',
esTypes: ['long'],
searchable: true,
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 @@ -6,7 +6,7 @@
*/
import {
ALERT_SEVERITY,
ALERT_SEVERITY_VALUE,
// ALERT_SEVERITY_VALUE,
ALERT_EVALUATION_VALUE,
ALERT_EVALUATION_THRESHOLD,
ALERT_REASON,
Expand Down Expand Up @@ -172,7 +172,7 @@ describe('duration anomaly alert', () => {
[ALERT_EVALUATION_VALUE]: anomaly.actualSort,
[ALERT_EVALUATION_THRESHOLD]: anomaly.typicalSort,
[ALERT_SEVERITY]: getSeverityType(anomaly.severity),
[ALERT_SEVERITY_VALUE]: anomaly.severity,
// [ALERT_SEVERITY_VALUE]: anomaly.severity,
[ALERT_REASON]: `Abnormal (${getSeverityType(
anomaly.severity
)} level) response time detected on uptime-monitor with url ${
Expand Down

0 comments on commit a64b656

Please sign in to comment.