Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Zacqary opened this issue Feb 26, 2020 · 3 comments · Fixed by #58789
Closed

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

Zacqary opened this issue Feb 26, 2020 · 3 comments · Fixed by #58789
Assignees
Labels
Feature:Alerting Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services

Comments

@Zacqary
Copy link
Contributor

Zacqary commented Feb 26, 2020

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,
      },
    },
  };
@Zacqary Zacqary added Feature:Alerting Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services labels Feb 26, 2020
@Zacqary Zacqary self-assigned this Feb 26, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/logs-metrics-ui (Team:logs-metrics-ui)

@Zacqary
Copy link
Contributor Author

Zacqary commented Feb 27, 2020

@simianhacker Can you remind me what the metric.type param is supposed to be in the example implementation? e.g. for avg of system.load.1 I know that I need to do:

avg: {
  field: 'system.load.1'
}

but I'm not sure what to do for rate of system.load.1

@Zacqary
Copy link
Contributor Author

Zacqary commented Feb 27, 2020

Never mind, realized it can just take an arbitrary string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting Feature:Metrics UI Metrics UI feature Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants