kibana/x-pack/plugins/observability
Kibana Machine 050546b6cb
[8.0] [Exploratory view] Update mobile index pattern to account for metrics events (#125916) (#125954)
* [Exploratory view] Update mobile index pattern to account for metrics events (#125916)

(cherry picked from commit f7cdf2ed93)

* Update mobile_test_attribute.ts

Co-authored-by: Shahzad <shahzad.muhammad@elastic.co>
Co-authored-by: Dominique Clarke <dominiquedclarke@gmail.com>
2022-02-22 14:29:02 -07:00
..
.storybook Storybook EUI theme decorator (#103582) 2021-07-09 08:54:48 -05:00
common [Uptime] Add locator to aid other plugins in linking properly to Uptime (#123004) (#123259) 2022-01-18 11:29:29 -07:00
dev_docs Alert creation and freeform selection (#111883) 2021-09-29 11:18:44 -05:00
public [8.0] [Exploratory view] Update mobile index pattern to account for metrics events (#125916) (#125954) 2022-02-22 14:29:02 -07:00
scripts Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
server [8.0] [APM] Display relevant anomalies (#119709) (#120112) 2021-12-02 08:32:40 +01:00
typings [8.0] [eslint] enable type-specific lint rules (#114184) (#117444) 2021-11-04 03:02:56 +00:00
jest.config.js [jest] update config files to get coverage per plugin (#111299) 2021-09-09 08:14:56 +02:00
kibana.json [8.0] [Exploratory view] Update index pattern permission error (#122680) (#123589) 2022-01-24 05:50:22 -07:00
README.md [Observability] Fix README.md link to component (#100801) 2021-05-27 21:27:16 +02:00
tsconfig.json [Cases][Sharable SOs] Resolve deep link ids (#111984) 2021-09-23 17:08:13 +02:00

Observability plugin

This plugin provides shared components and services for use across observability solutions, as well as the observability landing page UI.

Rules, Alerts, and Cases

The Observability plugin contains experimental support for improved alerting and case management.

If you have:

xpack.observability.unsafe.cases.enabled: true

In your Kibana configuration, the Cases page will be available.

If you have:

xpack.observability.unsafe.alertingExperience.enabled: true

In your Kibana configuration, the Alerts page will be available.

This will only enable the UI for this page when. In order to have alert data indexed you'll need to enable writing in the Rule Registry plugin:

xpack.ruleRegistry.write.enabled: true

When both of the these are set to true, your alerts should show on the alerts page.

Shared navigation

The Observability plugin maintains a navigation registry for Observability solutions, and exposes a shared page template component. Please refer to the docs in the component directory for more information on registering your solution's navigation structure, and rendering the navigation via the shared component.

Unit testing

Note: Run the following commands from kibana/x-pack/plugins/observability.

Run unit tests

npx jest --watch

Update snapshots

npx jest --updateSnapshot

Coverage

HTML coverage report can be found in target/coverage/jest after tests have run.

open target/coverage/jest/index.html

API integration testing

API tests are separated in two suites:

  • a basic license test suite
  • a trial license test suite (the equivalent of gold+)

This requires separate test servers and test runners.

Basic

# Start server
node scripts/functional_tests_server --config x-pack/test/observability_api_integration/basic/config.ts

# Run tests
node scripts/functional_test_runner --config x-pack/test/observability_api_integration/basic/config.ts

The API tests for "basic" are located in x-pack/test/observability_api_integration/basic/tests.

Trial

# Start server
node scripts/functional_tests_server --config x-pack/test/observability_api_integration/trial/config.ts

# Run tests
node scripts/functional_test_runner --config x-pack/test/observability_api_integration/trial/config.ts

The API tests for "trial" are located in x-pack/test/observability_api_integration/trial/tests.

API test tips

  • For debugging access Elasticsearch on http://localhost:9220` (elastic/changeme)
  • To update snapshots append --updateSnapshots to the functional_test_runner command