Commit graph

132 commits

Author SHA1 Message Date
Mike Côté d56b792e9c
Make the alerts plugin support generics (#72716)
* Initial work

* Expand generic support to alert instances

* Convert index threshold to use generics

* Make fixture alert types use generics

* Make alert instance related types use unknown

* Fix typecheck failures

* Cleanup + add instance generic support to registry.get API

* Shallow clone

* Rename some TS variables

* Fix failing api integration tests

* Change code for easier review and keep more history

* Fix

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-14 12:52:42 -04:00
Chris Roberson e807ddd1c1
[Monitoring] Handle getClient call throwing an exception (#74550)
* This call can throw an exception in dist builds with ssl disabled

* Fix typo
2020-08-06 15:33:24 -04:00
Mikhail Shustov 88c0631344
Update @typescript-eslint to ensure compatibility with TypeScript v3.9 (#74091)
* bump @typescript-eslint deps

* update rules

* fix errors in pacakges

* fix src/

* fix x-pack

* fix test

* fix typings

* fix examples

* allow _ as prefix and suffix

* roll back prefix and suffix changes

* add eslint-plugin-eslint-comments

* report unused rules

* remove unused eslint comments from tests

* remove unused eslint comments 2nd pass

* remove unused eslint comments from src/

* remove unused comments in x-pack

* use no-script-url and no-unsanitized/property for ts files

* remove unused eslint comments

* eui/href-or-on-click removed when not complained

* no import/* rules for ts files

* cleanup

* remove the unused eslint-disable

* rollback unnecessary changes

* allow underscore prefix & sufix in type name

* update docs

* fix type error in enterprise search plugin mocks

* rename platform hack __coreProvider --> _coreProvider

* rollback space removal in src/core/public/legacy/legacy_service.test.ts

* fix naming convention in APM
2020-08-05 17:32:19 +02:00
Chris Roberson 4d6b8ce45d
[Monitoring] Different messaging for CPU usage alert on cloud (#74082)
* Different messaging for cloud

* Fix type issues
2020-08-03 15:05:12 -04:00
Chris Roberson 3793ae5381
Check for security first (#73821)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-31 09:57:07 -04:00
igoristic 9aa5e1772d
[Monitoring] "Internal Monitoring" deprecation warning (#72020)
* Internal Monitoring deprecation

* Fixed type

* Added if cloud logic

* Fixed i18n test

* Addressed code review feedback

* Fixed types

* Changed query

* Added delay to fix a test

* Fixed tests

* Fixed text

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-27 11:10:25 -04:00
Chris Roberson bacf9f2aba
[Monitoring] Fix issues displaying alerts (#72891)
* Fix issues displaying alerts

* Fix type issues

* More support for multiple alerts

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-22 19:28:00 -04:00
Gidi Meir Morris 4abe864f10
Adds Role Based Access-Control to the Alerting & Action plugins based on Kibana Feature Controls (#67157)
This PR adds _Role Based Access-Control_ to the Alerting framework & Actions feature using  Kibana Feature Controls, addressing most of the Meta issue: https://github.com/elastic/kibana/issues/43994

This also closes https://github.com/elastic/kibana/issues/62438

This PR includes the following:

1. Adds `alerting` specific Security Actions (not to be confused with Alerting Actions) to the `security` plugin which allows us to assign alerting specific privileges to users of other plugins using the `features` plugin.
2. Removes the security wrapper from the savedObjectsClient in AlertsClient and instead plugs in the new AlertsAuthorization which performs the privilege checks on each api call made to the AlertsClient.
3. Adds privileges in each plugin that is already using the Alerting Framework which mirror (as closely as possible) the existing api-level tag-based privileges and plugs them into the AlertsClient.
4. Adds feature granted privileges arounds Actions (by relying on Saved Object privileges under the hood) and plugs them into the ActionsClient
5. Removes the legacy api-level tag-based privilege system from both the Alerts and Action HTTP APIs
2020-07-22 14:45:57 +01:00
Chris Roberson 670520a253
[Monitoring] Revert direct shipping code (#72505)
* Backout these changes

* Fix test
2020-07-22 09:24:14 -04:00
igoristic 39381ca3c8
[Monitoring] Added a case for Alerting if security/ssl is disabled (#71846)
* Added a case for Alerting if security/ssl is disabled

* Code feedback

* Fixed types
2020-07-17 11:13:40 -04:00
Chris Roberson 28189c274b
[Monitoring] Out of the box alert tweaks (#71942)
* Tweaks to thresholds and throttle periods

* Fixes

* Type fix, and more defensive against no alerts

* Remove unnecessary restrictions
2020-07-16 15:48:58 -04:00
Thomas Watson fc5bc6b6a2
Add @elastic/safer-lodash-set as an alternative to lodash.set (#67452) 2020-07-15 10:29:57 +02:00
Chris Roberson 06b1820df7
[Monitoring] Out of the box alerting (#68805)
* First draft, not quite working but a good start

* More working

* Support configuring throttle

* Get the other alerts working too

* More

* Separate into individual files

* Menu support as well as better integration in existing UIs

* Red borders!

* New overview style, and renamed alert

* more visual updates

* Update cpu usage and improve settings configuration in UI

* Convert cluster health and license expiration alert to use legacy data model

* Remove most of the custom UI and use the flyout

* Add the actual alerts

* Remove more code

* Fix formatting

* Fix up some errors

* Remove unnecessary code

* Updates

* add more links here

* Fix up linkage

* Added nodes changed alert

* Most of the version mismatch working

* Add kibana mismatch

* UI tweaks

* Add timestamp

* Support actions in the enable api

* Move this around

* Better support for changing legacy alerts

* Add missing files

* Update alerts

* Enable alerts whenever any page is visited in SM

* Tweaks

* Use more practical default

* Remove the buggy renderer and ensure setup mode can show all alerts

* Updates

* Remove unnecessary code

* Remove some dead code

* Cleanup

* Fix snapshot

* Fixes

* Fixes

* Fix test

* Add alerts to kibana and logstash listing pages

* Fix test

* Add disable/mute options

* Tweaks

* Fix linting

* Fix i18n

* Adding a couple tests

* Fix localization

* Use http

* Ensure we properly handle when an alert is resolved

* Fix tests

* Hide legacy alerts if not the right license

* Design tweaks

* Fix tests

* PR feedback

* Moar tests

* Fix i18n

* Ensure we have a control over the messaging

* Fix translations

* Tweaks

* More localization

* Copy changes

* Type
2020-07-14 17:50:22 -04:00
Pierre Gayvallet e7c54d3684
Rename HttpServerInfo.host to hostname (#70792)
* rename host to hostname

* update generated doc

* adapt tests

* fix types
2020-07-07 16:54:39 +02:00
Tiago Costa 6c62c686cf
chore(NA): upgrade to lodash@4 (#69868)
* chore(NA): upgrade oss to lodash4

chore(NA): migrate cli, cli_plugin, cli_keystore,  dev, test_utils and apm src script to lodash4

chore(NA): missing file for cli plugin

chore(NA): add src core

chore(NA): es archiver and fixtures

chore(NA): try to fix functional test failure

chore(NA): migrate src/legacy entirely to lodash4 except src/legacy/core_plugins

chore(NA): move legacy core plugins to lodash4

chore(NA): upgrade optimize to lodash4

chore(NA): upgrade to lodash4 on advanced_settings, charts, console and dashboard

chore(NA): migrate to lodash4 on dev_tools, discover, embeddable, es_ui)shared, expressions, home plugins

chore(NA): upgrade data plugin to lodash4

chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4

chore(NA): missing data upgrades to lodash4

Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4"

This reverts commit 137055c5fed2fc52bb26547e0bc1ad2e3d4fe309.

Revert "Revert "chore(NA): upgrade usage_collection, ui_actions, tile_map, telemtry, share, saved_objects, saved_objects_management, region_map and navigation to lodash4""

This reverts commit f7e73688782998513d9fb6d7e8f0765e9beb28d1.

Revert "chore(NA): missing data upgrades to lodash4"

This reverts commit 92b85bf947a89bfc70cc4052738a6b2128ffb076.

Revert "chore(NA): upgrade data plugin to lodash4"

This reverts commit 88fdb075ee1e26c4ac979b6681d8a2b002df74c6.

chore(NA): upgrade idx_pattern_mgt, input_control_vis, inspector, kbn_legacy, kbn_react, kbn_usage_collections, kbn_utils, management and maps_legacy to lodash4

chore(NA): map src plugin data to lodash3

chore(NA): missing lodash.clonedeep dep

chore(NA): change packages kbn-config-schema deps

chore(NA): update renovate config

chore(NA): upgrade vis_type plugins to lodash4

chore(NA): move vis_type_vislib to lodash3

chore(NA): update visualizations and visualize to lodash4

chore(NA): remove lodash 3 types from src and move test to lodash4

chore(NA): move home, usage_collection and management to lodash 3

Revert "chore(NA): move home, usage_collection and management to lodash 3"

This reverts commit f86e8585f02d21550746569af54215b076a79a3d.

chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3

chore(NA): update x-pack test to mock lodash4

Revert "chore(NA): move kibana_legacy, saved_objects saved_objects_management into lodash3"

This reverts commit 2d10fe450533e1b36db21d99cfae3ce996a244e0.

* chore(NA): move x-pack and packages to lodash 4

* chore(NA): remove mention to lodash from main package.json

* chore(NA): remove helper alias for lodash4 and make it the default lodash

* chore(NA): fix last failing types in the repo

* chore(NA): fix public api

* chore(NA): fix types for agg_row.tsx

* chore(NA): fix increment of optimizer modules in the rollup plugin

* chore(NA): migrate `src/core/public/http/fetch.ts` (#5)

* omit undefined query props

* just remove merge usage

* fix types

* chore(NA): fixes for feedback from apm team

* chore(NA): recover old behaviour on apm LoadingIndeicatorContext.tsx

* chore(NA): fixes for feedback from watson

* Platform lodash4 tweaks (#6)

* chore(NA): fix types and behaviour on src/core/server/elasticsearch/errors.ts

* Canvas fixes for lodash upgrade

* [APM] Adds unit test for APM service maps transform (#7)

* Adds a snapshot unit test for getConnections and rearranges some code to make testing easier

* reverts `ArrayList` back to `String[]` in the painless script within `fetch_service_paths_from_trace_ids.ts`

* chore(NA): update yarn.lock

* chore(NA): remove any and use a real type for alerts task runner

Co-authored-by: Gidi Meir Morris <github@gidi.io>

* chore(NA): used named import for triggers_actions_ui file

* chore(NA): fix eslint

* chore(NA): fix types

* Delete most uptime lodash references.

* Simplify. Clean up types.

* [Uptime] Delete most uptime lodash references (#8)

* Delete most uptime lodash references.

* Simplify. Clean up types.

* chore(NA): add eslint rule to avoid using lodash3

* chore(NA): apply changes on feedback from es-ui team

* fix some types (#9)

* Clean up some expressions types.

* chore(NA): missing ts-expect-error statements

* Upgrade lodash 4 vislib (#11)

* replace lodash 3 with lodash 4 on vislib plugin

* Further changes

* further replacement of lodash3 to 4

* further work on upgrading to lodash 4

* final changes to update lodash

* chore(NA): upgrade data plugin to lodash4

chore(NA): upgrade data plugin public to lodash4

chore(NA): fix typecheck task

chore(NA): fix agg_config with hasIn

chore(NA): assign to assignIn and has to hasIn

chore(NA): upgrade data plugin server to lodash4

chore(NA): new signature for core api

fix(NA): match behaviour between lodash3 and lodash4 for set in search_source

* chore(NA): remove lodash3 completely from the repo

* chore(NA): fix x-pack/test/api_integration/apis/metrics_ui/snapshot.ts missing content

* chore(NA): fix lodash usage on apm

* chore(NA): fix typecheck for maps

* Patch lodash template (#12)

* Applying changes from https://github.com/elastic/kibana/pull/64985

* Using isIterateeCall, because it seems less brittle

* Also patching `lodash/template` and `lodash/fp/template`

* Reorganizing some files...

* Revising comment

* Ends up `_` is a function also... I hate JavaScript

Co-authored-by: Pierre Gayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
Co-authored-by: Oliver Gupte <ogupte@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Justin Kambic <justin.kambic@elastic.co>
Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
Co-authored-by: kobelb <brandon.kobel@elastic.co>
2020-07-03 01:30:13 +01:00
Alejandro Fernández Haro 6607bf7b49
[Telemetry] Report data shippers (#64935)
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-02 08:08:35 +01:00
Pierre Gayvallet fe1c508d8d
Move and rename legacy elasticsearch client (#69797)
* move last snapshot to inline

* move legacy files to legacy subfolder

* move request types out of legacy

* export Headers from http instead of elasticsearch

* renaming - first pass

* renaming - second pass

* fix core mocks

* adapt new calls

* update generated doc

* fix IT test mocks

* fix new usages
2020-06-29 17:43:31 +02:00
Chris Roberson b2d3833313
[Monitoring] Love for APM (#69052)
* Fix broken colors for APM

* Use default derivative

* Fix UI issues with APM

* Add new charts

* Fix tests

* Use EUI color palette

* Remove old translations

* PR feedback

* Fix tests

* Fix up overview page

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-23 15:14:40 -04:00
patrykkopycinski cc4c1729d1
Bump jest related packages (#58095) 2020-06-20 21:05:09 +02:00
Chris Roberson e6cf4b36d3
[Monitoring] Ensure we use existing Elasticsearch config (#68389)
* Ensure we use existing Elasticsearch config

* Use separate type for this to ensure custom properties work

* PR suggestions

* PR feedback

* PR feedback

* Fix type issues

* PR feedback
2020-06-15 12:43:37 -04:00
Chris Roberson a1a1d5d2f7
Ensure we query for more than 10 (#67172) 2020-06-02 10:41:04 -04:00
Yuliia Naumenko ce45dad8b6
Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE (#66838)
* Changed alerting API endpoints urls, bodies and params to follow Kibana STYLEGUIDE

* Changed alerting REST API to keep the pattern 'alerts/alert/{id}'

* fixed tests

* fixed tests

* Fixed jest tests

* Renamed plugin from alerting to alerts

* fixed tests

* fixed tests

* Fixed alert type check error

* Fixed find api

* fixed type checks

* fixed tests security issues

* Fixed view in app

* -

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-01 18:45:36 -07:00
Mikhail Shustov 53b95424fe
Deprecate es API exposed from setup contract (#67596)
* move elasticsearch client under legacy namespace

* update mocks and tests

* update platform code

* update legacy code

* update plugins using elasticsearch setup API

* update request handler context

* update docs

* rename remaining places

* address comments

* fix merge conflict error
2020-06-01 16:16:44 +02:00
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Yuliia Naumenko 5ed5fda832
Allow registered alert types to be non-editable (#65606)
* Allow registered alert types to be non-editable

* Fixed isUiEditEnabled values

* Fixed due to comments

* fixed failing tests

* Enable alert type selection per alert consumer, only 'alerting' consumer can display other consumers alert types, but in case if it isEditable

* fixed tests

* Removed consumer property from the client side alert type registry and added server side property producer which purpose is to manage a feature logic

* fixed type check

* Fixed tests and type checks

* Removed error message for non registered plugins

* Fixed failing tests

* Fixed due to comments

* fixed test

* -

* revert logic for requiresAppContext

* Added close toast after saving alert
2020-05-12 13:38:22 -07:00
Alejandro Fernández Haro 398b660045
[Fix] Monitoring failing to start (#65516) 2020-05-07 17:53:27 +01:00
Larry Gregory 6a6deef151
Deprecate kibana user in favor of kibana_system user (#63186) 2020-05-05 11:36:40 -04:00
igoristic 59315bc84d
[Monitoring] NP Migration complete client cutover (#62908)
* Final phase before the complete cutover

* NP migration

* lint fix

* More NP stuff

* Moved Stack Monitoring client plugin outside legacy and fixed all tests

* ...

* Removed unused files

* Fix for main links

* Fixed more tests

* Fixed redirect when clicking on SM icon again

* Code review feedback

* Addressed code review feedback

* Fixed return value
2020-04-30 15:59:35 -04:00
Chris Roberson 989245793e
[Monitoring] Fix monitoring 7.7 deprecations (#63738)
* Fix monitoring 7.7 deprecations

* Switch order

* Add comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-22 09:06:40 -04:00
Alejandro Fernández Haro 9226d4cc94
[Telemetry] Use staging if it's not a distributable release (#63875)
* [Telemetry] Use staging if it's not a distributable release (instead of 'dev' vs. 'prod' approach)

* Rename isProd to isDistributable and useProdKey
2020-04-20 12:43:34 +01:00
igoristic dacc95fa85
[Monitoring] Fixed server response errors (#63181)
* Fixed server response errors

* Fixed async error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-16 20:07:24 -04:00
Gidi Meir Morris bb9f8845ae
[alerting] Adds an alertServices mock and uses it in siem, monitoring and uptime (#63489)
Work on #61313 has revealed that we don't have amock for AlertServices, which creates coupling between us and any solution depending on us, which makes it harder to make changes in our own code.

This PR adds mocks and uses them in SIEM, Monitoring and Uptime, so that we can make future changes without having to change outside solutions.
2020-04-16 08:45:38 +01:00
Larry Gregory 9d89a4fb49
Support multiple reserved feature privileges (#61980)
* support multiple reserved feature privileges

* update reserved privilege ids

* additional testing

* Add ml_user and ml_admin reserved privileges

* prrevent reserved privilege ids from sttarting with 'reserved_'

* address pr feedback: dedicated reserved privilege type

* re-enable ML test suites

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-08 13:03:15 -04:00
Alejandro Fernández Haro 028313a8fe
[Telemetry] Add possibility of registering exclusive collectors for each collection (#62665)
* [Telemetry] Add posibility of regitering exclusive collectors for collections

* [Telemetry] Filter unwanted fields from the kibana.os telemetry payload

* Filter the collectors properly in bulkFetch

* Move "kibana" usage collector from Monitoring to OSS Telemetry

* Remove exclusivity of the "kibana_settings" collector

* Unify "kibana_stats" collector from Monitoring and Legacy

* Remove unused legacy constants

* Proper type for UsageCollectionSetup in monitoring

* Missed one undo

* Add unit tests to the migrated collectors

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-08 09:08:59 +01:00
Chris Roberson 8ffc08f2f7
[REVERT THE REVERT] [Monitoring] Cluster state watch to Kibana alerting (#62793)
* Revert "Revert "[Monitoring] Cluster state watch to Kibana alerting (#61685)""

This reverts commit f1bd3bdacb.

* Fix i18n error

* Fix test
2020-04-07 13:44:34 -04:00
spalger f1bd3bdacb Revert "[Monitoring] Cluster state watch to Kibana alerting (#61685)"
This reverts commit ab0cc8894a.
2020-04-06 17:05:09 -07:00
Chris Roberson ab0cc8894a
[Monitoring] Cluster state watch to Kibana alerting (#61685)
* WIP

* Add new alert with tests

* Fix type issues, and disable new alerting for tests

* Fix up the view all alerts view

* Turn off for merging

* Fix jest test

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-06 15:31:01 -04:00
Pierre Gayvallet 468de51153
Add plugin start contract to getStartServices return value (#61216)
* add plugin own contract as third element of getStartServices result

* adapt plugins code

* update tests

* revert unknown to use void again

* update generated doc

* fix UT

* update mock to allow non-object `pluginStartContract`

* add @typeParam documentation
2020-03-26 10:49:05 +01:00
Tyler Smalley 1bcf848e46
Sets min_doc_count=0 for parent histogram of derivative aggregation (#61390)
From the docs: The specified metric must be numeric and the enclosing
histogram must have min_doc_count set to 0 (default for histogram
aggregations).

https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-pipeline-derivative-aggregation.html#search-aggregations-pipeline-derivative-aggregation

This is now enforced, and currently failing the promotion of the current
Elasticsearch build

Related to https://github.com/elastic/kibana/pull/61387

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-03-25 22:22:04 -07:00
Chris Roberson 6c8cc4cf74
Fix issue with no logstash monitoring data in the top end of the time series (#61273) 2020-03-25 13:35:45 -04:00
Chris Roberson 223f774c3f
[Monitoring] Update /api/stats to use core.metrics (#60974)
* Align api/stats with the monitoring logic for kibana ops metrics

* Align collectors

* Add in locale to kibana_settings

* More tweaks

* PR feedback

* PR feedback
2020-03-24 15:53:43 -04:00
Larry Gregory b82cc6ed4a
Support for sub-feature privileges (#60563)
* initial server-side support for sub-feature privileges (#57507)

* initial server-side support for sub-feature privileges

* start addressing PR feedback

* renaming interfaces

* move privilege id collision check to security plugin

* additional testing

* change featurePrivilegeIterator import location

* fix link assertions following rebase from master

* Initial UI support for sub-feature privileges (#59198)

* Initial UI support for sub-feature privileges

* Address PR feedback

* display deleted spaces correctly in the privilege summary

* additional testing

* update snapshot

* Enables sub-feature privileges for gold+ licenses (#59750)

* enables sub-feature privileges for gold+ licenses

* Address PR feedback

* address platform review feedback
2020-03-24 11:12:49 -04:00
Alejandro Fernández Haro 452193fdba
[Telemetry] Server-side Migration to NP (#60485)
* [Telemetry] Migration to NP

* Telemetry management advanced settings section + fix import paths + dropped support for injectVars

* Fix i18nrc paths for telemetry

* Move ui_metric mappings to NP registerType

* Fixed minor test tweaks

* Add README docs (#60443)

* Add missing translation

* Update the telemetryService config only when authenticated

* start method is not a promise anymore

* Fix mocha tests

* No need to JSON.stringify the API responses

* Catch handleOldSettings as we used to do

* Deal with the forbidden use case in the optIn API

* No need to provide the plugin name in the logger.get(). It is automatically scoped + one missing CallCluster vs. APICaller type replacement

* Add empty start method in README.md to show differences with the other approach

* Telemetry collection with X-Pack README

* Docs update

* Allow monitoring collector to send its own ES client

* All collections should provide their own ES client

* PR feedback

* i18n NITs from kibana-platform feedback

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-23 18:49:38 +00:00
Chris Roberson 3a396027f6
[Monitoring] Migrate server to NP (#56675)
* First pass

* First pass

* Add new routes

* Getting closer

* Remove legacy server code, and other fixes

* Register the plugin with xpack

* Pass a legacy client to telemetry

* Suport callWithInternalUser

* Remove this

* More NP work

* Fix some tests

* Fix broken test

* Move over new telemetry changes, and fix other issues

* Fix TODO item

* Reuse the same schema as elasticsearch module

* Use a singular config definition here

* Disable this for now

* Use the right method

* Use custom config again

* Tweak the config to make this optional

* Remove these

* Remove these unnecessary files

* Fix jest test

* Fix some linting issues

* Fix type issue

* Fix localization issues

* Use the elasticsearch config

* Remove todos

* Fix this check

* Move kibana alerting over

* PR feedback

* Use new metrics core service

* Change config for xpack_api_polling_frequency_millis

* Make sure this is disabled for now

* Disable both

* Update this to the new function

* Tighten up legacy api needs

* Check for existence

* Fix jest tests

* Cleaning up the plugin definition

* Create custom type in our plugin

* Revert this change

* Fix CI issues

* Add these tests back

* Just use a different collector type

* Handle errors better

* Use custom type

* PR feedback

* Fix type issues

* PR feedback
2020-03-20 14:02:15 -04:00
Court Ewing 7ac8e4d9cc Move x-pack plugins/server/common to x-pack/legacy 2019-06-20 13:34:48 -04:00
Chris Roberson b09e3a622f
[Monitoring] Metricbeat migration flyout and instructions (#35228)
* Initial attempt at a reactor of how this works

* Enter and exiting setup mode with migration buttons working

* Adding monitoring url step back in and some small cleanup

* Elasticsearch steps

* Add missing file

* Better organization here

* Remove this debug logic

* Clean up

* PR feedback

* Add in monospacing

* Persist monitoring url in local storage

* Rework the steps

* Change node to server, and add missing files

* Fix linting issues

* Fix api integration tests

* PR feedback

* Pass down if the product is the "primary" or not, then use that to show certain warnings in the UI (just supported for Kibana right now)

* Elasticsearch migration will work slightly differently in that all nodes must be partially migrated before we can disable internal collection

* More PR feedback

* PR feedback

* Better links

* Fix tests

* This should open in a new tab

* PR feedback

* Design and PR feedback

* Fix these tests

* PR feedback

* Remove debug

* PR feedback

* Update the import path

* Update this import path too

* PR feedback

* Fix i18n
2019-06-14 14:21:53 -04:00
Chris Roberson 25802019ae
[Monitoring] Integrate logs source for Logs UI (#36929)
* Define and use an internal log ui source configuration

* Fix urls in tests

* Remove unnecessary code
2019-06-13 09:28:54 -04:00
Mike Place 6c0f83a515
Minor changes to text on Alerting in Stack Monitoring application (#38388)
* Minor changes to text.

* "Basic" is a proper name, so it should be capatalized.

* Cluster Alerts are plural.

* Fix tests to align with help text changes

* Missed one test file
2019-06-13 14:46:36 +02:00
Ahmad Bamieh c308048f04
[Telemetry] move from xpack main (#35403)
* enabling xpack in new plugins

* move telemetry into separate new platform plugin

* remap constants

* resolved hacks issue

* remove extra dir

* js -> ts

* run linter

* fix tests

* reset kibana.yml

* reset kibana.yml

* ts types

* add telemetry translations to i18n

* use deprecated configs

* checkout config.yml

* fix test

* move telemetry from xpack_main in api_integration

* add telemetry apis

* hide banner

* remove routes/get_stats in favor of collectors/get_stats

* code review fixes
2019-06-12 13:53:48 +03:00
igoristic b75bbd6904
Issue 33025: Fixed CPU calculation for APM (#37230)
* Using the correct property for CPU calc

* Changed the name alias to a more relevant name

* Fixed unit tests
2019-05-30 15:28:02 -04:00