Deploying Onagre Agent as a Linux Service
Overview
The Onagre Agent can be deployed as a Linux system service, enabling it to run persistently in the background. This method ensures the agent starts automatically at boot and remains active for continuous monitoring.
Downloading the Agent
The Onagre Agent is available for multiple Linux architectures. Use the appropriate command for your system to download and install the agent:
Creating the Systemd Service
To run the Onagre Agent as a persistent service, create a new systemd service file:
Copy the following service definition, replacing
[Unit]
Description=Onagre Agent
After=network.target
[Service]
LimitNOFILE=65535
Environment=TOKEN=<YOUR_TOKEN>
ExecStart=/usr/local/bin/agent
RestartSec=5
Restart=always
User=root
[Install]
WantedBy=multi-user.target
Applying the Service Configuration
Once the service file is created, reload the systemd daemon to recognize the new service:
Enable the service to start automatically at boot:
Start the Onagre Agent service:
After a few seconds, the agent should be active:

Updating the Onagre Agent
To update the agent, stop the service, download the latest version, and restart it:
Managing the Agent Service
Checking Service Status
To check if the Onagre Agent is running:
Restarting the Agent
To restart the agent manually:
Stopping and Disabling the Agent
To stop the agent:
To disable it from starting at boot:Summary
Deploying the Onagre Agent as a Linux systemd service ensures continuous monitoring and automatic startup. This method provides stability, persistence, and easy management for monitoring infrastructure resources.