Skip to content

[Agentless Connectors] Integration overview panel#210222

Merged
jedrazb merged 19 commits intoelastic:mainfrom
jedrazb:fleet-summary-panel
Feb 11, 2025
Merged

[Agentless Connectors] Integration overview panel#210222
jedrazb merged 19 commits intoelastic:mainfrom
jedrazb:fleet-summary-panel

Conversation

@jedrazb
Copy link
Copy Markdown
Contributor

@jedrazb jedrazb commented Feb 7, 2025

Summary

Add links to relevant areas for agentless connector:

  • link integration owning this connector
  • if policy related to this connector exist:
    • add link to view policy
    • otherwise display No policy found
  • if agent related to this policy exists
    • display agent status (e.g. is it offline, or any other state)
    • link to fleet agent host overview
    • create discover app link to show logs related to agent/connector for the past 6 hrs (select relevant columns :) )
    • otherwise, handle this

Changed isWaitingOnAgentlessDeployment to just check whether last_seen (connector heartbeat field) was populated, this is to address this reported issue.

Happy path

agentless.connectors.mov

Handling edge cases

No agent / inactive agent

agentless.connectors.edge.cases.mov

similarly we handle edge cases with policy not existing yet

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

@jedrazb jedrazb added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 backport:version Backport to applied version labels labels Feb 10, 2025
@jedrazb jedrazb marked this pull request as ready for review February 10, 2025 15:48
@jedrazb jedrazb requested a review from a team as a code owner February 10, 2025 15:48
@jedrazb jedrazb changed the title [WIP] Fleet summary panel [Agentless Connectors] Integration overview panel Feb 10, 2025
Copy link
Copy Markdown
Contributor

@JoseLuisGJ JoseLuisGJ left a comment

Choose a reason for hiding this comment

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

Nice work. I added some suggestions regarding how to display the links and the related info

@jedrazb
Copy link
Copy Markdown
Contributor Author

jedrazb commented Feb 11, 2025

@JoseLuisGJ addressed your feedback
Screenshot 2025-02-11 at 11 08 37
Screenshot 2025-02-11 at 11 08 50

Copy link
Copy Markdown
Contributor

@JoseLuisGJ JoseLuisGJ left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Copy Markdown
Member

@artem-shelkovnikov artem-shelkovnikov left a comment

Choose a reason for hiding this comment

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

Looks good, left a couple comments

// If no agents assigned to policy, just return the policy
return policy;
} else {
// Return the first (and only) agentless host associated with this 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.

Shall we check if there are several agents and warn if so?

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.

Yup will drop a warn log, showing this warning in UI might be harder as we don't have logic in place to propagate it nicely

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.

Addressed in 1897dac

package_name: string;
agent_policy_ids: string[];
connector_settings: PackageConnectorSettings;
agent_metadata?: AgentMetadata;
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.

We should document why it's not available in other methods.

Ideally it should be:

  1. Always populated
  2. A different object that outlines what is returned so that it's more obvious why and what is returned

If we keep adding nullable fields that are populated conditionally, it quickly becomes a large problem.

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.

you are right 👍 I will create a new tsx type for this method the returns agent metadata

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.

Addressed in 1897dac

Copy link
Copy Markdown
Contributor

@navarone-feekery navarone-feekery left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
enterpriseSearch 1389 1391 +2

Async chunks

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

id before after diff
enterpriseSearch 1.5MB 1.5MB +4.7KB

Page load bundle

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

id before after diff
enterpriseSearch 38.3KB 38.6KB +249.0B

History

@jedrazb jedrazb merged commit 0edba39 into elastic:main Feb 11, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.0

https://github.com/elastic/kibana/actions/runs/13266404741

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Feb 11, 2025
## Summary

Add links to relevant areas for agentless connector:
- link integration owning this connector
- if policy related to this connector exist:
   -  add link to view policy
   - otherwise display `No policy found`
- if agent related to this policy exists
  - display agent status (e.g. is it offline, or any other state)
  - link to fleet agent host overview
- create discover app link to show logs related to agent/connector for
the past 6 hrs (select relevant columns :) )
  - otherwise, handle this

