The command runs a container named netuitive-agent
in the background and publishes the port values to the host. It then sets the environment variable DOCKER_HOSTNAME
and APIKEY
to the described values. Lastly, a volume is mounted so the agent has access to the Docker API.
You can also copy the line below and paste it into your command line. Ensure you replace <my-api-key>
with your API key from CloudWisdom and <my-docker-host>
with the desired hostname. Additional environment variables are located in the drop-down below if you’d like to include more or edit existing ones.
docker run -d -p 8125:8125/udp --name netuitive-agent -e DOCKER_HOSTNAME="<my-docker-host>" -e APIKEY="<my-api-key>" -v /proc:/host_proc:ro -v /var/run/docker.sock:/var/run/docker.sock:ro netuitive/docker-agent
Variable | Description | Example |
---|---|---|
LOGLEVEL | Changes the log level of the agent. | -e LOGLEVEL=DEBUG would set the agent tolog at DEBUG level. |
INTERVAL | Sets the interval in seconds at which the agent collectors run. | -e INTERVAL=120 would set collection attwo-minute intervals. |
DOCKER_HOSTNAME | Sets the host name of the docker host. | -e DOCKER_HOSTNAME="my-docker-host" would set the host name to my-docker-host. |
APIKEY | Sets the API key used send data to CloudWisdom. | -e APIKEY=myapikey would set the API keyto myapikey. |
USE_LOCAL_CONFIG | Tells the agent to ignore any environment variables set and to usea local config file. | -e USE_LOCAL_CONFIG=true would enable this feature. |
LPRT | Tells the Netuitive StatsD agent whatUDP port to listen on. 8125 is the default. | |
FORWARD | Enables forwarding from the netuitive-statsd server to anotherStatsD server. |
|
FIP | Tells the Netuitive StatsD agent what IP address to forward to. | |
FPRT | Tells the Netuitive StatsD agent what port to forward to. 8125 isthe default |
Paste the command from 1.3 into your command line. Replace my-docker-host in the command with the name of the docker host. The command will install the agent and add your account’s unique API key to the configuration file.
- Optional: Navigate to the Linux agent configuration file at /opt/netuitive-agent/conf/netuitive-agent.conf
and add a metrics blacklist or whitelist under the [[NetuitiveDockerCollector]]
section to reduce the number of metrics you receive.
. * /
using a /
. The following would match containers.*.blkio.
metrics and exclude them from collection.metrics_blacklist = containers\..*\.blkio\..*
abcdef123456
, 123456abcdef
, ghijkl789012
.metrics_blacklist = containers\.(abcdef123456|123456abcdef|ghijkl789012)\..*