Docker Plugin

This module keeps track of Docker instances on your machine. The module uses the Docker stats command to retrieve the statistics.

Metrics

  • Memory usage
  • Total memory
  • Network in
  • Network out
  • Disk write
  • Disk read
  • CPU usage
  • Docker container count

Dependencies

The agent360 user needs sudo access to run Docker stats. Open the /etc/sudoers file and append the following at the end of the file.

agent360 ALL=(ALL) NOPASSWD: /usr/bin/docker

This command assumes that docker exists in in /usr/bin/docker.

Configure the plugin

To enable the plugin, edit the /etc/agent360-custom.ini file and add the following lines:

[docker]
enabled = yes

Test the plugin

Run the sudo -u agent360 agent360 test docker command to see if everything is installed correctly.

dockerdocker:
{
"containers": 2,
"goofy_lewin":
{
"cpu": "0.00",
"disk_in_bytes": 0,
"disk_out_bytes": 0,
"mem_pct": "0.05",
"mem_total_bytes": 1040501964.8,
"mem_usage_bytes": 483328.0,
"net_in_bytes": 0,
"net_out_bytes": 0
},
"pensive_austin":
{
"cpu": "0.00",
"disk_in_bytes": 0,
"disk_out_bytes": 0,
"mem_pct": "0.05",
"mem_total_bytes": 1040501964.8,
"mem_usage_bytes": 483328.0,
"net_in_bytes": 0,
"net_out_bytes": 0
}
}

Now you can restart the agent with the service agent360 restart command.

Create charts

Click on the Metrics link on the top menu, and then select docker as metric type. You should see a list of available Docker containers with their statistics. Choose the servers you would like to graph and save it to your Dashboard.