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

Develop Service for Wazuh Agent #127

Closed
Tracked by #126
vikman90 opened this issue Sep 11, 2024 · 1 comment · Fixed by #229
Closed
Tracked by #126

Develop Service for Wazuh Agent #127

vikman90 opened this issue Sep 11, 2024 · 1 comment · Fixed by #229
Assignees
Labels

Comments

@vikman90
Copy link
Member

vikman90 commented Sep 11, 2024

Parent Issue:

Description

This issue focuses on creating a background service for the new Wazuh agent across the supported platforms: Linux, Windows, and macOS. The service must ensure that the agent starts automatically on boot, runs in the background, and provides administrators with basic control options (start, stop, restart).

Functional Requirements

  • Linux: Develop a systemd service for the agent, ensuring it integrates with systemd for all supported distributions.
  • Windows: Implement the agent as a Windows Service, ensuring it operates correctly on Windows Server 2008 R2+.
  • macOS: Develop a launch daemon for macOS 14+ to manage the agent as a background service.

Subtasks

  1. Create Systemd Service for Linux #130
    • Create a systemd unit file for the Wazuh agent.
    • Handle service installation, enabling, and management (start/stop/restart).
    • Ensure proper logging for service lifecycle events.
  2. Implement Windows Service for Wazuh Agent #131
    • Implement the Wazuh agent as a Windows Service.
    • Ensure service management (start/stop) works as expected via Windows Service Manager.
    • Handle automatic startup on boot.
  3. Develop Launch Daemon for macOS #132
    • Develop a launch daemon configuration for macOS.
    • Implement logic to handle startup, stop, and restart of the agent.
    • Test functionality with launchctl to ensure seamless background operation.
  4. Documentation:
    • Document service installation and management commands for each platform.
@aritosteles
Copy link
Contributor

Update

  • 2024/10/17:
    Systemd issue takes precedence over Windows and macOs issues in preparation for MVP presentation. Last minute requests and adjustments.
    • New command line parameter --config-path added to wazuh-agent.
    • ConfigurationParser class modified to take a path to the configuration file in the constructor.
    • Agent class modified to take path to configuration file in constructor and pass it along to the configuration parser.
    • UnixDaemon class back to handling PID files and taking care of checking for previous instances and stopping the agent process.
    • Rebased to master and PR up for review and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants