Here's a quick guide to daemonize and ensure your v2 agent starts when your Linux system boots up. We assume nano is your text editor and that the sd-agent files are located at /root/.sd-agent/ in this tutorial.
Download and install the agent by following these instructions.
Copy init file
sudo cp /root/.sd-agent/agent/packaging/source/agent /etc/init.d/sd-agent
sudo sed -i -e 's|BASEDIR=$(dirname $0)|BASEDIR=/root/.sd-agent/bin|' /etc/init.d/sd-agent
sudo chmod +x /etc/init.d/sd-agent
sudo sed -i -e "s/nodaemon = true/nodaemon = false/" /root/.sd-agent/agent/supervisor.conf
Starting/stopping the agent
You can start/stop the agent using these commands:
service sd-agent start
service sd-agent stop
Use these service commands to control the agent, once started head back to your UI to see the metrics. We suggest scheduling a reboot to ensure that the sd-agent starts on boot.