* [Metrics UI] Add endpoint for Metrics API
* Adding the ability to caculate the interval based on a module
* fixing types
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Mimics metrics permissions for alert mgmt in logs feature
* Updates logs security functional tests
Alert management permissions were added for read and all logs users in this PR, so both of these users now have "Stack Management" appear in the nav.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* [Metrics UI] Fix Metrics Explorer API to return empty results when field is missing from aggregation
* Update x-pack/plugins/infra/server/routes/metrics_explorer/lib/convert_request_to_metrics_api_options.ts
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
* Fixing type
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Removes the `npStart` legacy singleton used during the migration to the new platform. The singleton was used in API calls to access the `http.fetch` service. To remove the singleton we have injected `fetch` as a dependency in all functions.
Upgrade to Storybook 6 and attempt to use the declarative configuration.
The goals of this PR (as part of Kibana's Storybook roadmap, are:
Upgrade to Storybook 6
Still allow running Storybooks with yarn storybook plugin_name
Use the declarative configuration to (hopefully) make the configuration simpler to use an easier to understand, as well as avoiding deprecation warnings and loss of future compatibility
The ways in which what I have so far differs from how we do things today are:
In the alias configuration it takes a path to a storybook configuration directory instead of the storybook.js file from before
Each plugin (it doesn't have to be a plugin; can be any directory) has a .storybook/main.js (the aliases file in @kbn/storybook specifies these locations) where they can define their Storybook configuration. You can require('@kbn/storybook').defaultConfig to get defaults and override them
@kbn/storybook has a preset that can provide Webpack and Babel configuration and Storybook parameters and decorators
Instead of dynamically creating the list of stories to import, we define them in the globs of the stories property in .storybook/main.js.
Do not build a DLL. We are using @kbn/ui-shared-deps as externals. Startup time is not quite as fast but still acceptable.
Other things done in this PR:
Allow default exports in .stories. to allow for Common Story Format CSF stories
Add guard in Webpack configuration needed for overriding CSS rules
Update filename casing check to allow for files with required names in Storybook
Clean up observability stories
Rename *.examples.tsx and *.story.tsx to *.stories.tsx
* Add ability to fetch anomalies by metric
* Add ability to fetch anomalies to timeline
* Show anomaly annotation on timeline
* Fix type check
* Fix typos
* Add influencers to tooltip, add legend
* Remove unused variable
* Only show anomalies with a score greater than 50
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add ratio alerting to log threshold alerts
* Fix i18n
* Move grouped query must not filtering from outer to inner clause
* Use new ratio alerting layout
* Use better defaults for ratio alerts
* Remove div wrapper
* Remove type casting, use user-defined type guards
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* added comment about importing lodash library
* fixed space with prefer
* cleaned up extra space and removed comments for lodash/fp
* took out the comment in server files
* Remove newlines
Co-authored-by: Nathan L Smith <smith@nlsmith.com>
This adds dataset-specific categorization warnings for the categorization module. The warnings are displayed in call-outs on the relevant tabs as well as the job setup screens if a prior job with warnings exists. To that end this also changes the categorization job configuration to enable the partitioned categorization mode.
Co-authored-by: Alejandro Fernández Gómez <antarticonorte@gmail.com>
* adds metrics ml integration
* Add ability to create ml jobs from inventory
* Fix i18n stuff
* Fix typecheck
* renames jobs, updates datafeeds
* adds allow_no_indices: true for datafeeds
* Revert "[Metrics UI] Replace Snapshot API with Metrics API (#76253)"
This reverts commit 0ca647286a.
* Add ability to fetch anomalies
* Fix typecheck
* Fix typecheck
* Fix i18n
* Fix lint, use the right partition field
* Delete log files
* Fix merge
* Fix merge issues
* Update name of jobs
* Remove CPU job
* [Metrics UI] Replace Snapshot API with Metrics API (#76253)
- Remove server/lib/snapshot
- Replace backend for /api/infra/snapshot with data from Metrics API
- Fixing tests with updates to the snapshot node
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Add links back to ML for anomalies and manage jobs
* Fix typecheck
* Remove unecessary validation
Co-authored-by: Michael Hirsch <michaelahirsch@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Chris Cowan <chris@chriscowan.us>
This fixes#76493 by querying for the "unknown" (i.e. empty) dataset using an exists clause. This should be in line with how ML anomaly detection treats missing partition values.
* Grouped features for space management
* Apply suggestions from code review
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
* Address PR Feedback
* docs changes
* updating types/docs
* update APM feature name
* Reintroduce extraAction following EUI update
* change ordering of infra features, and render callout for management category
Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>