Commit graph

67583 commits

Author SHA1 Message Date
Gerard Soldevila
97d26c1b4c
Move single migration failure integration tests to a separate group (#167612)
## Summary

PR https://github.com/elastic/kibana/pull/166924 introduces a bunch of
integration tests that are causing that specific group to take a lot
longer to execute:


![image](5ec7fe8f-d09c-4618-b0b5-fd17b80056f7)

The goal of this PR is to move these new tests to a separate group, so
that both groups take 20-25mins.
2023-10-02 10:32:36 +02:00
Jiawei Wu
092cc0d098
[RAM][Maintenance Window] Add maintenance window solution selection. (#166781)
## Summary
Resolves: https://github.com/elastic/kibana/issues/166301

Adds support for solution/category filtering to maintenance windows by
adding a new property: `category_ids`. Selecting one or more solutions
when creating/updating a maintenance window will cause the maintenance
window to only suppress rule types belonging to said solutions. In order
to achieve filtering by solution/category, we are adding a new field to
the rule types schema called `category`. This field should map to the
feature category that the rule type belongs to (`observability`,
`securitySolution` or `management`).

Our initial plan was to use feature IDs or rule type IDs to accomplish
this filtering, we decided against using rule type IDs because if a new
rule type gets added, we need to change the API to support this new rule
type. We decided against feature IDs because it's a very anti-serverless
way of accomplishing this feature, as we don't want to expose feature
IDs to APIs. We decided on app categories because it works well with
serverless and should be much easier to maintain if new rule types are
added in the future.

This means the `rule_types` API has to be changed to include this new
field, although it shouldn't be a breaking change since we're just
adding a new field. No migrations are needed since rule types are in
memory and maintenance windows are backwards compatible.


![image](d07b05cd-ade8-46a4-a4c0-ab623c31c11b)

### Error state:

![image](b61984b4-c1e1-4e9b-98b4-97a681e977a8)

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
2023-10-02 09:20:53 +01:00
Maryam Saeidi
566e086963
Single list of rule types in observability without grouping (#166772)
Closes #166136

## Summary

This PR removes the groups in the rules list in the observability.

|With disabled rule|Without disabled rule|
|---|---|

|![image](aa89d441-6bbd-46d1-8753-bcddcd03c518)|

## 🧪 How to test
- Check the rule type list in observability > rules page
- Check the filter works as before
2023-10-02 10:13:35 +02:00
Kibana Machine
c1aabee73f
[api-docs] 2023-10-02 Daily api_docs build (#167730)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/478
2023-10-02 00:41:12 -04:00
Yara Tercero
50ddc979ca
[DE][Cypress] Re-enable cypress serverless tests subset (#166501)
## Summary

Re-enable a subset of cypress serverless tests:

- Restructured
`x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/custom_query_rule.cy.ts`
to break it down into and enable the following tests:
    - `rule_creation/common_components.cy.ts`
    - `rule_creation/custom_query_rule.cy.ts`
    - `rule_details/common_components.cy.ts`
    - `rule_details/custom_query_rule.cy.ts`
    - `rule_edit/custom_query_rule.cy.ts`
2023-10-01 22:10:14 -05:00
Anton Dosov
07f1c36df7
[Drift] Enable chat globally + A/B test for pages where the chat was available before (#167069)
## Summary

Close https://github.com/elastic/kibana/issues/159691

[Requirements](https://docs.google.com/document/d/1uXgyDIGuIqkYXmavdMTpBgQEiOP07ObJYb7GNq5GiSE/edit#heading=h.okl11rz12ytg)
[A/B test
description](https://docs.google.com/document/d/1yzfZF8mtlRNH4X6HjosD6Exh24zAhN__LR_zh3DOzKw/edit?usp=sharing)

[Figma](https://www.figma.com/file/WGhmfgyy9FBOltLtycfGPE/Getting-started?type=design&node-id=92-44804&mode=design&t=mwbIexn5Fs754HQz-0)
Testing - see _testing_ section below for more details
(https://dosant-pr-167374-d-2023-06-14-global-drift-with-experiment.kbndev.co/.
elastic/changeme)

This PR enables cloud chat (Drift) globally. This is done by adding a
custom chat button in the Kibana header which manually toggles Drift
widget. We attempt to manually position the widget to the top of the
screen so it pops up close to the chat button that triggered it.

Previously Drift chat was available only on specific pages like
Solutions onboarding pages, integrations, setup guides as a regular chat
widget with the floating chat bubble in the bottom right corner. We
couldn't enable it on all pages, because on a lot of them the floating
chat bottom would have overlapped the application UI.

We also were asked to add [an a/b
test](https://docs.google.com/document/d/1yzfZF8mtlRNH4X6HjosD6Exh24zAhN__LR_zh3DOzKw/edit?usp=sharing):
 - A: The chat button appears in the header for all pages (new)
- B: The chat button appears as floating action button in the
bottom-right corner on pages where Drift was previously available
(solutions onboarding pages, integrations, setup guides)

### Screenshots / Videos

#### Global Chat in the header

![Screenshot 2023-09-25 at 10 30
41](dba3b3da-4e90-4d6c-a5d2-99123aa8c753)
![Screenshot 2023-09-25 at 10 30
45](752d05e4-cc85-458e-8216-f75529c2bac7)

#### The tour on the first appearance 

![Screenshot 2023-09-25 at 10 55
42](c0958095-f724-4b69-a149-04a0aec8e083)

#### (Part of A/B test) Drift in the header on new pages and as floating
action button on old pages


0386ccbd-ab6c-4eb2-a57b-f9324fcf73eb

### Implementation notes

- **We still enable Drift only for trial users + gap window**
- We exposed additional APIs from drift iframe to manually control its
visibility and react to more events
https://github.com/elastic/cloud/pull/118761. This changes are required
for the code in this PR to work. ~The updated frame code wasn't deployed
yet.~ the changes were deployed
- We use [`playbookFired` event
](https://devdocs.drift.com/docs/drift-events#playbook-fired) to know if
Drift chat should be visible for the current user. We show the button in
the header only when it fires.
- To react to the event and to display the button, we have to kick of
Drift iframe initialization first
- This means Drift codes loads before we show the button and before user
interacts with it (Only when Drift is enabled, meaning, only for trial
users + gap window)
- Subsequent launches or opens of the same playbook will not re-trigger
the `playbookFired` event, I used local storage flag to workaround this
and show the live chat button, but it also has it's own edge case. As an
alternative we can always show the chat button and don't rely on the
playbook event, more details here:
https://docs.google.com/document/d/1j313mVOIz19Rkoj8TDFWaLc7Pgk_ByBBKJFNIC-jbyc/edit?usp=sharing.
For now was decided to rely on the `playbookFired` event.
- A/B: **to support for both new and old implementation, I had to
refactor the old one from drop-in chat to global chat that is controlled
by list of hardcoded URLs.** This is not ideal, but this allows two
implementations to co-exist with much tech-debt and we plan to get rid
of this after the a/b test.
- When we navigate between pages with different implementations, Drift
re-initializes itself (just like in old implementation), this
performance debt should go away when we get rid of the a/b test.
- When end-to-end testing the a/b experiment, I found a bug in the a/b
test setup in Kibana https://github.com/elastic/kibana/issues/167240
this needs to be addressed separately for a/b test to work properly.
- When the user receives a message from Drift - the custom "Live Chat"
button doesn't indicate that there is a new message. This needs a follow
up, @Dosant to create an issue


### Testing

Version with the experiment where on old pages Drift appears as a
floating chat bubble -
https://dosant-pr-167374-d-2023-06-14-global-drift-with-experiment.kbndev.co/
elastic/changeme

> [!NOTE]  
> If the live chat button doesn't appear, it is likely because the
playbook was recently activated by someone else. you can workaround this
for testing by creating a different user or by setting
`cloudChatPlaybookFiredOnce : true` to localstorage. This issue and
mitigation is described in details in the "implementation details"
section


#### To test locally: 

```
xpack.cloud.id: 'some-id'
xpack.cloud.trial_end_date: '2023-09-21T00:00:00.000Z'
xpack.cloud_integrations.chat.trialBuffer: 45
xpack.cloud.chat.enabled: true

xpack.cloud.chatIdentitySecret: <pls react out> 
xpack.cloud.chat.chatURL: https://elasticcloud-production-chat-us-east-1.s3.amazonaws.com/drift-iframe.html

xpack.cloud_integrations.experiments.flag_overrides:
  "cloud-chat.chat-variant": "bubble" or "header"

```
2023-10-01 16:07:11 +02:00
Patryk Kopyciński
924664fc79
Bump cypress@13.3.0 (#162383)
## Summary

Bump Cypress-related dependencies to the latest versions and update
`renovate.json` to do it automatically in the future

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
2023-10-01 10:55:01 +02:00
Kibana Machine
ba64b7cfdb
[api-docs] 2023-10-01 Daily api_docs build (#167721)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/477
2023-10-01 00:37:34 -04:00
Kibana Machine
f0e00aef1e skip failing test suite (#167713) 2023-09-30 10:05:08 -04:00
Kibana Machine
e9fca3e905 skip failing test suite (#167717) 2023-09-30 09:53:59 -04:00
Kibana Machine
39d512e3c9 skip failing test suite (#167716) 2023-09-30 09:53:00 -04:00
Cauê Marcondes
12695646cf
[Profiling] New settings to control CO2 calculation (#166637)
- Added new Profiling settings so users can customize the CO2 variables
- Fixed Embeddable components to also read the new settings
- Moved code from APM to obs-shared to create the custom settings page
in Profiling.
- New Settings Page was created in Profiling UI so users can easily find
the settings:
<img width="2053" alt="Screenshot 2023-09-22 at 11 18 35"
src="6969b079-745d-4302-8ff2-4f0f256c7f51">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-30 02:25:55 -07:00
Julia Rechkunova
3550650a91
[Discover] Use new icons for the sidebar toggle button (#167625)
A follow up for https://github.com/elastic/kibana/pull/165866

## Summary

This PR replaces icons for the sidebar toggle button.

<img width="200" alt="Screenshot 2023-09-29 at 13 00 39"
src="6ed10562-9a50-48ce-b6b2-030ab7b11e11">
<img width="200" alt="Screenshot 2023-09-29 at 13 00 47"
src="e286e152-a6bb-4b21-a97a-44419757dafb">
2023-09-30 10:47:56 +02:00
Vitalii Dmyterko
b03b2fd477
[Security Solution][Detection Engine] adds ES|QL rule type to Security Detections rules (#165450)
## Summary

- related [epic](https://github.com/elastic/security-team/issues/6196)
- introduces new ES|QL rule type in Technical Preview Stage

- historical POC architecture
[document](https://docs.google.com/document/d/1hcKzNrDEIrmoWwWoqas1YZ-bd8Kk5NRjJNSUaCvSntM/edit#heading=h.gheuu8zcz481)(internal
link). Some of the information there can be outdated, but might be
useful for historical context of some tech decision. In future, detailed
technical documentation will be added

### UI

ES|QL query component introduced in rule edit/creation form

Rule name override supports values returned from ES|QL query
As agreed on Adv. correlation WG, we don't introduce similar possibility
for risk score/severity override at this point

<details>
<summary>How it looks like in UI</summary>
<img width="2082" alt="Screenshot 2023-09-21 at 11 52 59"
src="14c94e36-ca90-496d-a7a5-4a31899d25b6">
<img width="2079" alt="Screenshot 2023-09-21 at 11 53 14"
src="9abd53ec-a0f4-4481-8b1f-4ecccdc5feae">
<img width="2072" alt="Screenshot 2023-09-21 at 12 14 17"
src="58e4f9eb-c15f-4849-bba0-bc1b92e8c945">


</details>


### Context

We introduced concept of Aggregating and Non-aggregating rules for
ES|QL. It depends on, whether STATS..BY command used in query

**Aggregating rule** - is a rule that uses
[stats…by](https://esql.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/esql-stats-by.html)
grouping commands. So, its result can not be matched to a particular
document in ES. This can lead to possibly duplicated alerts, since we
are using document `id` to deduplicate alerts. We are going to introduce
suppression for all rule types in future, that would help to mitigate
this case
```
FROM logs*
| STATS count = COUNT(host.name) BY host.name
| SORT host.name
```

**Non-aggregating rule** - is a rule that does not use
[stats…by](https://esql.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/esql-stats-by.html)
grouping commands. Each row in result can be tracked to a source
document in ES. For this type of rule operator \`[metadata _id, _index,
_version]\` is required to be used after defining index source. This
would allow deduplicate alerts and link them with the source document.

```
FROM logs* [metadata _id, _index, _version]
| WHERE event.id == "test"
| LIMIT 10
```

### Serverless Feature Flag

ES|QL won't be available for Serverless as for 8.11 release, so it will
be hidden by Security experimental feature flag `esqlRulesDisabled`. All
UI changes will be hidden (it's mostly Form creation) and rule type
won't be registered, which prevents rule to be created, returned in
search if it exists or execute.

### Test envs
- Serverless qa, [admin link to
project](https://admin.qa.cld.elstc.co/projects/security/ef79684f92d64f27b69e1b04de86eb1a),
disabled there
- internal
[link](https://elastic.slack.com/archives/C03E8TR26HE/p1693848029955229)
to test env for Stateful


### Rule schema changes

introduces value `esql` to `type` property
introduces value `esql` to `language` property

### Tests coverage
- cypress tests (as per 27/09/2023 added cypress tests for rule
creation/edit/details,bulk_edit))
- functional tests for rule execution(exceptions, overrides, preview and
actual rule execution)
  - functional tests for bulk_edit

 #### Flaky test runner
- [cypress esql
tests](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3233#_),
non failed of added


### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-30 09:45:34 +01:00
Ignacio Rivas
d35fa69138
[Index management] Data stream edit data retention (#167006) 2023-09-30 08:43:21 +02:00
Kibana Machine
33183c2d01
[api-docs] 2023-09-30 Daily api_docs build (#167712)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/476
2023-09-30 00:38:43 -04:00
Devon Thomson
8ffa8d8ee4
[Dashboard] Store view mode in local storage (#166523)
Moves the Dashboard view mode from session storage to local storage. This means that users will only need to enter edit mode **once** if they are an editor, and any subsequent Dashboards they open will already be in edit mode.
2023-09-29 19:46:18 -04:00
Søren Louv-Jansen
7e32fc8432
[APM] Add support for versioned APIs in diagnostics tool (#167050)
This fixes a problem where versioned APIs were not supported. It also
adds a `--local` flag for easily running the diagnostics tool against a
local cluster running with default credentials (elastic/changeme)
2023-09-29 15:56:50 -07:00
Bena Kansara
bfafd369a0
Hide related events tab in Custom threshold alert details page (#167646)
Resolves https://github.com/elastic/kibana/issues/167645

Hides "Related Events" tab in Custom threshold alert details page as we
want to keep it as a prototype.
2023-09-29 23:41:02 +02:00
Kevin Logan
872504aed5
[Security Solution] Add mac and enrichment fields advanced Policy setting for 8.11 (#167536)
## Summary
Adds new advanced Policy options for Mac for 8.11

<img width="1728" alt="image"
src="0948817b-32b4-4573-90b1-756d41a38d42">

<img width="1728" alt="image"
src="297d7d51-7785-402a-918f-e41fc30cf211">

Enrichment fields:
<img width="1728" alt="image"
src="f8ddc1de-c118-4bd4-9c57-b88fec957b8f">

<img width="1726" alt="image"
src="04087c19-7533-41ab-938e-868a8570a3eb">

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Daniel Ferullo <56368752+ferullo@users.noreply.github.com>
2023-09-29 14:34:46 -07:00
Jeramy Soucy
90faf2bd24
Migrates all security and spaces usage of deprecated Eui Page components (#167078)
Closes #161419

## Summary

Replaces deprecated EuiPage*_Deprecated components with the suggested
replacement components (see
[issue](https://github.com/elastic/kibana/issues/161419)).

### Visual Difference
The only UI that is noticeably affected is the User Profile page. The
spacing and header font size are slightly different from the previous
implementation, however, it is consistent with other
`Eui/KibanaPageTemplate` pages.

Previous render:
<img width="1391" alt="Screenshot 2023-09-22 at 1 27 27 PM"
src="58d2a86e-63b7-4c7d-bcf1-2071290d25b2">

New render:
<img width="1286" alt="Screenshot 2023-09-22 at 2 56 44 PM"
src="0f2b3e38-8ea3-4daf-8937-03e47474658c">

### Applicable Tests

-
x-pack/plugins/security/public/account_management/user_profile/user_profile.test.tsx
-
x-pack/plugins/security/public/management/users/users_grid/users_grid_page.test.tsx
-
x-pack/plugins/spaces/public/management/edit_space/manage_space_page.test.tsx
-
x-pack/plugins/spaces/public/management/spaces_grid/spaces_grid_page.test.tsx
-
x-pack/plugins/security/public/management/roles/roles_grid/roles_grid_page.test.tsx
(for permission denied)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-29 14:33:32 -04:00
Jordan
d4b7a480e6
[Cloud Security] Fix policy name increment (#167425)
Co-authored-by: Paulo Henrique <paulo.henrique@elastic.co>
2023-09-29 10:59:03 -07:00
Kibana Machine
be98e218c0 skip failing test suite (#167661) 2023-09-29 13:45:14 -04:00
Nathan Reese
50fa260d4c
[inspector] do not show clusters health bar when there are no remotes (#167657)
<img width="400" alt="Screenshot 2023-09-29 at 8 42 00 AM"
src="a8d575d7-776b-425b-a6fa-de91301f0512">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-29 11:26:13 -06:00
Dzmitry Lemechko
97c7d7d45f
[ftr] unskip serverless functional tests (#167497)
I hope the change made in #166936 allow us to unskip these tests

closes #165763
closes #165386
closes #165414
closes #166448 
closes #165943 
closes #166461
closes #166551

Flaky-test-runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3242

Quick stability check of re-enabled tests:
-
x-pack/test_serverless/functional/test_suites/common/examples/search_examples/partial_results_example.ts
100/100
-
x-pack/test_serverless/functional/test_suites/common/examples/unified_field_list_examples/existing_fields.ts
100/100 failures
- x-pack/test_serverless/functional/test_suites/common/home_page.ts
100/100
-
x-pack/test_serverless/functional/test_suites/common/index_management/create_enrich_policy.ts
99/100
-
x-pack/test_serverless/functional/test_suites/observability/cases/configure.ts
49/50
-
x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/app.ts
49/50
-
x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/filter_controls.ts
49/50
-
x-pack/test_serverless/functional/test_suites/security/ftr/cases/configure.ts
49/50
2023-09-29 13:03:57 -04:00
Steph Milovic
b888ecb45c
[Security solution] Rename Generative AI connector to OpenAI (#167677)
[Redo this PR](https://github.com/elastic/kibana/pull/167220) because
[this PR](https://github.com/elastic/kibana/pull/167220) merged shortly
before broke it and I had to fix an import

---------

Co-authored-by: lcawl <lcawley@elastic.co>
2023-09-29 11:54:55 -05:00
Khristinin Nikita
e1a280f602
Show old risk scores (#167235)
## Use legacy risk score indices if the new risks engine wasn't
installed

Legacy risk scores indices:
- `ml_user_risk_score_latest_default`
- `ml_host_risk_score_latest_default`

New risk score indices:
- `risk-score.risk-score-latest-default`

Which parts use risk score indices?
- Entity Analytics dashboard
- All host/user risk tab
- Single host/user risk tab
- Alert enrichment UI
- Alert enrichment Backend

All these components can use only one risk score data source at a time,
a new or legacy one.
Previously we started to use the new risk score indices if FF -
`['riskScoringPersistence', 'riskScoringRoutesEnabled'] ` was present
and there was no possibility for the client to see old risk score data
in UI, or use it for alert enrichments

This PR, changes the way, that clients will use legacy risk score
indices until they specifically choose to upgrade the risk engine.


In this video legacy risk transforms are installed, but user risk
transforms are not installed.


16acf38a-5694-4706-9426-cdea58b70a9b

### Cypress tests

I modify those tests in a way that we test that it works still with
legacy risk scores, but also with new risk scores.
Also, add some tests for upgrade workflow.

Also, some risk scores a different in legacy and new indices for the
same entities. So we can show in the tests, that they use different
indices.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-29 18:54:31 +02:00
Dima Arnautov
772739ab40
[ML] AIOps: Additional props for Change Point embeddable (#167606) 2023-09-29 18:24:10 +02:00
Bryce Buchanan
ee1f448d64
Changed mobile badge from 'technical preview' to 'beta' (#167543)
## Summary

The Mobile product is moving from technical preview to beta. This change
reflects that in the UI.

Before: 
<img width="659" alt="Screenshot 2023-09-25 at 4 15 13 PM"
src="59b85ca2-7feb-4899-bf6c-54da0c66fb51">

After: 

<img width="692" alt="Screenshot 2023-09-25 at 4 02 50 PM"
src="7b52451b-0f0d-415e-8679-0f19c6e83094">

<img width="770" alt="Screenshot 2023-09-25 at 4 04 54 PM"
src="0898511a-77ab-4c3f-ac3a-ca22513f8593">
2023-09-29 09:16:29 -07:00
Kibana Machine
ec7e5079e3 skip failing test suite (#167621) 2023-09-29 12:15:56 -04:00
Melissa Alvarez
0bdbcc0ccc
[ML][AIOps] Telemetry: track analysis endpoint usage (#166988)
## Summary

This PR adds tracking for Log Rate Analysis and Log Pattern Analysis
endpoints for AIOps.
- tracks type of analysis and source (where the analysis is being run
from)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-29 09:12:09 -07:00
Jonathan Budzenski
7dd352a65e Revert "[Security solution] Rename Generative AI connector to OpenAI (#167519)"
This reverts commit a81b620a41.
2023-09-29 11:09:02 -05:00
Dzmitry Lemechko
46aecbee5a
unskip many_fields_lens_editor journey (#167634)
## Summary

Adding extra wait time and check for chart rendering only after the page
is loaded (relying on Chart switch popover)
I would like to merge it before #166808 so we can check metrics
stability before actual merge.

Note: it looks like a product flakiness rather than test.

Flaky test runner stats

before:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3258
16/50 failed

after:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3261
100/100 passed
2023-09-29 17:49:10 +02:00
Elena Stoeva
d37d8ae85c
[serverless] Add Advanced Settings page (#167383)
## Summary

This PR adds a Settings application component for rendering the Advanced
Settings page in serverless.

### How to test:
1. Start Es with `yarn es serverless` and Kibana with `yarn
serverless-{es/oblt/security}`
2. Go to Management -> Advanced Settings
3. Verify that the settings can be changed and saved.

### Advanced Settings page:
<img width="1495" alt="Screenshot 2023-09-28 at 20 56 25"
src="374b3bbd-7bf6-4de7-8129-8b293dd1698e">

### Added an Advanced Settings card to the Management landing page:
<img width="1575" alt="Screenshot 2023-09-28 at 12 24 23"
src="c08b8b36-ff40-4772-87d6-597629d78342">




<!--- ### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

-->

---------

Co-authored-by: Clint Andrew Hall <clint@clintandrewhall.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
2023-09-29 08:48:37 -07:00
Cauê Marcondes
aa065b710c
[APM] Hidding UP tab for RUM (#167608)
<img width="900" alt="Screenshot 2023-09-29 at 10 12 24"
src="f7d97f43-df92-427d-a619-0b61601eccc7">
<img width="1537" alt="Screenshot 2023-09-29 at 10 12 30"
src="00e2844b-9d24-461a-a47a-5cbc483148af">
2023-09-29 08:48:22 -07:00
Steph Milovic
a81b620a41
[Security solution] Rename Generative AI connector to OpenAI (#167519) 2023-09-29 09:45:53 -06:00
Garrett Spong
3ba0f32952
[Security Solution][Elastic AI Assistant] Adds Model Evaluation Tooling (#167220)
## Summary

This PR introduces a new `internal/elastic_assistant/evaluate` route and
`Evaluation` Advanced Setting within the Assistant for benchmarking and
testing models, agents, and other aspects of the Assistant
configuration.

Enable via the `assistantModelEvaluation` experimental feature in your
`kibana.dev.yml` (and better add `discoverInTimeline` for good measure
as well! :)

> xpack.securitySolution.enableExperimental:
['assistantModelEvaluation', 'discoverInTimeline']

Then access from within the `Advanced Settings` modal in the Assistant.
To use, first select your Connectors/Models, then corresponding Agent
configurations, then what model you would like to use for final
evaluation, the evaluation type, and if `custom`, you can specify the
evaluation prompt that is sent off to the evaluator model. Finally,
specify the `dataset`, and `output index` that the results should be
written to, then click `Perform evaluation`.

Sample datasets can be found in
`x-pack/plugins/elastic_assistant/server/lib/model_evaluator/datasets`,
and include:

*  `esql_dataset.json`
* `query_dataset.json`
* `security_labs.json`
* `security_questions_dataset.json`

<p align="center">
<img width="500"
src="99f8e764-34bc-4eb7-bbd8-7038ab72117b"
/>
</p> 



<p align="center">
<img width="500"
src="f48f91dc-45da-4cd6-9dc7-cb88105668b2"
/>
</p> 







### Checklist

Delete any items that are not applicable to this PR.

- [X] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-09-29 09:32:24 -06:00
Konrad Szwarc
41cf85bee7
[EDR Workflows] Artifact Rollout - feature flag on, copy changes (#167489)
https://github.com/elastic/security-team/issues/7442

This PR:
1. Sets `protectionUpdatesEnabled` feature flag to `true`.
2. Text changes requested
[here](https://github.com/elastic/security-team/issues/7442)
3. Introduces ~~dismissable~~ callout that warns user about consequences
of turning auto updates off.
4. Adds cypress test that validates note persistance.

![Screenshot 2023-09-29 at 10 37
40](6879cc8c-beb9-4f0e-a378-357ae96ee80b)
![Screenshot 2023-09-29 at 10 37
17](48d2df33-9e9a-4b07-a589-ddd7e904e07b)
![Screenshot 2023-09-29 at 10 37
25](5691cc54-5b4e-4d32-a5a1-42ef801ba491)
2023-09-29 16:59:05 +02:00
Sergi Massaneda
fbd820b6c6
[Security Solution] Group contract components into one service (#167517)
## Summary

This PR refactors the public plugin contract of Security Solution,
grouping exposed components into one component service to reduce the
boilerplate code needed when adding new components to the plugin
contract for serverless.

It also refactors the `isILMAvailable` flag that was exposed in the
_start_ contract by the `dataQualityPanelConfig`, which is more
self-explanatory, and it has been exposed in the _setup_ contract
without observable.

### Usage of `ContractComponentsService`

1. Define the component in ess or serverless plugins:

```
    securitySolution.setComponents({
      getStarted: getSecurityGetStartedComponent(services, productTypes),
      dashboardsLandingCallout: getDashboardsLandingCallout(services),
      // ... other components
    });
```

2.  Use the component in the main security plugin

```
  const { services: { getComponent$ } } = useKibana();
  const GetStartedComponent = useObservable(getComponent$('getStarted'));
  return <>{GetStartedComponent}</>;
```

Component names are defined at 
 

84583e4960/x-pack/plugins/security_solution/public/contract_components.ts (L11)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-09-29 16:54:33 +02:00
Devin W. Hurley
5364b9f887
[Security Solution] [Detections] Adds metrics to some warning messages written to rule execution logger (#167551)
## Summary

Ref: https://github.com/elastic/kibana/issues/166971

Warning messages such as "max signals reached" or "rule may not have
read access to these indices" can now write metrics (if available) to
the rule execution logger.

Warning message:
<img width="1124" alt="warning_no_access_to_logs_index"
src="70b63a47-3e54-45b1-ba49-da531595e47e">

Metrics:
<img width="1669" alt="metrics_no_access_to_logs_index"
src="eac91dff-316a-4587-bab9-c816947be00e">
2023-09-29 10:53:46 -04:00
Mike Birnstiehl
1980beecf3
[Logs+] Update UX copy for logs onboarding (#166993)
## Summary
This PR closes [Issue
3236](https://github.com/elastic/observability-docs/issues/3236).

I've added some suggestions for UX copy in the logs onboarding. 

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yngrid Coello <yngrid.coello@elastic.co>
2023-09-29 07:48:02 -07:00
Kevin Delemme
2714e3e221
chore(slo): Improve SLO chart (#167521) 2023-09-29 10:41:44 -04:00
Carlos Crespo
67895dbb6b
[Infra UI] Fix tests cases that verify the node details page title and square color (#167624)
fixes https://github.com/elastic/kibana/issues/167071

## Summary

This PR fixes the infra home_page tests.

There were two things failing: 

- Node details page title assert: replaced `retryForTime` with `retry`
- The waffle node color asserts: After this change
https://github.com/elastic/kibana/issues/161754, the `sort nodes by
descending value` and `sort nodes by ascending value` weren't able to
capture the color attribute, due to it being missing in the html
element. After adding it back, I did a small refactor on the
`NodeSquare` component, for readability reasons.

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3260
2023-09-29 16:37:17 +02:00
Achyut Jhunjhunwala
2047a5556a
[APM] Fix cypress memory issue due to log panel (#167623)
## Summary

Recent [EUI bump](https://github.com/elastic/kibana/pull/166868) from
v88.3.0 to v88.5.0 increased the memory usage significantly. Due to
which Cypress Tests started failing due to browser crashing with memory
limits. EUI team has been informed about this.

As reverting EUI is not a simple change, disabling the Cypress Log panel
solves the problem for now. Details can be found
[here](https://github.com/cypress-io/cypress/issues/27415#issuecomment-1668073106)

This brings change to how we run the Cypress Test in Head Mode

## Before


![image](12a92c64-2e31-4423-8e8a-94a311757bd7)

## After

![image
(1)](d3a522c9-66e8-497c-b046-32a6c866b600)
2023-09-29 07:31:51 -07:00
jennypavlova
567a6de977
[Infra UI] Add options to the alerts link in the asset details flyout (#167616)
Closes #167524
## Summary

This PR adds the possibility of overriding the alerts flyout options.
This is used to change the metric value during the alert creation when
it is changed in the menu on inventory.

## Testing
- Go to Inventory
   - Change the metric in the drop-down menu
   - The metric should be changed in the alerts flyout
- Go to hosts view flyout (alert rule should remain the same)
- Go to asset details page view (alert rule should remain the same)



2bb31be0-04c8-4611-a8d2-b91a465a09b8
2023-09-29 16:26:23 +02:00
Hannah Mudge
9e8312f2e4
[Dashboard Navigation] Make links panel available under technical preview (#166896)
## Summary
This PR wraps up the work the @elastic/kibana-presentation team has done
to finish the MVP of [Phase
1](https://github.com/elastic/kibana/issues/154354) of the `Link`
embeddable, which enables users to add panels to their dashboard that
contain links to other dashboards + external links - with respect to
dashboard links, we give the author control over which pieces of context
should be kept across dashboards so that things like filter pills,
queries, and time ranges are not lost. This marks a huge improvement in
dashboard navigation overall, which was previously only available via a
variety of different workarounds including (but not limited to):
- Creating (essentially) a `noop` dashboard-to-dashboard drilldown 
- Using markdown panels with hard Dashboard links, which are prone to
break across updates
- Avoiding navigation all together, which resulted in large,
slow-to-load dashboards.

As an added benefit, because these panels contain **references** to each
dashboard rather than hard links, (1) unlike markdown links, they should
not break after updates and (2) if a links panel is exported and
imported into another space or instance, all of the dashboards it links
to will also be imported.



1a86b713-47e7-4db9-8a04-29d41b13681a

> **Note**
> 🔉 The above video has audio! Turn on your sound for the best
experience.

### Note about this PR
- A majority of this work was done on a feature branch, with thorough
reviews from @andreadelrio on behalf of @elastic/kibana-design along the
way. Therefore, while feedback on the design is encouraged, any large
concerns brought up in this PR should be filed as separate issues and
addressed in follow-up PRs.
- This PR contains work for giving embeddables control over their own
panel size / default positioning on the dashboard. This was especially
important for the links panel, since we assume that (a) most links
panels would be located somewhere near the top of the dashboard and (b)
the horizontal links panel should have a different default "shape"
(longer than it is tall) than the vertical panel (taller than it is
long).
- This PR also contains work for caching dashboard saved objects, which
makes navigation much more seamless.

### Flaky Test Runner
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3251


![image](7616443e-0cb0-43ce-a1d0-41f8bee6cbfc)


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~ This will
be addressed in a follow up:
https://github.com/elastic/kibana/issues/166750
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios - ~Units tests
are added, functional tests are forthcoming~ Edit: All tests are in.
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Nick Peihl <nick.peihl@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
2023-09-29 08:25:51 -06:00
Kevin Delemme
9d3213e137
fix(slo): Handle partial indicator url state (#167247) 2023-09-29 10:19:28 -04:00
Carlos Crespo
8c17d8ab5d
[Infra UI] Add missing configuration to display dotted lines in the metric charts (#167509)
fixes https://github.com/elastic/kibana/issues/166850
## Summary

This PR fixes a problem where the charts were not configured to display
dotted lines when there were data points missing.


<img width="1459" alt="image"
src="86228cba-f184-46b8-80f6-f439211e200f">

<img width="1459" alt="image"
src="ced0e3c4-93f1-4967-838c-f8207adc5e4d">



### How to test
- Setup a local Kibana instance pointing to an oblt cluster
- Navigate to `Infrastructure` > `Hosts` 
- Click on a host to navigate to the details page
- Verify if charts with missing data points display dottet lines
2023-09-29 15:59:05 +02:00
Kibana Machine
a32693db40 skip failing test suite (#167629) 2023-09-29 09:43:47 -04:00
Stratoula Kalafateli
7393bfefba
[Lens] Fixes mosaic with 2 axis coloring (#167035)
## Summary

Fixes https://github.com/elastic/kibana/issues/164964

The Other label was not formatted correctly.

<img width="1226" alt="image"
src="a8c8272e-b0c9-4088-93fc-45432d084570">


### Checklist
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2023-09-29 16:35:52 +03:00