docker data collector › ... › task_config_telegraf_docker.pdfdocker data collector cloud...

12
Docker Data Collector Cloud Insights Tony Lavoie, Dave Grace March 24, 2020 This PDF was generated from https://docs.netapp.com/us-en/cloudinsights/task_config_telegraf_docker.html on July 23, 2020. Always check docs.netapp.com for the latest.

Upload: others

Post on 04-Jul-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Docker Data CollectorCloud InsightsTony Lavoie, Dave GraceMarch 24, 2020

This PDF was generated from https://docs.netapp.com/us-en/cloudinsights/task_config_telegraf_docker.html on July23, 2020. Always check docs.netapp.com for the latest.

Page 2: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Table of ContentsDocker Data Collector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  1

Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  1

Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2

Objects and Counters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  3

Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  9

Page 3: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Docker Data CollectorCloud Insights uses this data collector to gather metrics from Docker.

This topic is considered Preview documentation and is subject to change.

Installation1. From Admin > Data Collectors, click +Data Collector. Under Services, choose Docker.

If you haven’t configured an Agent for collection, you are prompted to install an agent in yourenvironment.

If you have an agent already configured, select the appropriate Operating System or Platform andclick Continue.

2. Follow the instructions in the Docker Configuration screen to configure the data collector. Theinstructions vary depending on the type of Operating System or Platform you are using to collectdata.

Page 4: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

SetupThe Telegraf input plugin for Docker collects metrics through a specified UNIX socket or a TCPendpoint.

Compatibility

Configuration was developed against Docker version 1.12.6.

Setting Up

Page 5: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Accessing Docker through a UNIX socket

If the Telegraf agent is running on baremetal, add the telegraf Unix user to the docker Unix group byrunning the following:

sudo usermod -aG docker telegraf

If the Telegraf agent is running within a Kubernetes pod, expose the Docker Unix socket by mappingthe socket into the pod as a volume and then mounting that volume to /var/run/docker.sock. Forexample, add the following to the PodSpec:

volumes:...- name: docker-sockhostPath:path: /var/run/docker.socktype: File

Then, add the following to the Container:

volumeMounts:...- name: docker-sockmountPath: /var/run/docker.sock

Note that the Cloud Insights installer provided for the Kubernetes platform takes care of this mappingautomatically.

Access Docker through a TCP endpoint

By default, Docker uses port 2375 for unencrypted access and port 2376 for encrypted access.

Objects and CountersThe following objects and their counters are collected:

Page 6: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Object: Identifiers: Attributes: Datapoints:

Docker Engine NamespaceDocker Engine

Node NameNode IPNode UUIDNode OSKubernetes ClusterDocker VersionUnit

MemoryContainersContainers PausedContainers RunningContainers StoppedCPUsGo RoutinesImagesListener EventsUsed File DescriptorsData AvailableData TotalData UsedMetadata AvailableMetadata TotalMetadata UsedPool Blocksize

Page 7: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Object: Identifiers: Attributes: Datapoints:

Docker Container NamespaceContainer NameDocker Engine

Kubernetes ContainerHashKubernetes ContainerPortsKubernetes ContainerRestart CountKubernetes ContainerTermination MessagePathKubernetes ContainerTermination MessagePolicyKubernetes PodTermination GracePeriodContainer ImageContainer StatusContainer VersionNode NameKubernetes ContainerLog PathKubernetes ContainerNameKubernetes Docker TypeKubernetes Pod NameKubernetes PodNamespaceKubernetes Pod UIDKubernetes Sandbox IDNode IPNode UUIDDocker VersionKubernetes IO ConfigSeenKubernetes IO ConfigSourceOpenShift IO SCCKubernetes DescriptionKubernetes DisplayNameOpenShift TagsKompose ServicePod Template HashController Revision

Memory ActiveAnonymousMemory Active FileMemory CacheMemory HierarchicalLimitMemory InactiveAnonymousMemory Inactive FileMemory LimitMemory Mapped FileMemory Max UsageMemory Page FaultMemory Page MajorFaultMemory Paged InMemory Paged OutMemory Resident SetSizeMemory Resident SetSize HugeMemory Total ActiveAnonymousMemory Total ActiveFileMemory Total CacheMemory Total InactiveAnonymousMemory Total InactiveFileMemory Total MappedFileMemory Total PageFaultMemory Total PageMajor FaultMemory Total Paged InMemory Total Paged OutMemory Total ResidentSet SizeMemory Total ResidentSet Size HugeMemory TotalUnevictable

Page 8: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Object: Identifiers: Attributes: Datapoints:

Docker Container BlockIO

NamespaceContainer NameDeviceDocker Engine

