Skip to content

[Fleet] Add collector onboarding steps to UI#254491

Merged
juliaElastic merged 17 commits intoelastic:mainfrom
juliaElastic:add-collector-ui
Feb 27, 2026
Merged

[Fleet] Add collector onboarding steps to UI#254491
juliaElastic merged 17 commits intoelastic:mainfrom
juliaElastic:add-collector-ui

Conversation

@juliaElastic
Copy link
Copy Markdown
Contributor

@juliaElastic juliaElastic commented Feb 23, 2026

Summary

Closes https://github.com/elastic/ingest-dev/issues/7019

To test:

  • enable feature flag xpack.fleet.enableExperimental: ['enableOpAMP']
  • Add collector button should be visible on the Fleet UI
  • When clicking on it, a flyout opens with steps to add collector
  • The flyout creates an agent policy (id:opamp) and displays opamp config with enrollment api key and fleet server host
  • The flyout confirms if collectors are connected
  • The OpAMP policy is hidden from Agent policy list UI

Update: moved the collector button in a context menu with the other add buttons:

add_collector_menu.mov
image image image image image

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, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests 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
  • 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 was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

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.

@juliaElastic juliaElastic added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Feb 23, 2026
@juliaElastic juliaElastic marked this pull request as ready for review February 23, 2026 16:33
@juliaElastic juliaElastic requested review from a team as code owners February 23, 2026 16:34
@botelastic botelastic bot added the Team:Fleet Team label for Observability Data Collection Fleet team label Feb 23, 2026
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@nchaulet nchaulet self-requested a review February 23, 2026 20:16

