Skip to content

[Metrics Alerts] Fix alerting on a rate aggregation #58621

@Zacqary

Description

@Zacqary

Part of #56432

#57606 doesn't support the rate aggregator correctly. Use the networkTraffic function from x-pack/plugins/infra/common/inventory_models/shared/metrics/snapshot/network_traffic.ts to implement something like:

if (metric.aggregation === 'rate') {
    return networkTraffic(metric.type, metric.field);
  }
  return {
    custom: {
      [metric.aggregation]: {
        field: metric.field,
      },
    },
  };

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions