Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fleet] Add a setting inside Agent Policy for FQDN #149059

Closed
jlind23 opened this issue Jan 17, 2023 · 11 comments · Fixed by #150239
Closed

[Fleet] Add a setting inside Agent Policy for FQDN #149059

jlind23 opened this issue Jan 17, 2023 · 11 comments · Fixed by #150239
Assignees
Labels
Team:Fleet Team label for Observability Data Collection Fleet team

Comments

@jlind23
Copy link
Contributor

jlind23 commented Jan 17, 2023

FQDN will soon be added to Beats and Elastic Agent as an opt-in option. (By default they will send the same data as before)

The new configuration will be a feature flag as described on elastic/elastic-agent#2185. It'll be:

Feature flag generic config:

agent:
  features:
    feature_1:
      enabled:
      config1:
      config2:
      ...
      configN:
    feature_2:
      enabled:
      config1:
      config2:
      ...
      configN:
    ...
    feature_N:
      enabled:
      config1:
      config2:
      ...
      configN:

Feature flag for FQDN:

agent.features.fqdn.enabled: true|false

Related issues:

@jlind23 jlind23 added the Team:Fleet Team label for Observability Data Collection Fleet team label Jan 17, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@jlind23
Copy link
Contributor Author

jlind23 commented Jan 17, 2023

@dborodyansky @nimarezainia can I please have your eyes on this in order to have a proper design?

@dborodyansky
Copy link
Contributor

Based on discussion, design mockup suggestion below. Rationale for using radio buttons instead of a switch is to show clarity of choice and contextual examples.

A few questions to consider:

  • Is "Domain Name Format" an appropriate title?
  • What is the default setting? (It should be listed first and selected by default.)
  • Is "Hostname" a proper definition of "not FQDN"?
  • Are there better examples than what is shown?
  • Will we have docs to link to?

image

@kpollich
Copy link
Member

Thanks a ton @dborodyansky - I'll answer your questions below as best I can.

Is "Domain Name Format" an appropriate title?

I think "Host name format" makes more sense.

What is the default setting? (It should be listed first and selected by default.)

Default will be Hostname - this aligns with the current behavior. FQDN is a special case opt-in. So Hostname should be first and selected by default.

Is "Hostname" a proper definition of "not FQDN"?

Yes this seems fine to me. See https://en.wikipedia.org/wiki/Hostname. We use this term because it aligns with the standard command line tool or system naming, e.g.

image

Are there better examples than what is shown?

Yes, probably. @nimarezainia do you have any examples from customer requests for this functionality that could be shared privately and inform better example values? I do think it'd be good to have the Hostname and FQDN values correlate, e.g.

# Hostname
My-Laptop

# FQDN
My-Laptop.acme.co

Will we have docs to link to?

I think we should. It'd be good to at least get a small paragraph about when someone might want to use each option. For example, in a highly-virtualized setting with many observed Docker containers, FQDN values are likely useless. In the employee laptop use case, though, FQDN is likely helpful to differentiate between many machines with the same or similar hostnames like Admins-Macbook-Pro.

@dborodyansky
Copy link
Contributor

Thank you for the clarification @kpollich. Design updated and below:

image

@AndersonQ
Copy link
Member

hey folks, I updated the issue with the new opt-in config and the related Elastic Agent issue.

hop-dev added a commit that referenced this issue Feb 7, 2023
## Summary

Closes #149059 

Adds the `agent_features` agent policy field which is an array of
feature flags + other arbitrary config values. As part of this allow the
FQDN feature to be configured in the agent policy settings.

<img width="1049" alt="Screenshot 2023-02-02 at 23 59 17"
src="https://user-images.githubusercontent.com/3315046/216478081-c6316798-bcc6-422a-85b1-fa5d717a229d.png">
hop-dev added a commit that referenced this issue Feb 7, 2023
Part of #149059 

Add a feature flag which will remove the hostname toggle from the UI if
we need to remove it at the last minute (e.g the agent work doesn't make
it into 8.7)
@jlind23
Copy link
Contributor Author

jlind23 commented Feb 9, 2023

@hop-dev @jen-huang @kpollich Can we add a "beta" disclaimer in the UI as APM and potentially others will not be ready for 8.8 and that the values might differ from a component to another?
cc @joshdover

@hop-dev
Copy link
Contributor

hop-dev commented Feb 9, 2023

@jlind23 this is easy enough, it would be easier if we knew exactly which integrations don't support it for the tooltip text.

I also think we should add something like the text underlined in green.

Screenshot 2023-02-09 at 16 39 38

@jen-huang
Copy link
Contributor

@hop-dev Let's leave out the tooltip and just have the Beta badge - that is more consistent with how we handle our beta messaging in other parts of the UI.

@nimarezainia, WDYT about calling out the supported agent version? We do have precedent of a similar copy when we deprecated unenrollment timeout, but I'm not sure if that's the right long-term approach:

image

@hop-dev
Copy link
Contributor

hop-dev commented Feb 10, 2023

Maybe we should have a doc link as Dmitry originally intended and we can lay out the exact behaviour of the feature once we know? I originally omitted it due to time constraints
Screenshot 2023-02-10 at 10 28 48

I'll add the beta badge for now

hop-dev added a commit that referenced this issue Feb 10, 2023
)

Add a beta badge to the host name format agent policy setting. As asked
here
#149059 (comment)

I have changed ther deprecated badge to be rounded too as it looked
really odd having two different types of badge next to each other. I
have used accent color on the beta badge too to differentiate it from
the deprecated badge.

### Before
<img width="850" alt="Screenshot 2023-02-10 at 11 05 36"
src="https://user-images.githubusercontent.com/3315046/218077728-f5ea600b-d0ae-4284-bc90-4e323646f44d.png">


### After
<img width="942" alt="Screenshot 2023-02-10 at 11 05 13"
src="https://user-images.githubusercontent.com/3315046/218077762-f90b7a76-b5f7-483f-8118-751c345bbc67.png">

---------

Co-authored-by: kibanamachine <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Feb 10, 2023
…tic#150855)

Add a beta badge to the host name format agent policy setting. As asked
here
elastic#149059 (comment)

I have changed ther deprecated badge to be rounded too as it looked
really odd having two different types of badge next to each other. I
have used accent color on the beta badge too to differentiate it from
the deprecated badge.

### Before
<img width="850" alt="Screenshot 2023-02-10 at 11 05 36"
src="https://user-images.githubusercontent.com/3315046/218077728-f5ea600b-d0ae-4284-bc90-4e323646f44d.png">

### After
<img width="942" alt="Screenshot 2023-02-10 at 11 05 13"
src="https://user-images.githubusercontent.com/3315046/218077762-f90b7a76-b5f7-483f-8118-751c345bbc67.png">

---------

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit a237aa4)
kibanamachine added a commit that referenced this issue Feb 10, 2023
…#150855) (#150876)

# Backport

