Commit graph

84855 commits

Author SHA1 Message Date
Dzmitry Lemechko
48cd2075f7
[scout] add 'apiServices' fixture to group Kibana API helpers (#214470)
## Summary

We decided to group `Kibana API helpers` under a single fixture:
`apiServices` instead of individual fixtures. It should simplify the
search of existing helpers and reduce a risk for Teams to create the
same helper like we see today with FTR.
Adding just `apiServices` in test context and adding dot will expand a
list of all available API helpers + it can be extended for individual
solution (e.g. @kbn/scout-oblt) and directly in plugin (if there is no
chance to re-use it in other plugins)

<img width="699" alt="image"
src="https://github.com/user-attachments/assets/34a76659-04af-48c4-ab69-abda0c950206"
/>


Before:

```
test('should create something', async ({
      fleetApi,
      onboardingApi,
      alertingApi,
    }) => {
      await fleetApi.integration.install(integrationName);
      await onboardingApi.updateInstallationStepStatus(
        onboardingId,
        'ea-download',
        'complete'
      );
      await alertingApi.waitForAlert(alertId);
```

After:

```
test('should create something', async ({
      apiServices,
    }) => {
      await apiServices.fleet.integration.install(integrationName);
      await apiServices.onboarding.updateInstallationStepStatus(
        onboardingId,
        'ea-download',
        'complete'
      );
      await apiServices.alerting.waitForAlert(alertId);
```
2025-03-18 13:34:25 +02:00
Konrad Szwarc
9a179d7fd6
[EDR Workflows] Defend Insights - Evaluation (#213959)
This PR introduces evaluation functionality to Defend Insights, enabling
us to trigger LangSmith experiments directly from Kibana.
Additionally, we’ve migrated to the new prompt storage system used in
Attack Discovery (see commit bcbb12b732).
2025-03-18 13:28:49 +02:00
Ievgen Sorokopud
3f0f461d4e
[Attack Discovery][Scheduling] Add tabs to Attack Discovery settings flyout (#12007) (#214808)
## Summary

Main ticket ([internal
link](https://github.com/elastic/security-team/issues/12007))
Filgma link: ([internal
link](https://www.figma.com/design/1AEgYCsQjCsWxAKoErYfL3/9.1-%5BAttack-Discovery%5D-Scheduling-%26-notifications?node-id=3421-195207&t=Y9ejBkDCojHD95qw-4))

With these changes we introduce tabs in Attack Discovery settings
flyout: Settings and Schedule.

## Settings tab

Settings tab contains all current filtering settings applied to the
manually triggered Attack Discovery generations.

<img width="643" alt="Screenshot 2025-03-17 at 16 46 09"
src="https://github.com/user-attachments/assets/4b43f304-2c73-497a-8112-d024a6b04623"
/>

## Schedule tab

Schedule tab will have Attack Discovery scheduling rules management. As
a first step it shows empty state with no existing schedules and the
"Create" button.

<img width="645" alt="Screenshot 2025-03-17 at 16 45 57"
src="https://github.com/user-attachments/assets/f8a952b3-452f-4281-b41a-18a5023440f3"
/>

## NOTES

The feature is hidden behind the feature flag:

> xpack.securitySolution.enableExperimental:
['assistantAttackDiscoverySchedulingEnabled']

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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/src/platform/packages/shared/kbn-i18n/README.md)
- [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
2025-03-18 12:20:19 +01:00
Alex Szabo
1c6f8bed0b
[ci] Disable chrome forward testing until 2025-03-28 (#214947)
## Summary
The chrome forward-testing pipeline highlights upcoming errors in next
chrome versions:
https://buildkite.com/elastic/kibana-chrome-forward-testing

It's currently broken since chrome-beta was updated to 135. Chrome 135
will drop to main line on [April 1st.
](https://chromiumdash.appspot.com/schedule)

Revert this by 2025-03-28, or if
https://github.com/elastic/kibana/issues/213919 is finished.
2025-03-18 11:59:18 +01:00
Alex Szabo
702c9c49dc
[CI] Only emit .d.ts when running typecheck (#209259)
## Summary
Stop emitting any `.js` files during typechecking. We only depend on the
declarations, not the emitted, compiled javascript files.

An added benefit, is making some bad import errors more obvious.  
We'll no longer try to build javascript files in place if a poor
import/require is made, rather the error of importing outside projects
(in the forest of a bunch of errors possibly) will be visible in the
typescript logs:
```
# instead of:
proc [tsc] error TS5055: Cannot write file '/opt/buildkite-agent/builds/bk-agent-prod-gcp-1741789017236110254/elastic/kibana-pull-request/kibana/src/platform/packages/shared/kbn-babel-register/cache/no_cache_cache.js' because it would overwrite input file.

# we'll see:
... several others like this
 proc [tsc] src/platform/packages/shared/kbn-grok-ui/scripts/generate_patterns.js:10:9 - error TS6307: File '/Users/alex/Git/elastic-kibana/src/setup_node_env/index.js' is not listed within the file list of project '/Users/alex/Git/elastic-kibana/src/platform/packages/shared/kbn-grok-ui/tsconfig.type_check.json'. Projects must list all files or use an 'include' pattern.
 proc [tsc] 
 proc [tsc] 10 require('../../../../../setup_node_env');
... several others like this
```
2025-03-18 11:48:14 +01:00
elastic-vault-github-plugin-prod[bot]
53970f276c
[main] Sync bundled packages with Package Storage (#214911)
Automated by
https://buildkite.com/elastic/package-storage-infra-kibana-discover-release-branches/builds/2460

Co-authored-by: elasticmachine <elasticmachine@elastic.co>
2025-03-18 10:39:14 +00:00
Alex Szabo
f0a9bb01d3
upgrade axios to 1.8.3 (#214843)
## Summary
Updates [axios to
1.8.3](https://github.com/axios/axios/releases/tag/v1.8.3).

Axios 1.8.2 fixed a vulnerability, but forgot to reflect the new flag in
their type definitions. This is probably required to allow the changes
smoothly.
2025-03-18 11:24:09 +01:00
Sergi Romeu
dbb2aeda4d
[APM] Fix entry item in waterfall shouldn't be orphan (#214700)
## Summary

Closes #213074

This PR fixes the scenario where the entry waterfall transaction is
treated as an orphan, causing it to reparent itself and be duplicated
multiple times.

---------

Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
2025-03-18 11:02:30 +01:00
Kevin Lacabane
d8c62dbd38
[streams][lifecycle] format total docs (#214823)
Total docs is now readable


![formatnumber](https://github.com/user-attachments/assets/64ba53c7-e574-4540-aac0-dd3da2521d89)
2025-03-18 10:58:25 +01:00
Marco Liberati
0b9df094d1
[Lens][Datatable] Fix color by value for Last value array mode (#213917)
## Summary

Fixes the table side of #188263 

The [fix used for
`Metric`](https://github.com/elastic/kibana/pull/209110) has been
generalized and re-used for the datatable visualization.


![color_by_value_table](https://github.com/user-attachments/assets/b347dba2-24d7-4233-8c0c-3236f5212f35)


### Checklist

- [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
2025-03-18 10:09:03 +01:00
Mykola Harmash
68a25a423e
[Obs Onboarding] Add page rendering performance monitoring (#213769)
Closes https://github.com/elastic/observability-dev/issues/4238 🔒
Closes https://github.com/elastic/observability-dev/issues/3513 🔒

This change add logic for triggering [the page rendering performance
metrics](https://docs.elastic.dev/kibana-dev-docs/tutorial/performance/adding_custom_performance_metrics#report-kibanaplugin_render_time-metric-event)
for:
* Onboarding home screen
* Host auto-detect flow
* Host OTel flow
* Host K8S flow
* K8S OTel flow
* Firehose flow

## How to test
1. Run Kibana locally
2. Open browser dev tools
3. Navigate to one of the above mentioned onboarding screens
4. Observe `kibana:plugin_render_time` EBT event emitted in the Network
tab of the dev tools

Events emitted from local Kibana end up in the Staging Telemetry
cluster, there is a [dedicated rendering performance
dashboard](f240fff6-fac9-491b-81d1-ac39006c5c94?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-24h%2Fh,to:now))),
onboarding events can be filtered using `observabilityOnboarding`
application ID. (note that it takes some time for events to be indexed
and they appear in the cluster with a significant delay)
2025-03-18 09:50:38 +01:00
Julia Bardi
ea34871445
[Fleet] Fix issues in developing_kibana_in_serverless.md (#214802)
Fix some issues (typos) in the serverless guide.
2025-03-18 08:47:09 +01:00
Kibana Machine
82032a334f
[api-docs] 2025-03-18 Daily api_docs build (#214893)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1015
2025-03-18 06:17:34 +00:00
Lisa Cawley
ab0776ee1e
[DOCS] Logstash configuration management APIs (#214497) 2025-03-17 22:54:06 -07:00
christineweng
48df091c71
[Security Solution] Fix session view error from alerts tab (#214887)
## Summary

Related: https://github.com/elastic/kibana/issues/130641

When session view is opened on non-alert pages, if alert index is not
passed, an error shows up when opening alert flyout.
https://github.com/elastic/kibana/pull/196422 addressed this by passing
an `alertsIndex` to the index name. However, it only addressed the
alerts from the canvas area, when clicking view alerts from the alert
panel, the error still occurs. This PR fixed that by passing alerts
index in the panel as well.

The bug only applies to alerts opened from alerts tab, and when
`visualizationinFlyout` is enabled. This video shows the alerts flyout
is showing correctly with the advanced setting on and off.


https://github.com/user-attachments/assets/8dca4568-4645-4718-9605-17baa0691ed0

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-03-18 03:57:36 +00:00
Kevin Qualters
4334508e62
[Security Solution] [Notes] Make notes tests deterministic (#214876)
## Summary

Unskips some recently skipped tests in the notes reducer, I believe
because the time for each mock was just Date.now(), resulting in
slightly different times for each mock on ci, whereas locally the time
is the same.

### Checklist

- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2025-03-17 19:25:23 -05:00
Saikat Sarkar
e78a2d19e1
[Onboarding] Fix flakey Skipped MKI tests for Index Management (Delete and Create) (#214513)
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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/src/platform/packages/shared/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
- [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
- [ ] 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 was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-03-17 17:18:17 -05:00
Lisa Cawley
57caf8796c
[DOCS] Add minimal uptime APIs (#213867) 2025-03-17 15:03:33 -07:00
Dzmitry Lemechko
6613e27804
change codeowners for scout cdp discover test (#214858)
## Summary


Changing code owners as discussed with @thomasneirynck and @davismcphee.
I also bumped CPU time limit as it fails few times passing over `1.55`
sec.
2025-03-17 21:32:49 +01:00
Viduni Wickramarachchi
43079c7603
[Obs AI Assistant] Remove prompts from recall ranking Telemetry event (#214573)
Closes https://github.com/elastic/obs-ai-assistant-team/issues/224

## Summary

Relates to https://github.com/elastic/obs-ai-assistant-team/issues/186

Removes the prompts from the recall ranking telemetry event.

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-03-17 16:10:44 -04:00
Chris Cowan
508c89fc15
[Streams 🌊] Add initial telemetry to Streams (#214027)
## Summary

This PR adds EBT telemetry to the Streams backend and UI. For the
backend APIs, we are only measuring latency on the "write" endpoints
that have the highest potential for being slow:

- `POST /api/streams/{name}/processing/_simulate 2023-10-31`
- `POST /api/streams/{name}/processing/_suggestions 2023-10-31`
- `POST /api/streams/{name}/_fork 2023-10-31`
- `PUT /api/streams/{name}/dashboards/{dashboardId} 2023-10-31`
- `PUT /api/streams/{name} 2023-10-31`
- `PUT /api/streams/{name}/_group 2023-10-31`
- `PUT /api/streams/{name}/_ingest 2023-10-31`
- `DELETE /api/streams/{name} 2023-10-31`
- `POST /api/streams/_enable 2023-10-31`
- `POST /api/streams/_disable 2023-10-31`
- `POST /api/streams/_resync 2023-10-31`

This is controlled by an allow list located in the server's telemetry
client.

For the UI, I've added the following tracking:

- **Number of Dashboards associated with a Stream** – This captures the
stream name and the number of dashboards associated with it. It's
attached to the dashboard hook, this means that we only track dashboard
counts on streams that users are actually using.
- **Clicks on Dashboards** – This captures the name of the dashboard,
the dashboard id, and the stream name
- **Latency of AI Grok Suggestions** – This captures the name of the
stream, the field used, the number of suggested patterns, the success
rates of the suggest patterns, and the connector id of the LLM. This
will also capture if the AI returned ZERO suggestions.
- **When a user accepts an AI Grok Suggestion** – This captures the name
of the stream, the name of the field, the success rate of the pattern,
and number of fields detected.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-17 19:34:52 +00:00
Robert Stelmach
20d1619b3b
replace 'navigateTo' with locators for some guide cards and simplify the flow of Collect and analyze my logs and Monitor my Host metrics (#213354)
Add locator to some guidecards and simplify the flow by updating the
links

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-17 20:31:41 +01:00
Nicolas Chaulet
6ed6d02f37
[Fleet] Fix fleet server policy creation with non es default output (#214590) 2025-03-17 15:14:25 -04:00
Dominique Clarke
71b7458767
[Incident Management] add recommended dashboards api (#213287)
## Summary

Adds a basic api for finding suggested dashboards by alert.

This internal API is currently not in use anywhere.

This api finds suggested dashboards in two ways:
1. Finding dashboards with lens visualizations that query against the
same data view
2. Finding dashboards with lens visualizations that utilize fields in
the rule configuration, or alert data.

These are two naive approaches to finding suggested dashboards. These
heuristics will be improved over time and incorporate more sophisticated
approaches that have been explored by numerous engineers across
Observability.

## Testing

A basic api integration test is included that covers matching dashboards
by index and field, across spaces. As we develop this feature further
over time more fine grain tests will be added

### Manual Testing

1. Run
```
node x-pack/scripts/data_forge.js --events-per-cycle 200 --lookback now-1h --ephemeral-project-ids 10 --dataset fake_stack --install-kibana-assets --kibana-url http://localhost:5601 --event-template bad
```
2. Save the file as a .ndjson file and import it via saved objects
import
https://p.elstc.co/paste/3BWKIHLU#f0WfGYx7G9DhWy88yDXhaEXTX16Fn+ovDcomNIx6E3a
3. Navigate to the alert details page, you should start to see a lot of
alerts
4. Click on one, and copy the alert id
5. Navigate to console and paste `GET
kbn:/internal/observability/alerts/suggested_dashboards?alertId=[YOUR_ALERT_ID]`
to see the recommended dashboards

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
2025-03-17 15:13:04 -04:00
Jeramy Soucy
da7e44988d
Upgrade xml-crypto 6.0.0 → 6.0.1 (#214792)
## Summary

Upgrades `xml-crypto` from v6.0.0 to v6.0.1
2025-03-17 18:57:41 +01:00
Tiago Costa
4a863de015
skip flaky suite (#203607) 2025-03-17 17:46:25 +00:00
Kibana Machine
9437eb46e9 skip failing test suite (#214633) 2025-03-17 18:41:16 +01:00
Tomasz Ciecierski
7083930b87
[AI4DSOC] Add navigation (#214382) 2025-03-17 17:35:08 +00:00
Elena Shostak
e5e42a87ea
Unauthorized route migration for routes owned by kibana-presentation (#214783)
### Authz API migration for unauthorized routes

This PR migrates last unauthorized routes owned by your team to a new
security configuration.
Please refer to the documentation for more information: [Authorization
API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)

### **Before migration:**
```ts
router.get({
  path: '/api/path',
  ...
}, handler);
```

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```
2025-03-17 13:34:43 -04:00
Jatin Kathuria
bdd0de29b1
[Siem Migrations] - Adds eventName property for Siem Migrations telemetry (#214186)
## Summary

This PR adds `eventName` property to the Siem Migrations telemetry. This
change is non-destructive to previous format and simply adds a new
property `eventName`.
2025-03-17 17:28:23 +00:00
Elena Shostak
a46e7cbfa3
Unauthorized route migration for routes owned by kibana-esql (#214781)
### Authz API migration for unauthorized routes

This PR migrates last unauthorized routes owned by your team to a new
security configuration.
Please refer to the documentation for more information: [Authorization
API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)

### **Before migration:**
```ts
router.get({
  path: '/api/path',
  ...
}, handler);
```

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```
2025-03-17 17:05:36 +00:00
Enrico Zimuel
8614430e2d
Updated the serverless getting started page for PHP (#214707)
As titled
2025-03-17 16:52:05 +00:00
Alex Szabo
8f0cd7366d
update package testing script after /test was moved to src/platform/test (#214730)
## Summary
After https://github.com/elastic/kibana/pull/210956 - the artifact
snapshot testing code is broken because a path reference wasn't updated.
This PR updates that.

Fixes:
https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/5745

The checks started
(https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/5764)
but it failed for a different reason. Probably some real errors?
2025-03-17 17:27:47 +01:00
Elena Shostak
229dca52a6
Unauthorized route migration for routes owned by response-ops (#214785)
### Authz API migration for unauthorized routes

This PR migrates last unauthorized routes owned by your team to a new
security configuration.
Please refer to the documentation for more information: [Authorization
API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)

### **Before migration:**
```ts
router.get({
  path: '/api/path',
  ...
}, handler);
```

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```
2025-03-17 16:08:59 +00:00
Elena Shostak
f82949698a
Unauthorized route migration for routes owned by appex-ai-infra (#214777)
### Authz API migration for unauthorized routes

This PR migrates last unauthorized routes owned by your team to a new
security configuration.
Please refer to the documentation for more information: [Authorization
API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)

### **Before migration:**
```ts
router.get({
  path: '/api/path',
  ...
}, handler);
```

### **After migration:**
```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      enabled: false,
      reason: 'This route is opted out from authorization because ...',
    },
  },
  ...
}, handler);
```
2025-03-17 16:05:32 +00:00
Elena Shostak
e93a63331a
Unauthorized route migration for routes owned by stack-monitoring (#214787)
## Summary

Passed security config to the core router, so it is correctly captured.


### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2025-03-17 16:04:40 +00:00
David Kilfoyle
be351d3c97
Convert Alert and Action Settings yaml strings to Markdown (#214642)
This PR:
- Makes a backup copy of the `kibana-alert-action-settings.yml` file
just in case I mess things up badly.
- Converts all of the descriptions and examples in the original file to
Markdown format.
 - Adds the versioning info as follows:
      - supported on ESS/ECH:
        ```
        applies_to:
          stack: ga
          deployment:
            self: ga
            ess: ga
        ``` 
      - not supported on ESS/ECH:
        ```
        applies_to:
          stack: ga
          deployment:
            self: ga
        ``` 

In the current Kibana settings docs we indicate settings available on
ESS/ECH. We don't indicate anything for other deployment types such as
ECK or ECE. I assume that no settings are available on Serverless. So,
the above versioning basically just copies what we document currently.

Once merged, I expect that we can test rendering the docs HTML pages
(like [this
one](https://www.elastic.co/guide/en/kibana/8.x/alert-action-settings-kb.html))
directly from this [YAML
source](https://github.com/elastic/kibana/blob/main/docs/settings-gen/source/kibana-alert-action-settings.yml).

@florent-leborgne and @wajihaparvez Sorry, I know this is kind of big.
I'd appreciate any input, especially on the versioning / `applies_to`
part since that's still a bit new.

Just for my own reference, I cut and pasted all of the Markdown from
[here](https://github.com/elastic/asciidocalypse/blob/main/docs/kibana/docs/reference/configuration-reference/alerting-settings.md?plain=1).

Closes: https://github.com/elastic/ingest-docs/issues/1659
2025-03-17 11:39:26 -04:00
Julia Bardi
68749db959
[Fleet] fix reassign agent with spaces (#214748)
## Summary

Closes https://github.com/elastic/kibana/issues/214341

Updating agent spaces when reassigning to agent policy.

To verify:
- Enable space awareness
- Create an agent policy and enroll an agent to it
- Create another agent policy and assign 2 spaces to it
- Reassign agent to the second policy
- Verify that the agent is visible in both spaces
- Same behaviour with bulk reassign action

<img width="1789" alt="image"
src="https://github.com/user-attachments/assets/3c7e6f07-c8d1-4a26-9e05-483caea6da1e"
/>
<img width="1789" alt="image"
src="https://github.com/user-attachments/assets/b84d2f69-8ba7-4a38-9a80-9b9e8ab9b37a"
/>
<img width="1782" alt="image"
src="https://github.com/user-attachments/assets/1272c35b-25cc-4a55-af6d-61b442ff3e07"
/>
<img width="1489" alt="image"
src="https://github.com/user-attachments/assets/df23f420-63f5-4d4b-bdb2-721a381adb4e"
/>


### Checklist

- [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
2025-03-17 16:30:22 +01:00
Irene Blanco
44d49a9501
[Discover] Highlight filtered values in badges for custom cell renderers (#213941)
## Summary

Closes https://github.com/elastic/kibana/issues/213216

This PR adds the functionality to properly highlight filtered values
within badges.

Previously, the content was treated as `text` instead of `html`, which
prevented the highlighted values from being displayed correctly.

The content is now rendered with the `<mark>` tag, allowing matching
values to be properly highlighted within the badges.

>[!NOTE]
>By looking at the code I assumed the `<mark>` tag is the only one we
introduce, so the proposed solution only handles that.


|Before|After|
|-|-|
|![Screenshot 2025-03-11 at 15 02
02](https://github.com/user-attachments/assets/779a860e-52c1-446a-b23a-09432ec01132)|![Screenshot
2025-03-11 at 15 02
31](https://github.com/user-attachments/assets/1e4d4a97-fc06-4302-88fe-d6060b6f99bf)|

### How to test

- Make sure you are in a space with Observability as solution view
- Select the "All logs" data view
- Add any filter that matches the displayed badges value
2025-03-17 15:18:36 +00:00
Bailey Cash
26d84c4e13
[Obs Overview] Replace clickable tooltip with external link (#213741)
## Summary

Resolves [this issue](https://github.com/elastic/kibana/issues/210168)

Vital links / clickable items should not be hidden behind tooltips that
require an additional click, as they do not include necessary indicators
for screen readers. Converting the clickable tooltip with the core web
vitals docs to a standard link.

<img width="1727" alt="Screenshot 2025-03-10 at 9 33 30 AM"
src="https://github.com/user-attachments/assets/ab611238-1fa1-455b-b0c4-563ae875e51d"
/>

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-17 15:09:13 +00:00
Janki Salvi
6088eb221e
[ResponseOps][Rules] Allow users to delete snooze schedule from a rule (#213247)
## Summary

Resolves https://github.com/elastic/kibana/issues/198783

This PR allows to delete existing snooze schedule from a rule using
schedule id.


### Checklist

- [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

### How to test
- Create a rule in kibana
- Snooze that rule via new public API
- delete that snooze schedule via public api

Method: `DELETE`
Path:
`https://localhost:5601/api/alerting/rule/<ruleId>/snooze_schedule/<scheduleId>`

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

### Release note
Allow users to delete a snooze schedule from a rule using schedule id

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
2025-03-17 14:50:47 +00:00
Mykola Harmash
fabb1c9ffd
[Obs Onboarding][Auto Detect] Fix auto detect script failing on systems with older curl versions (#214552)
Closes https://github.com/elastic/kibana/issues/212075

This change replaces the `--no-progress-meter` curl parameter with a
combination of `--silent` and `--show-error` to suppress verbose
progress output. `--no-progress-meter` was introduced in curl `v7.67.0`
which is not available on some popular OSs like RHEL 8.

## How to test

1. Create an RHEL 8 instance in GCP and login via SSH
2. Open auto detect flow on the Kibana instance deployed from this PR
3. Go through the flow and make sure the auto detect script goes through
all steps successfully
2025-03-17 15:27:33 +01:00
Vadim Kibana
c27ce4a3f6
[ES|QL] CHANGE_POINT command support in pretty-printing and Visitor (#214389)
## Summary

Partially addresses https://github.com/elastic/kibana/issues/211543

- Adds `CHANGE_POINT` command supoprt to `Visitor`
- Adds prertty-printing support for `CHANGE_POINT` command



### Checklist

- [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
2025-03-17 15:17:58 +01:00
Kevin Delemme
b11f53fdef
fix(slo): create SLO test on MKI (#214688) 2025-03-17 09:37:09 -04:00
Søren Louv-Jansen
6bb4badddc
[Obs AI Assistant] Extract get_data_on_screen function (#214362)
Minor refactor to extract get registration of `get_data_on_screen`. This
way the function co-located with the other LLM functions making it
easier to find and test.
2025-03-17 13:28:35 +00:00
Sander Philipse
cb6f8bbd3a
[Inference Endpoints] Fix non-required secret fields getting mangled (#214159)
This fixes an issue with the inference flyout where a 'secret' field
that wasn't required would defocus after every keypress. This happened
because the validation accidentally removed those secrets from the
schema, which forced a destruction of the components, and then on the
next render they got added back in.

This fixes that by no longer filtering out documents in the validation,
but only mapping them.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-17 13:12:17 +00:00
Stratoula Kalafateli
685ab6cbc7
[ES|QL] Fixes the comment autocomplete when there is a space (#214696)
## Summary

Fixes the problem with autocomplete been triggered in comments

**Before**

![meow](https://github.com/user-attachments/assets/a201a429-1280-47d9-8874-f12335d59f55)

**Now**

![meow](https://github.com/user-attachments/assets/365d2252-95a9-419e-9de8-319eaa208d3b)

### 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
2025-03-17 14:07:09 +01:00
Edgar Santos
07baf3a79f
[Security Solution][Detection Engine] fixes rule preview works for form's invalid state (#173930) (#213801)
# Summary
This PR changes the behavior of the Preview rule button in the create
rule form. Now the button will always be enabled, but upon clicking it
the validation of the define rule form will be triggered. If the form is
invalid, it will show a warning redirecting the user to the form in
order to fix the errors.

This PR removes the helper function `getIsRulePreviewDisabled` after
verifying that all the validations that it was doing are already covered
by the validation rules of the define rule form.


This solves issue #173930

---------

Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com>
2025-03-17 13:56:13 +01:00
Sander Philipse
7e359558f1
[Search] Fix top padding on create index to be consistent (#214188)
## Summary

This fixes the top padding on the create index page jumping around. 

Before:


https://github.com/user-attachments/assets/b6266bbd-9d61-4da7-bdd6-67dbfe71c23f

After:


https://github.com/user-attachments/assets/1c4c2c31-bbf3-4760-b392-d0abe5de4462

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-17 12:52:58 +00:00
Bharat Pasupula
059e7e7c52
[Automatic Import] Fix chunking of samples in ecs mapping (#214702) 2025-03-17 12:52:37 +00:00