Changed isWaitingOnAgentlessDeployment to just check whether `last_seen`
(connector heartbeat field) was populated, this is to address this
reported [issue](https://github.com/elastic/search-team/issues/9165).

### Happy path

https://github.com/user-attachments/assets/76db0b66-dda3-43a7-a74b-79348c7e7989

### Handling edge cases

#### No agent / inactive agent

https://github.com/user-attachments/assets/eae9b8da-de24-4d77-bc9e-b7cfad75b426

similarly we handle edge cases with policy not existing yet

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

---------

Co-authored-by: José Luis González <joseluisgj@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 0edba39)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 11, 2025
…10609)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Agentless Connectors] Integration overview panel
(#210222)](#210222)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jedr
Blaszyk","email":"jedrazb@gmail.com"},"sourceCommit":{"committedDate":"2025-02-11T15:26:04Z","message":"[Agentless
Connectors] Integration overview panel (#210222)\n\n## Summary\n\nAdd
links to relevant areas for agentless connector:\n- link integration
owning this connector\n- if policy related to this connector exist:\n -
add link to view policy\n - otherwise display `No policy found`\n- if
agent related to this policy exists \n - display agent status (e.g. is
it offline, or any other state)\n - link to fleet agent host overview\n-
create discover app link to show logs related to agent/connector
for\nthe past 6 hrs (select relevant columns :) )\n - otherwise, handle
this \n\nChanged isWaitingOnAgentlessDeployment to just check whether
`last_seen`\n(connector heartbeat field) was populated, this is to
address this\nreported
[issue](https://github.com/elastic/search-team/issues/9165).\n\n###
Happy
path\n\n\nhttps://github.com/user-attachments/assets/76db0b66-dda3-43a7-a74b-79348c7e7989\n\n###
Handling edge cases\n\n#### No agent / inactive
agent\n\n\nhttps://github.com/user-attachments/assets/eae9b8da-de24-4d77-bc9e-b7cfad75b426\n\nsimilarly
we handle edge cases with policy not existing yet\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ x [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
José Luis González <joseluisgj@gmail.com>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"0edba3919be24626dc1a395fa2b7768e84a5778c","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v9.1.0"],"title":"[Agentless
Connectors] Integration overview
panel","number":210222,"url":"https://github.com/elastic/kibana/pull/210222","mergeCommit":{"message":"[Agentless
Connectors] Integration overview panel (#210222)\n\n## Summary\n\nAdd
links to relevant areas for agentless connector:\n- link integration
owning this connector\n- if policy related to this connector exist:\n -
add link to view policy\n - otherwise display `No policy found`\n- if
agent related to this policy exists \n - display agent status (e.g. is
it offline, or any other state)\n - link to fleet agent host overview\n-
create discover app link to show logs related to agent/connector
for\nthe past 6 hrs (select relevant columns :) )\n - otherwise, handle
this \n\nChanged isWaitingOnAgentlessDeployment to just check whether
`last_seen`\n(connector heartbeat field) was populated, this is to
address this\nreported
[issue](https://github.com/elastic/search-team/issues/9165).\n\n###
Happy
path\n\n\nhttps://github.com/user-attachments/assets/76db0b66-dda3-43a7-a74b-79348c7e7989\n\n###
Handling edge cases\n\n#### No agent / inactive
agent\n\n\nhttps://github.com/user-attachments/assets/eae9b8da-de24-4d77-bc9e-b7cfad75b426\n\nsimilarly
we handle edge cases with policy not existing yet\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ x [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
José Luis González <joseluisgj@gmail.com>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"0edba3919be24626dc1a395fa2b7768e84a5778c"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210222","number":210222,"mergeCommit":{"message":"[Agentless
Connectors] Integration overview panel (#210222)\n\n## Summary\n\nAdd
links to relevant areas for agentless connector:\n- link integration
owning this connector\n- if policy related to this connector exist:\n -
add link to view policy\n - otherwise display `No policy found`\n- if
agent related to this policy exists \n - display agent status (e.g. is
it offline, or any other state)\n - link to fleet agent host overview\n-
create discover app link to show logs related to agent/connector
for\nthe past 6 hrs (select relevant columns :) )\n - otherwise, handle
this \n\nChanged isWaitingOnAgentlessDeployment to just check whether
`last_seen`\n(connector heartbeat field) was populated, this is to
address this\nreported
[issue](https://github.com/elastic/search-team/issues/9165).\n\n###
Happy
path\n\n\nhttps://github.com/user-attachments/assets/76db0b66-dda3-43a7-a74b-79348c7e7989\n\n###
Handling edge cases\n\n#### No agent / inactive
agent\n\n\nhttps://github.com/user-attachments/assets/eae9b8da-de24-4d77-bc9e-b7cfad75b426\n\nsimilarly
we handle edge cases with policy not existing yet\n\n\n###
Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers
should verify this PR satisfies this list as well.\n\n- [x] Any text
added follows [EUI's
writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\nsentence case text and includes
[i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\n-
[
]\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas
added for features that require explanation or tutorials\n- [ x [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n- [ ] If a plugin
configuration key changed, check if it needs to be\nallowlisted in the
cloud and added to the
[docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\n-
[x] This was checked for breaking HTTP API changes, and any
breaking\nchanges have been approved by the breaking-change committee.
The\n`release_note:breaking` label should be applied in these
situations.\n- [ ] [Flaky
Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\nused on any tests changed\n- [x] The PR description includes the
appropriate Release Notes section,\nand the correct `release_note:*`
label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n---------\n\nCo-authored-by:
José Luis González <joseluisgj@gmail.com>\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"0edba3919be24626dc1a395fa2b7768e84a5778c"}}]}]
BACKPORT-->

Co-authored-by: Jedr Blaszyk <jedrazb@gmail.com>
kapral18 added a commit to agusruidiazgd/kibana that referenced this pull request Feb 11, 2025
…on-206439

* main: (402 commits)
  [Search]: Fix Number type field to have correct property (elastic#210462)
  Change filter for rule monitoring gaps (elastic#209983)
  Update Logs Explorer deprecation messages (elastic#201307)
  [APM] Remove `error.id` in `getErrorGroupMainStatistics` query as it's not used (elastic#210613)
  [Embeddable] Fix presentation panel styles (elastic#210113)
  [ci] enable Scout reporter for on-merge-unsupported-ftrs (elastic#210627)
  [Fix][Synonyms UI]Add navigation link to the Detail breadcrumb. (elastic#209574)
  chore(dep): bump `store2` from `2.12.0` to `2.14.4` (elastic#210530)
  [scout] adding test helper `@kbn/scout-oblt` package and uptate onboarding tests (elastic#209761)
  [Cloud Security] Asset Inventory table flyout controls  (elastic#208452)
  [ML] Fix model deployment check in file uploader (elastic#209585)
  Updates archive again (elastic#209828)
  [Security Solution] Added concurrency limits and request throttling to prebuilt rule routes (elastic#209551)
  [Search] [Onboarding] Update search api to use EventEmitter instead of Provider (elastic#209784)
  [maps] lazy load map actions (elastic#210252)
  [Cloud Security] Adding telemetry collection condition based on render condition (elastic#208758)
  [Solution nav] Use flyout for Stack Management in Search and Observability solutions (elastic#208632)
  [Search] Fix Add Inference Endpoint API call (elastic#210243)
  [Agentless Connectors] Integration overview panel (elastic#210222)
  [Lens] Restore dynamic colouring by value for Last value agg (elastic#209110)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants