-
Notifications
You must be signed in to change notification settings - Fork 181
Fix code examples in doc for running Elastic Agent unprivileged #4070
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
base: main
Are you sure you want to change the base?
Conversation
- Add note explaining --password is only required on Windows - Add tabs to display separate examples for Windows vs Linux/macOS - Correct Linux/macOS examples to use --user/--group without --password - Add sudo prefix to Linux/macOS commands - Use .exe extension for Windows examples Fixes elastic/docs-content#5298 Co-authored-by: vishaangelova <[email protected]>
|
@copilot the changes should be made to the |
- Update note to explain --user and --group are optional on Linux/macOS - Clarify that if --user is omitted, default elastic-agent-user is used - Clarify that if only --group is specified, agent runs under default user - Update example text in both install and unprivileged command tabs Co-authored-by: vishaangelova <[email protected]>
Updated in f35413c. The documentation now clarifies that on Linux/macOS, |
|
@copilot Update the two other examples in the doc ( |
- Add tabs to `elastic-agent unprivileged` and `elastic-agent privileged` commands - Add `:group: os` and `:sync:` options to synchronize tabs across page - Remove `.exe` extension from Windows examples - Remove extra clarifying text from example descriptions - Add Windows example for user+group installation Co-authored-by: vishaangelova <[email protected]>
Updated in 9cdf6d9:
|
|
@copilot update the code example in line 31-36 and use tabs to show an example command for the different operating systems. Synchronize the tabs with the rest. |
- Add synchronized tabs for Linux/macOS and Windows install commands - Add sudo prefix to Linux/macOS example (required for service installation) - Use PowerShell backtick line continuation for Windows example Co-authored-by: vishaangelova <[email protected]>
Updated in 534d8e7. Added tabs with |
Co-authored-by: vishaangelova <[email protected]>
|
@copilot Continue but with the following changes:
|
Co-authored-by: vishaangelova <[email protected]>
Fixed the note formatting in cfee58d. The text now reads: "On Windows, the |
🔍 Preview links for changed docs |
|
@blakerouse, as Eric’s on PTO this week, and I’m not sure whom to ask for a review -- could you take a look at this PR, or maybe direct me to someone else from your team? |
|
|
||
| * On Linux systems, after {{agent}} has been installed with the `--unprivileged` flag, all {{agent}} commands can be run without being the root user. | ||
|
|
||
| * The `sudo` option is still required for the `elastic-agent install` command. Only `root` can install new services. The installed service will not run as the root user. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this is indented? Seems random to me 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this was in the original text, and I hadn’t noticed it. It’s currently an unonrdered list in the unordered list, but I think it should just be a separate paragraph as part of the unordered list item.
@copilot on line 67 and 73, remove the * to format those paragraphs as new paragraphs under their respective unordered list item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the * from lines 67 and 73, formatting them as paragraphs under their respective list items in f9da888.
Vale Linting ResultsSummary: 1 suggestion found 💡 Suggestions (1)
|
- Changed lines 67 and 73 from nested bullet points (*) to regular paragraphs indented under their respective list items Co-authored-by: vishaangelova <[email protected]>
michel-laterman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Summary
Resolves #2808
The use of the
--passwordparameter in the documentation was incorrect—it's only required on Windows, not Linux/macOS. The existing examples incorrectly showed--passwordfor all platforms.Changes:
--passwordparameter is required when specifying a custom user account--userand--groupparameters are optional—if--useris omitted, the defaultelastic-agent-useris used; if only--groupis specified, the agent runs unprivileged with the requested group using the default user:group: osand:sync:options--user/--groupwithout--passwordsudoprefix to Linux/macOS commandselastic-agent install,elastic-agent unprivileged, andelastic-agent privilegedcommand examples with tabsunprivilegedmode" sectionBefore (incorrect):
After (Linux/macOS):
After (Windows, from PowerShell):
Generative AI disclosure
Tool(s) and model(s) used: GitHub Copilot (Claude)
Preview
reference/fleet/elastic-agent-unprivileged.md
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.