// Hide agentless policies by default unless showAgentless toggle is enabled
const getSearchWithDefaults = (newSearch: string) => {
const kueryHideOpAMP = `NOT ${agentPolicySavedObjectType}.name:"${OPAMP_POLICY_NAME}"`;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why hiding OpAmp agents?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The agents won't be hidden, only the agent policy "OpAMP" because it's not intended to be used for anything else. We could probably show it as a managed policy (so users can't enroll Elastic Agents to it).

<EuiToolTip content="Monitor an OTel collector in Fleet with OpAMP.">
<EuiButton
fill
color="accent"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the accent color from Eui guideline:

Pulls attention to key indicators like notifications or number of selections

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wanted to use a different color than Add agent, but this is going to change according to https://github.com/elastic/ingest-dev/issues/7019#issuecomment-3948730370

let opampPolicy = await fetchOpampPolicy();
if (!opampPolicy) {
// 2. Create if not exists
const created = await createOpampPolicyWithHook();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not totally related to that PR, I have some questions on that:

  • did we considered creating that policy as part of the setup? I am curious how this will looks like for some that do not use Fleet UI but some IAC tools to add opamp agents.
  • How that policy will work in non default space should we either have one policy per space, with maybe the space in the id, or should we share that policy accross all spaces and agents at the same time

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For IAC tools, they would have to use the API to create/get an enrollment token. We can make it easier for them to create the OpAMP agent policy in setup, so the enrollment token is available with one API call. Alternatively we could document creating a preconfigured OpAMP agent policy for them.

For space support, I think it's a valid use case to group collectors to different spaces, so probably best to create a policy per space, similarly to fleet-server-policy.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For space support, I think it's a valid use case to group collectors to different spaces, so probably best to create a policy per space, similarly to fleet-server-policy.

Should we do this that PR or do we want a followup PR for that? I can create the issue if you want

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can take a look in this PR

pollImmediately: true,
});

useEffect(() => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depending on the discussion bellow could be a good candidate for useQuery instead

@nimarezainia
Copy link
Copy Markdown
Contributor

@juliaElastic I made some comments in https://github.com/elastic/ingest-dev/issues/7019 to slightly re-design this page.

Copy link
Copy Markdown
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM 🚀


const isLogAndMetricsEnabled = agentPolicy?.monitoring_enabled?.length ?? 0 > 0;
const isLogAndMetricsEnabled =
(agentPolicy?.monitoring_enabled?.length ?? 0) > 0 || agent.type === 'OPAMP';
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix a small bug where the metrics dashboard link was hidden because the opamp agent policy doesn't have monitoring enabled.

Before:
Image

After:
Image

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Scout: [ platform / streams_app-stateful-classic ] plugin / local-stateful-classic - Stream data processing - creating steps - should handle insufficient privileges gracefully

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
fleet 1588 1589 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 2.2MB 2.2MB +6.6KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 193.2KB 193.2KB +14.0B

History

Copy link
Copy Markdown
Member

@mdbirnstiehl mdbirnstiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion, but lgtm!

juliaElastic and others added 2 commits February 27, 2026 09:01
…/sections/agents/agent_list_page/components/add_collector_flyout.tsx

Co-authored-by: Mike Birnstiehl <114418652+mdbirnstiehl@users.noreply.github.com>
@juliaElastic juliaElastic merged commit a98fe45 into elastic:main Feb 27, 2026
16 checks passed
qn895 pushed a commit to qn895/kibana that referenced this pull request Mar 11, 2026
## Summary

Closes elastic/ingest-dev#7019

To test:
- enable feature flag `xpack.fleet.enableExperimental: ['enableOpAMP']`
- Add collector button should be visible on the Fleet UI
- When clicking on it, a flyout opens with steps to add collector
- The flyout creates an agent policy (`id:opamp`) and displays opamp
config with enrollment api key and fleet server host
- The flyout confirms if collectors are connected
- The OpAMP policy is hidden from Agent policy list UI

Update: moved the collector button in a context menu with the other add
buttons:


https://github.com/user-attachments/assets/069e4d2b-978e-4041-bf0b-b29ef6ad3582

<img width="1107" height="569" alt="image"
src="https://github.com/user-attachments/assets/e48f146e-2ed3-4346-8f54-4725b0260cfb"
/>

<img width="1114" height="868" alt="image"
src="https://github.com/user-attachments/assets/9fdb04fb-99e2-4a26-a544-6f5779f36a79"
/>

<img width="585" height="834" alt="image"
src="https://github.com/user-attachments/assets/e68ae8f5-26ed-4265-a098-71e4dc2768cd"
/>

<img width="590" height="838" alt="image"
src="https://github.com/user-attachments/assets/e46c4ac3-6204-4a71-b3b6-cb4e4875dc2f"
/>

<img width="1113" height="614" alt="image"
src="https://github.com/user-attachments/assets/93a759b3-6416-4855-9e63-e03abfe12be9"
/>


### 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
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### 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)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Mike Birnstiehl <114418652+mdbirnstiehl@users.noreply.github.com>
juliaElastic added a commit that referenced this pull request Apr 7, 2026
## Summary

Closes elastic/ingest-dev#7148

Relates #254491
Relates elastic/ingest-dev#6982
Relates #252541

Enable OpAMP feature flag

The feature flag enables the `Add collector` button in Fleet UI and the
`/effective_config` route that is used from the Agent Details UI if the
agent is an OTel collector.

<img width="2214" height="1824" alt="image"
src="https://github.com/user-attachments/assets/1520a587-8844-43d4-8d92-e93ca09527fe"
/>

Serverless:
<img width="1308" height="723" alt="image"
src="https://github.com/user-attachments/assets/79b9b086-b693-4c45-8bdc-c586bbd71dee"
/>

## Release note
Enables OpenTelemetry (OTel) collector support in Fleet. Users can now
add OTel collector agents via a new Add collector button in the Fleet
UI.
OTel collectors will be visible in Fleet Agent list, with the ability to
monitor them (view their Component Health, Effective Config, link to
internal telemetry dashboard).
The feature is in technical preview.

### 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
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### 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)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
kelvtanv pushed a commit to kelvtanv/kibana that referenced this pull request Apr 7, 2026
## Summary

Closes elastic/ingest-dev#7148

Relates elastic#254491
Relates elastic/ingest-dev#6982
Relates elastic#252541

Enable OpAMP feature flag

The feature flag enables the `Add collector` button in Fleet UI and the
`/effective_config` route that is used from the Agent Details UI if the
agent is an OTel collector.

<img width="2214" height="1824" alt="image"
src="https://github.com/user-attachments/assets/1520a587-8844-43d4-8d92-e93ca09527fe"
/>

Serverless:
<img width="1308" height="723" alt="image"
src="https://github.com/user-attachments/assets/79b9b086-b693-4c45-8bdc-c586bbd71dee"
/>

## Release note
Enables OpenTelemetry (OTel) collector support in Fleet. Users can now
add OTel collector agents via a new Add collector button in the Fleet
UI.
OTel collectors will be visible in Fleet Agent list, with the ability to
monitor them (view their Component Health, Effective Config, link to
internal telemetry dashboard).
The feature is in technical preview.

### 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
- [ ] [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
- [ ] 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)
- [ ] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

### 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)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants