Daemonize v2 source Agent - FreeBSD

Here's a quick guide to daemonize and ensure your v2 agent starts when your FreeBSD 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 rc.d file

sudo cp /root/.sd-agent/agent/packaging/source/freebsd-agent /etc/rc.d/sd-agent

Allow execution 

sudo chmod +x /etc/rc.d/sd-agent

Disable nodaemon

sudo sed -i -e "s/nodaemon = true/nodaemon = false/" /root/.sd-agent/agent/supervisor.conf

Add rc.d configuration variable

sudo sysrc sdagent_enable="YES"

You can confirm this variable is set correctly with this command:

sysrc -v sdagent_enable

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.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.