Kubernetes ContainerHashKubernetes ContainerPortsKubernetes ContainerRestart CountKubernetes ContainerTermination MessagePathKubernetes ContainerTermination MessagePolicyKubernetes PodTermination GracePeriodContainer ImageContainer StatusContainer VersionNode NameKubernetes ContainerLog PathKubernetes ContainerNameKubernetes Docker TypeKubernetes Pod NameKubernetes PodNamespaceKubernetes Pod UIDKubernetes Sandbox IDNode IPNode UUIDDocker VersionKubernetes Config SeenKubernetes ConfigSourceOpenShift SCCKubernetes DescriptionKubernetes DisplayNameOpenShift TagsSchema Schema VersionPod Template HashController RevisionHash

IO Service BytesRecursive AsyncIO Service BytesRecursive ReadIO Service BytesRecursive SyncIO Service BytesRecursive TotalIO Service BytesRecursive WriteIO Serviced RecursiveAsyncIO Serviced RecursiveReadIO Serviced RecursiveSyncIO Serviced RecursiveTotalIO Serviced RecursiveWrite

Page 9: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Object: Identifiers: Attributes: Datapoints:

Docker ContainerNetwork

NamespaceContainer NameNetworkDocker Engine

Container ImageContainer StatusContainer VersionNode NameNode IPNode UUIDNode OSK8s ClusterDocker VersionContainer ID

RX DroppedRX BytesRX ErrorsRX PacketsTX DroppedTX BytesTX ErrorsTX Packets

Page 10: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Object: Identifiers: Attributes: Datapoints:

Docker Container CPU NamespaceContainer NameCPUDocker Engine

Kubernetes ContainerHashKubernetes ContainerPortsKubernetes ContainerRestart CountKubernetes ContainerTermination MessagePathKubernetes ContainerTermination MessagePolicyKubernetes PodTermination GracePeriodKubernetes Config SeenKubernetes ConfigSourceOpenShift SCCContainer ImageContainer StatusContainer VersionNode NameKubernetes ContainerLog PathKubernetes ContainernameKubernetes Docker TypeKubernetes Pod NameKubernetes PodNamespaceKubernetes Pod UIDKubernetes Sandbox IDNode IPNode UUIDNode OSKubernetes ClusterDocker VersionKubernetes DescriptionKubernetes DisplayNameOpenShift TagsSchema VersionPod Template Hash

Throttling PeriodsThrottling ThrottledPeriodsThrottling ThrottledTimeUsage In Kernel ModeUsage In User ModeUsage PercentUsage SystemUsage Total

Page 11: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Troubleshooting

Problem: Try this:

I do not see my Docker metrics in Cloud Insightsafter following the instructions on theconfiguration page.

Check the Telegraf agent logs to see if it reportsthe following error:

E! Error in plugin [inputs.docker]: Got permissiondenied while trying to connect to the Dockerdaemon socket

If it does, take the necessary steps to provide theTelegraf agent access to the Docker Unix socket asspecified above.

Additional information may be found from the Support page.

Page 12: Docker Data Collector › ... › task_config_telegraf_docker.pdfDocker Data Collector Cloud Insights uses this data collector to gather metrics from Docker. This topic is considered

Copyright Information

Copyright © 2020 NetApp, Inc. All rights reserved. Printed in the U.S. No part of this documentcovered by copyright may be reproduced in any form or by any means-graphic, electronic, ormechanical, including photocopying, recording, taping, or storage in an electronic retrieval system-without prior written permission of the copyright owner.

Software derived from copyrighted NetApp material is subject to the following license and disclaimer:

THIS SOFTWARE IS PROVIDED BY NETAPP “AS IS” AND WITHOUT ANY EXPRESS OR IMPLIEDWARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OFMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WHICH ARE HEREBYDISCLAIMED. IN NO EVENT SHALL NETAPP BE LIABLE FOR ANY DIRECT, INDIRECT,INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOTLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ORPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OFLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OROTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OFTHE POSSIBILITY OF SUCH DAMAGE.

NetApp reserves the right to change any products described herein at any time, and without notice.NetApp assumes no responsibility or liability arising from the use of products described herein,except as expressly agreed to in writing by NetApp. The use or purchase of this product does notconvey a license under any patent rights, trademark rights, or any other intellectual propertyrights of NetApp.

The product described in this manual may be protected by one or more U.S. patents,foreign patents, or pending applications.

RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the government is subject torestrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data andComputer Software clause at DFARS 252.277-7103 (October 1988) and FAR 52-227-19 (June 1987).

Trademark Information

NETAPP, the NETAPP logo, and the marks listed at http://www.netapp.com/TM are trademarks ofNetApp, Inc. Other company and product names may be trademarks of their respective owners.