Skip to content

Commit

Permalink
fixed schema
Browse files Browse the repository at this point in the history
  • Loading branch information
YulNaumenko committed Nov 2, 2021
1 parent 5c6a53e commit 04717dd
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions x-pack/plugins/alerting/server/usage/alerts_usage_collector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,17 @@ const byTypeSchema: MakeSchemaFrom<AlertsUsage>['count_by_type'] = {
xpack__ml__anomaly_detection_jobs_health: { type: 'long' }, // eslint-disable-line @typescript-eslint/naming-convention
};

const byReasonSchema: MakeSchemaFrom<AlertsUsage>['count_rules_executions_failured_by_reason'] = {
// TODO: Find out an automated way to populate the keys or reformat these into an array (and change the Remote Telemetry indexer accordingly)
DYNAMIC_KEY: { type: 'long' },
read: { type: 'long' },
decrypt: { type: 'long' },
license: { type: 'long' },
unknown: { type: 'long' },
};
const byReasonSchema: MakeSchemaFrom<AlertsUsage>['count_rules_executions_failured_by_reason_per_day'] =
{
// TODO: Find out an automated way to populate the keys or reformat these into an array (and change the Remote Telemetry indexer accordingly)
DYNAMIC_KEY: { type: 'long' },
read: { type: 'long' },
decrypt: { type: 'long' },
license: { type: 'long' },
unknown: { type: 'long' },
};

const byReasonSchemaByType: MakeSchemaFrom<AlertsUsage>['count_rules_executions_failured_by_reason_by_type'] =
const byReasonSchemaByType: MakeSchemaFrom<AlertsUsage>['count_rules_executions_failured_by_reason_by_type_per_day'] =
{
// TODO: Find out an automated way to populate the keys or reformat these into an array (and change the Remote Telemetry indexer accordingly)
DYNAMIC_KEY: byTypeSchema,
Expand Down

0 comments on commit 04717dd

Please sign in to comment.