Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications.Docker Monitoring extension gathers metrics from the Docker Remote API, either using Unix Socket or TCP.
GET /containers/(id)/statsis available only from Docker API version 1.17 (Docker version ~1.8) onwards. If you are using an older version, the CPU Stats, Memory Stats and Network Stats will not be available.
sudo /path/to/docker daemon -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock &
<MachineAgent_Dir>/monitors/DockerMonitorThe metricPrefix of the extension has to be configured as specified here. Please make sure that the right metricPrefix is chosen based on your machine agent deployment, otherwise this could lead to metrics not being visible in the controller.
#Needs curl v7.40+ to enable unix sockets unixSocket: commandFile: monitors/DockerMonitor/socket-command.sh
tcpSockets: Multiple TCP sockets can be added here. Each one should have a base URL and a unique display name. The metrics will be reported under this name.
#TCP sockets should be bound to docker demon. Make sure that the port is open, 2375 in this case tcpSockets: - baseUrl: http://127.0.0.1:2375 name: Server1
username[Required] A user that can login to controller ui and upload dashboard
password[Required*] Clear text password for the user to upload the dashboard. Optionally use the passwordEncrypted and encryptionKey
account[Required] the AppDynamics tenant account name
passwordEncrypted[Optional*] See the section Password Encryption Support
encryptionKey[Optional*] See the section Password Encryption Support
chmod +x MachineAgent/monitors/DockerMonitor/socket-command.sh
The extension will generate and upload the following custom dashboard to the controller. This feature requires the version 4x of Machine Agent and Controller. Please look at the dashboard section in config.yml for configuration.
Please make sure that the
customDashboard section of
config.yml is configured correctly.
Over time, you might need to update contents of the dashboard.To create a new dashboard, delete(or rename) the existing dashboard and let extension upload a new one. See troubleshooting steps 4 and 5.
The metrics will be reported under the tree
Application Infrastructure Performance|$TIER|Custom Metrics|Docker
Please refer to this screenshot to view the complete list of metrics reported by the Docker Extension.
Please visit this page to get detailed instructions on password encryption. The steps in this document will guide you through the whole process.
Workbench is an inbuilt feature provided with each extension in order to assist you to fine tune the extension setup before you actually deploy it on the controller. Please review the following document on How to use the Extensions WorkBench
/containers/id/statsto whichever one you want to test.
sudo curl -s -S -i --unix-socket /var/run/docker.sock http:/containers/$CONTAINER_ID/statsPlease update the
$CONTAINER_ID. If this API doesn't return any JSON data in the response in addition to http headers, then you will have to enable TCP sockets. Please refer to Prerequisites#3 on how to enable TCP Sockets. Then modify the
config.ymland uncomment the
tcpSocketssection accordingly. Comment out the
wget http://127.0.0.1:2375/containers/json -O - -q wget http://127.0.0.1:2375/containers/$CONTAINER_ID/stats -O - -qIf you are executing the command from different machine other than the Docker Host Machine, please update the host part of the above url
127.0.0.1to the IP of the Docker Host Machine. Also please update the port value
2375if needed. Please refer to Prerequisites#3 section for more details. Please update
-Dappdynamics.agent.maxMetrics=1000, if there is a metric limit reached error in the logs
controllerSslEnabled: true. This is applicable only to AppDynamics SAAS Environment.
falsein config.yml. This will create an xml in the logs directory. Please upload it manually through the controller ui. To debug any issues, attach it to the support ticket.
If after going through the Troubleshooting Document you have not been able to get your extension working, please file a ticket and add the following information.
Please provide the following in order for us to assist you better.
<MachineAgent>/conf/logging/log4j.xml. Change the level value of the following
<logger>elements to debug.
<MachineAgent>/monitors/ExtensionFolderYouAreHavingIssuesWithdirectory here .
For any support related questions, you can also contact firstname.lastname@example.org.
|Machine Agent Compatibility||4.0+|
Server|Component:<TIER_NAME>is no longer supported by machine agent. Have to use