Monitoring Docker
eBook - ePub

Monitoring Docker

  1. 148 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Monitoring Docker

About this book

Monitor your Docker containers and their apps using various native and third-party tools with the help of this exclusive guide!

About This Book

  • Get the only book that covers multiple methods to monitoring Docker Containers -your one-stop solution to all your Docker monitoring needs
  • Learn how to implement third-party tools such as Datalog, cAdvisor, and more with this example-rich, hands-on guide
  • Learn how to efficiently monitor Docker containers and get an edge over other administrators while maintaining apps on these containers

Who This Book Is For

This book is for DevOps engineers and system administrators who manage Docker containers and want to better manage these containers using expert techniques and methods and better maintain applications built on Docker.

What You Will Learn

  • Discover the tools built into Docker to gain an insight into your containers' performance
  • Augment Docker's built-in tools with modern tools such as cAdvisor from Google, SysDig by Draios, and Soundcloud's Prometheus
  • Integrate the monitoring of your containers with more traditional monitoring solutions such as Zabbix
  • Take advantage of the various SaaS offerings from third parties to move monitoring away from your local infrastructure and into the cloud
  • Discover the various ways to ship your applications' logs from the container to a central logging service
  • Get the most out of your application and resources with the right implementation of your monitoring method

In Detail

This book will show you how monitoring containers and keeping a keen eye on the working of applications helps improve the overall performance of the applications that run on Docker. With the increased adoption of Docker containers, the need to monitor which containers are running, what resources they are consuming, and how these factors affect the overall performance of the system has become the need of the moment.

This book covers monitoring containers using Docker's native monitoring functions, various plugins, as well as third-party tools that help in monitoring. Well start with how to obtain detailed stats for active containers, resources consumed, and container behavior. We also show you how to use these stats to improve the overall performance of the system. Next, you will learn how to use SysDig to both view your containers performance metrics in real time and record sessions to query later. By the end of this book, you will have a complete knowledge of how to implement monitoring for your containerized applications and make the most of the metrics you are collecting

Style and approach

This is an easy-to-follow guide with plenty of hands-on examples that can be executed both on your local machine and externally hosted services.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Monitoring Docker


Table of Contents

Monitoring Docker
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Introduction to Docker Monitoring
Pets, Cattle, Chickens, and Snowflakes
Pets
Cattle
Chickens
Snowflakes
So what does this all mean?
Docker
Launching a local environment
Cloning the environment
Running a virtual server
Halting the virtual server
Summary
2. Using the Built-in Tools
Docker stats
Running Docker stats
What just happened?
What about processes?
Docker top
Docker exec
Summary
3. Advanced Container Resource Analysis
What is cAdvisor?
Running cAdvisor using a container
Compiling cAdvisor from source
Collecting metrics
The Web interface
Overview
Processes
CPU
Memory
Network
Filesystem
Viewing container stats
Subcontainers
Driver status
Images
This is all great, what's the catch?
Prometheus
Launching Prometheus
Querying Prometheus
Dashboard
The next steps
Alternatives?
Summary
4. A Traditional Approach to Monitoring Containers
Zabbix
Installing Zabbix
Using containers
Using vagrant
Preparing our host machine
The Zabbix web interface
Docker metrics
Create custom graphs
Compare containers to your host machine
Triggers
Summary
5. Querying with Sysdig
What is Sysdig?
Installing Sysdig
Using Sysdig
The basics
Capturing data
Containers
Further reading
Using Csysdig
Summary
6. Exploring Third Party Options
A word about externally hosted services
Deploying Docker in the cloud
Why use a SaaS service?
Sysdig Cloud
Installing the agent
Exploring your containers
Summary and further reading
Datadog
Installing the agent
Exploring the web interface
Summary and further reading
New Relic
Installing the agent
Exploring the web interface
Summary and further reading
Summary
7. Collecting Application Logs from within the Container
Viewing container logs
ELK Stack
Starting the stack
Logspout
Reviewing the logs
What about production?
Looking at third party options
Summary
8. What Are the Next Steps?
Some scenarios
Pets, Cattle, Chickens, and Snowflakes
Pets
Cattle
Chickens
Snowflakes
Scenario one
Scenario two
Scenario three
A little more about alerting
Chickens
Cattle and Pets
Sending alerts
Keeping up
Summary
Index

Monitoring Docker

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: December 2015
Production reference: 1041215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78588-275-3
www.packtpub.com

Credits

Author
Russ McKendrick
Reviewer
Marcelo Correia Pinheiro
Commissioning Editor
Veena Pagare
Acquisition Editor
Rahul Nair
Content Development Editor
Anish Sukumaran
Technical Editor
Saurabh Malhotra
Copy Editor
Trishya Hajare
Project Coordinator
Izzat Contractor
Proofreader
Safis Editing
Indexers
Mariammal Chettiyar
Priya Sane
Production Coordinator
Shantanu N. Zagade
Cover Work
Shantanu N. Zagade

About the Author

Russ McKendrick is an experienced solutions architect who has been working in IT and IT-related industries for the better part of 23 years. During his career, he has had varied responsibilities in a number of industries, ranging from looking after entire IT infrastructures to providing first line, second line, and senior support in client facing, and internal teams for corporate organizations.
He works almost exclusively with Linux, using open source systems and tools on various platforms ranging from dedicated hardware and virtual machines to public clouds.

About the Reviewer

Marcelo Correia Pinheiro is a Brazilian software engineer from Porto Alegre. He started to work as a web designer and programmer in 2000 with ASP and PHP, naturally getting in touch with the Microsoft .NET framework and Java running respective databases of choice for web applications. Since 2003, he has used Linux and UNIX-related operational systems, from Slackware to Gobo Linux, Archlinux, CentOS, Debian, and today OSX, having some contact with BSD distributions too. He has lost some nights compiling and applying patches to the Linux kernel to make its desktop work. Since the beginning, he has been acting as a problem solver, no matter what the programming language, database, or platfor...

Table of contents

  1. Monitoring Docker

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Monitoring Docker by Russ McKendrick in PDF and/or ePUB format, as well as other popular books in Computer Science & Cloud Computing. We have over one million books available in our catalogue for you to explore.