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 UI] Add overrides to Snapshot API to support alert previews #68125

Merged
merged 4 commits into from
Jun 3, 2020

Conversation

simianhacker
Copy link
Member

@simianhacker simianhacker commented Jun 3, 2020

Summary

This PR adds overrides to the Snapshot API to support the alert previews and charts. This adds a few new options to the SnapshotRequest:

  • timerange.lookbackSize – The snapshot API returns data for the last 5 buckets by default. This option will override the default and allow the developer to control the number of buckets. We plan to use this for the the charts on the Inventory Alerts so we can give the user a preview of the last 20 buckets.
  • timerange.ignoreLookback – This options ignores the lookback and returns the entire timerange.
  • timerange.forceInterval – By default the snapshot API tries to lookup the metricset.period for each field used in the aggregations. This options allows us to override that feature and force the interval specified in the timerange object.
  • includeTimeseries – This option will add the timeseries object, which uses MetricsExplorerSeries as the type, to the metric object on the SnapshotNode objects

This PR also renames the integration tests from x-pack/test/api_integration/infra to x-pack/test/api_integration/metrics_ui and waffle to snapshot.

Checklist

Delete any items that are not applicable to this PR.

@simianhacker simianhacker changed the title [Metrics UI] Add overrides to Snapshot API for Alerts [Metrics UI] Add overrides to Snapshot API to support alert previews Jun 3, 2020
@simianhacker simianhacker added 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 v7.9.0 v8.0.0 release_note:enhancement labels Jun 3, 2020
@simianhacker simianhacker requested a review from Zacqary June 3, 2020 18:59
@simianhacker simianhacker marked this pull request as ready for review June 3, 2020 19:13
@simianhacker simianhacker requested a review from a team as a code owner June 3, 2020 19:13
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@Zacqary Zacqary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge, one small suggestion if you want to take it

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@simianhacker simianhacker merged commit 0b8e0c0 into elastic:master Jun 3, 2020
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 4, 2020
…ms-column

* 'master' of github.com:elastic/kibana: (63 commits)
  remove scripts. prettire update has been done (elastic#68130)
  Closes elastic#68055 by detecting the local Kibana version and using that as (elastic#68198)
  [apm] docs: add deployment annotation example (elastic#67408)
  [ML] Extend population preview chart to show actual and typical value (elastic#67569)
  Refactor index management client integration tests for scalability (elastic#67917)
  Add generator function that creates multiple alerts (elastic#67713)
  chore(NA): remove config arg from os packages (elastic#67871)
  [Reporting] Move code out of Legacy (elastic#67904)
  [Metrics UI] Add overrides to Snapshot API to support alert previews (elastic#68125)
  [Security] [Cases] Manage timeline UI API (elastic#67719)
  [ENDPOINT][INGEST]Task/endpoint ingest update (elastic#67234)
  Fix code coverage for jest, upload merged reports (elastic#68149)
  Update documentation/examples of deprecated namespaceAgnostic field (elastic#68039)
  [DOCS] Updates Canvas docs with new menus (elastic#66061)
  chore(NA): avoids imports of server or public code into common (elastic#67231)
  [SIEM] Fix GetOneTimeline graphql type (elastic#68137)
  skip flaky suite (elastic#67838)
  [Uptime] Add loading message for monitor list no items (elastic#67378)
  [Ingest Manager] Update indexing strategy docs to use dataset.* (elastic#68068)
  [Ingest Manager] Fix datasource validation for streams without vars (elastic#67950)
  ...

# Conflicts:
#	x-pack/plugins/index_management/__jest__/client_integration/helpers/index.ts
#	x-pack/plugins/index_management/__jest__/client_integration/home.test.ts
#	x-pack/plugins/index_management/__jest__/client_integration/home/index_templates_tab.helpers.ts
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 4, 2020
* master: (26 commits)
  [Console]remove completion for type for filter queries and aggs (elastic#68103)
  [ML] Transforms: Filter aggregation support (elastic#67591)
  [ES UI Shared] Monaco XJSON (elastic#67485)
  [Index Management] Add data streams functionality to indices tab (elastic#67940)
  [Discover] Fix renaming of saved search not displayed in breadcrumb (elastic#67577)
  [SECURITY] Rename siem plugin to security_solution (elastic#67902)
  [Uptime] Fix Telemetry Api flaky test (elastic#67358)
  [Data plugin] Add configuration property to enable / disable autocomplete (elastic#67847)
  remove scripts. prettire update has been done (elastic#68130)
  Closes elastic#68055 by detecting the local Kibana version and using that as (elastic#68198)
  [apm] docs: add deployment annotation example (elastic#67408)
  [ML] Extend population preview chart to show actual and typical value (elastic#67569)
  Refactor index management client integration tests for scalability (elastic#67917)
  Add generator function that creates multiple alerts (elastic#67713)
  chore(NA): remove config arg from os packages (elastic#67871)
  [Reporting] Move code out of Legacy (elastic#67904)
  [Metrics UI] Add overrides to Snapshot API to support alert previews (elastic#68125)
  [Security] [Cases] Manage timeline UI API (elastic#67719)
  [ENDPOINT][INGEST]Task/endpoint ingest update (elastic#67234)
  Fix code coverage for jest, upload merged reports (elastic#68149)
  ...
simianhacker added a commit to simianhacker/kibana that referenced this pull request Jun 4, 2020
…lastic#68125)

* [Metrics UI] Add overrides to Snapshot API to support alert previews

* Renaming tests from infra to metrics_ui; renaming waffle to snapshot; adding tests for overrides

* removing limit and afterKey; removing extra interval

* Setting the minimum value for lookbackSize
simianhacker added a commit to simianhacker/kibana that referenced this pull request Jun 4, 2020
…lastic#68125)

* [Metrics UI] Add overrides to Snapshot API to support alert previews

* Renaming tests from infra to metrics_ui; renaming waffle to snapshot; adding tests for overrides

* removing limit and afterKey; removing extra interval

* Setting the minimum value for lookbackSize
simianhacker added a commit that referenced this pull request Jun 5, 2020
…68125) (#68333)

* [Metrics UI] Add overrides to Snapshot API to support alert previews

* Renaming tests from infra to metrics_ui; renaming waffle to snapshot; adding tests for overrides

* removing limit and afterKey; removing extra interval

* Setting the minimum value for lookbackSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Metrics UI Metrics UI feature release_note:enhancement Team:Infra Monitoring UI - DEPRECATED DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants