Adds the first built-in alertType for Kibana alerting, an index threshold alert, and associated HTTP endpoint to generate preview data for it.
addresses the server-side requirements for issue https://github.com/elastic/kibana/issues/53041
* [APM] Update tsconfig.json template in optimization script
The location of the cypress tests has changed, and those files are no longer excluded in the APM type check. This change updates the tsconfig.json template to exclude the new location.
* Update link in readme
* remove obsolete legacy server deps
* licensePreRoutingFactory uses licensing plugin rather than legacy xpack
* move schemas to dir in routes
* use NP license check method for license check
* store license data in plugin for passing to check
* create server plugin files in NP plugin dir
* remove dependency on legacy xpack plugin
* add sample data links first step
* move all server dirs from legacy to np dir
* fix requiredPlugin spaces name and update import routes
* delete unnecessary files and add sample data links
* update license and privilege check tests
* add routeInit types
* run jest with `--detectOpenHandles` on CI to figure out what is happening with pauses
* focus tests on jest integration
* force kill child processes in config reload test
* skip flaky suite
* increase timeout for looking for installed packages
* run all tests again
* Handle setup mode if security is disabled
* Rename so the test actually runs, and fix/add tests
* Use es.js api instead of transport.request
* Revert "Use es.js api instead of transport.request"
This reverts commit ae0e48f8bd.
* Explicitly handle security not enabled
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* [Infra] Add basic backend for metric threshold alerts
* Define separate fired/recovered action groups
* Allow alerting on arbitrary search fields besides host.name
* Add list and delete endpoioints
* Add groupBy alerts
* Remove extraneous routes and SavedObject logic
* Remove additional SavedObject code
* Remove renotify logic from executor
* Fix action group type
* Fix scheduledActions typecheck
* Fix i18n
* Migrate alerting to new platform
* Add alerting to infra dependencies
* Add comment about future use
* Adjust alert params tm names to sync with UI; default to Entire Infrastructure alert
* Add support for between comparator
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* fixes from comments on previous PR
* replaces any with unknown, adds test to show how optional chaining of array items can result in undefined even though typescript says its not
Before this pr:
Discover, Visualise and Dashboard in setup phase create own state containers which watch for pinned filters, time and refresh interval changes. This watching and state comparisons happen for each plugin separately and not only when a specific app is mounted. So we ended up with a bunch of similar synchronous work which happens every time query services state changes.
After this pr:
Query service exposes observable to watch for changes (state$). Discover, Visualise and Dashboard use this observable for sub url tracking instead of creating its own.
* ui/persisted_state 👉 src/plugins/visualizations
Part of #46926
* fix JEST
* remove sinon from tests
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>