This will backport the following commits from `main` to `8.7`:
- [[Fleet] Add beta badge to host name format agent policy setting
(#150855)](#150855)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Mark
Hopkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-02-10T13:18:22Z","message":"[Fleet]
Add beta badge to host name format agent policy setting (#150855)\n\nAdd
a beta badge to the host name format agent policy setting. As
asked\r\nhere\r\nhttps://github.com//issues/149059#issuecomment-1424490013\r\n\r\nI
have changed ther deprecated badge to be rounded too as it
looked\r\nreally odd having two different types of badge next to each
other. I\r\nhave used accent color on the beta badge too to
differentiate it from\r\nthe deprecated badge.\r\n\r\n### Before\r\n<img
width=\"850\" alt=\"Screenshot 2023-02-10 at 11 05
36\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/218077728-f5ea600b-d0ae-4284-bc90-4e323646f44d.png\">\r\n\r\n\r\n###
After\r\n<img width=\"942\" alt=\"Screenshot 2023-02-10 at 11 05
13\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/218077762-f90b7a76-b5f7-483f-8118-751c345bbc67.png\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"a237aa49623071f5c76b5181de9f1c11cccbc291","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.7.0","v8.8.0"],"number":150855,"url":"https://github.com/elastic/kibana/pull/150855","mergeCommit":{"message":"[Fleet]
Add beta badge to host name format agent policy setting (#150855)\n\nAdd
a beta badge to the host name format agent policy setting. As
asked\r\nhere\r\nhttps://github.com//issues/149059#issuecomment-1424490013\r\n\r\nI
have changed ther deprecated badge to be rounded too as it
looked\r\nreally odd having two different types of badge next to each
other. I\r\nhave used accent color on the beta badge too to
differentiate it from\r\nthe deprecated badge.\r\n\r\n### Before\r\n<img
width=\"850\" alt=\"Screenshot 2023-02-10 at 11 05
36\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/218077728-f5ea600b-d0ae-4284-bc90-4e323646f44d.png\">\r\n\r\n\r\n###
After\r\n<img width=\"942\" alt=\"Screenshot 2023-02-10 at 11 05
13\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/218077762-f90b7a76-b5f7-483f-8118-751c345bbc67.png\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"a237aa49623071f5c76b5181de9f1c11cccbc291"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150855","number":150855,"mergeCommit":{"message":"[Fleet]
Add beta badge to host name format agent policy setting (#150855)\n\nAdd
a beta badge to the host name format agent policy setting. As
asked\r\nhere\r\nhttps://github.com//issues/149059#issuecomment-1424490013\r\n\r\nI
have changed ther deprecated badge to be rounded too as it
looked\r\nreally odd having two different types of badge next to each
other. I\r\nhave used accent color on the beta badge too to
differentiate it from\r\nthe deprecated badge.\r\n\r\n### Before\r\n<img
width=\"850\" alt=\"Screenshot 2023-02-10 at 11 05
36\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/218077728-f5ea600b-d0ae-4284-bc90-4e323646f44d.png\">\r\n\r\n\r\n###
After\r\n<img width=\"942\" alt=\"Screenshot 2023-02-10 at 11 05
13\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/218077762-f90b7a76-b5f7-483f-8118-751c345bbc67.png\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>","sha":"a237aa49623071f5c76b5181de9f1c11cccbc291"}}]}]
BACKPORT-->

Co-authored-by: Mark Hopkin <[email protected]>
@nimarezainia
Copy link
Contributor

@hop-dev I like suggestion from @jen-huang - helps being as descriptive as possible i the product itself. We certainly can point the user to docs for full coverage of the feature. but in cases where we have lack of support (or mish mash of support) it's best to modify the copy and be explicit.

hop-dev added a commit that referenced this issue Mar 2, 2023
## Summary

Hide the FQDN selector unless experimental feature is enabled. This
selector was added as part of
#149059

### Before:
<img width="1073" alt="Screenshot 2023-03-02 at 16 15 39"
src="https://user-images.githubusercontent.com/3315046/222487164-75024608-b0f1-419d-bbb0-299bad55cae1.png">

### After:
<img width="1112" alt="Screenshot 2023-03-02 at 16 14 52"
src="https://user-images.githubusercontent.com/3315046/222487206-c58f76eb-6977-4d3a-908d-3b72b0f901fa.png">

Co-authored-by: Kibana Machine <[email protected]>
hop-dev added a commit to hop-dev/kibana that referenced this issue Mar 6, 2023
## Summary

Hide the FQDN selector unless experimental feature is enabled. This
selector was added as part of
elastic#149059

### Before:
<img width="1073" alt="Screenshot 2023-03-02 at 16 15 39"
src="https://user-images.githubusercontent.com/3315046/222487164-75024608-b0f1-419d-bbb0-299bad55cae1.png">

### After:
<img width="1112" alt="Screenshot 2023-03-02 at 16 14 52"
src="https://user-images.githubusercontent.com/3315046/222487206-c58f76eb-6977-4d3a-908d-3b72b0f901fa.png">

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit de482cb)

# Conflicts:
#	x-pack/plugins/fleet/common/experimental_features.ts
hop-dev added a commit that referenced this issue Mar 6, 2023
# Backport

This will backport the following commits from `main` to `8.7`:
- [[Fleet] Disable FQDN selector by default
(#152592)](#152592)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Mark
Hopkin","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-03-02T17:28:11Z","message":"[Fleet]
Disable FQDN selector by default (#152592)\n\n## Summary\r\n\r\nHide the
FQDN selector unless experimental feature is enabled. This\r\nselector
was added as part
of\r\nhttps://github.com//issues/149059\r\n\r\n###
Before:\r\n<img width=\"1073\" alt=\"Screenshot 2023-03-02 at 16 15
39\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/222487164-75024608-b0f1-419d-bbb0-299bad55cae1.png\">\r\n\r\n###
After:\r\n<img width=\"1112\" alt=\"Screenshot 2023-03-02 at 16 14
52\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/222487206-c58f76eb-6977-4d3a-908d-3b72b0f901fa.png\">\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"de482cbc9ebce0f6d424e90b3e98cffd9979e707","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.7.0","v8.8.0"],"number":152592,"url":"https://github.com/elastic/kibana/pull/152592","mergeCommit":{"message":"[Fleet]
Disable FQDN selector by default (#152592)\n\n## Summary\r\n\r\nHide the
FQDN selector unless experimental feature is enabled. This\r\nselector
was added as part
of\r\nhttps://github.com//issues/149059\r\n\r\n###
Before:\r\n<img width=\"1073\" alt=\"Screenshot 2023-03-02 at 16 15
39\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/222487164-75024608-b0f1-419d-bbb0-299bad55cae1.png\">\r\n\r\n###
After:\r\n<img width=\"1112\" alt=\"Screenshot 2023-03-02 at 16 14
52\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/222487206-c58f76eb-6977-4d3a-908d-3b72b0f901fa.png\">\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"de482cbc9ebce0f6d424e90b3e98cffd9979e707"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152592","number":152592,"mergeCommit":{"message":"[Fleet]
Disable FQDN selector by default (#152592)\n\n## Summary\r\n\r\nHide the
FQDN selector unless experimental feature is enabled. This\r\nselector
was added as part
of\r\nhttps://github.com//issues/149059\r\n\r\n###
Before:\r\n<img width=\"1073\" alt=\"Screenshot 2023-03-02 at 16 15
39\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/222487164-75024608-b0f1-419d-bbb0-299bad55cae1.png\">\r\n\r\n###
After:\r\n<img width=\"1112\" alt=\"Screenshot 2023-03-02 at 16 14
52\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/222487206-c58f76eb-6977-4d3a-908d-3b72b0f901fa.png\">\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"de482cbc9ebce0f6d424e90b3e98cffd9979e707"}}]}]
BACKPORT-->
bmorelli25 pushed a commit to bmorelli25/kibana that referenced this issue Mar 10, 2023
## Summary

Hide the FQDN selector unless experimental feature is enabled. This
selector was added as part of
elastic#149059

### Before:
<img width="1073" alt="Screenshot 2023-03-02 at 16 15 39"
src="https://user-images.githubusercontent.com/3315046/222487164-75024608-b0f1-419d-bbb0-299bad55cae1.png">

### After:
<img width="1112" alt="Screenshot 2023-03-02 at 16 14 52"
src="https://user-images.githubusercontent.com/3315046/222487206-c58f76eb-6977-4d3a-908d-3b72b0f901fa.png">

Co-authored-by: Kibana Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants