-
Notifications
You must be signed in to change notification settings - Fork 56
Rename Windows agent service #705
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
Conversation
Results and EvidenceRunning wazuh-agent from sources 🟢1. Agent enrollment 🟢PS C:\Users\vagrant\source\repos\wazuh-agent\build\Debug> .\wazuh-agent.exe --enroll --enroll-url https://192.168.56.132:55000 --user wazuh --password topsecret --name dummy
Starting wazuh-agent enrollment
wazuh-agent enrolled 2. Install service 🟢PS C:\Users\vagrant\source\repos\wazuh-agent\build\Debug> .\wazuh-agent --install-service Agent log
3. Check service name 🟢PS C:\Users\vagrant\source\repos\wazuh-agent\build\Debug> Get-Service | Where-Object { $_.DisplayName -like "*wazuh*" }
Status Name DisplayName
------ ---- -----------
Stopped wazuh-agent wazuh-agent 4. Start service 🟢PS C:\Users\vagrant\source\repos\wazuh-agent\build\Debug> Start-Service -Name "wazuh-agent" Agent log
5. Restart service 🟢PS C:\Users\vagrant\source\repos\wazuh-agent\build\Debug> Restart-Service -Name "wazuh-agent" Agent log
6. Stop service 🟢PS C:\Users\vagrant\source\repos\wazuh-agent\build\Debug> Stop-Service -Name "wazuh-agent" Agent log
7. Remove service 🟢PS C:\Users\vagrant\source\repos\wazuh-agent\build\Debug> .\wazuh-agent --remove-service Agent log
Installing wazuh-agent from packages 🟡1. Install package 🟢Package: wazuh-agent_5.0.0-0_windows_449b667 PS C:\Users\vagrant> .\wazuh-agent_5.0.0-0_windows_449b667.msi /q
PS C:\Users\vagrant> Logs
2. Check service name 🟢PS C:\Users\vagrant> Get-Service | Where-Object { $_.DisplayName -like "*wazuh*" }
Status Name DisplayName
------ ---- -----------
Stopped wazuh-agent wazuh-agent 3. Agent enrollment 🟢PS C:\Program Files\wazuh-agent> .\wazuh-agent.exe --enroll --enroll-url https://192.168.56.132:55000 --user wazuh --password topsecret --name dummy
Starting wazuh-agent enrollment
wazuh-agent enrolled 4. Start service 🟢PS C:\Users\vagrant> Start-Service -Name "wazuh-agent" Agent Log
5. Restart service 🟢PS C:\Users\vagrant> Restart-Service -Name "wazuh-agent" Agent Log
6. Stop service 🟢PS C:\Users\vagrant> Stop-Service -Name "wazuh-agent" Agent Log
7. Uninstall package 🟢
PS C:\Users\vagrant> msiexec /x wazuh-agent_5.0.0-0_windows_449b667.msi /l*v uninstall.log Logs
Logs
|
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.
Pull Request Overview
This PR renames the Windows agent service from "Wazuh Agent" to "wazuh-agent" to ensure consistency across platforms. The key changes include updates in documentation commands for starting and stopping the service.
Reviewed Changes
Copilot reviewed 2 out of 9 changed files in this pull request and generated no comments.
File | Description |
---|---|
docs/ref/backup-restore.md | Updates service commands for stopping and starting the service |
docs/dev/run-agent.md | Updates service commands for starting and stopping the service |
Files not reviewed (7)
- packages/windows/cleanup.ps1: Language not supported
- packages/windows/postinstall.ps1: Language not supported
- src/agent/restart_handler/src/restart_handler.cpp: Language not supported
- src/agent/restart_handler/src/restart_handler_win.cpp: Language not supported
- src/agent/src/windows/windows_service.cpp: Language not supported
- src/agent/src/windows/windows_service.hpp: Language not supported
- src/agent/tests/windows/windows_service_test.cpp: Language not supported
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
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.
The executed examples are correct, I do not see the restart test, is it possible to generate it? the file restart_handler_win.cpp is modified, and contains the Restart-Service command.
449b667
to
8cd9e10
Compare
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
- Code changes reviewed
- Relevant evidence provided
- Developer documentation reflects the changes
- Meets requirements and/or definition of done
- No unresolved dependencies with other issues
Description
Closes #691
The Windows agent service is currently named "Wazuh Agent". This PR renames it to "wazuh-agent" to maintain consistency across all platforms.
Proposed Changes
The service name is updated in:
windows_service.cpp
).Documentation Updates
Review Checklist