Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The DevOps 2.2 Toolkit

You're reading from   The DevOps 2.2 Toolkit Self-Sufficient Docker Clusters

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher Packt
ISBN-13 9781788991278
Length 360 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Viktor Farcic Viktor Farcic
Author Profile Icon Viktor Farcic
Viktor Farcic
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Introduction to Self-Adapting and Self-Healing Systems FREE CHAPTER 2. Choosing a Solution for Metrics Storage and Query 3. Deploying and Configuring Prometheus 4. Scraping Metrics 5. Defining Cluster-Wide Alerts 6. Alerting Humans 7. Alerting the System 8. Self-Healing Applied to Services 9. Self-Adaptation Applied to Services 10. Painting the Big Picture – The Self-Sufficient System Thus Far 11. Instrumenting Services 12. Self-Adaptation Applied to Instrumented Services 13. Setting Up a Production Cluster 14. Self-Healing Applied to Infrastructure 15. Self-Adaptation Applied to Infrastructure 16. Blueprint of a Self-Sufficient System 17. Other Books You May Enjoy

Postponing alerts firing

Firing an alert as soon as the condition is met is often not the best idea. The conditions of the system might change temporarily and go back to "normal" shortly afterward. A spike in memory is not bad in itself. We should not worry if memory utilization jumps to 95% only to go back to 70% a few moments later. On the other hand, if it continues being over 80% for, let's say, five minutes, some actions should be taken.

We'll modify the go-demo_main service so that it fires an alert only if memory threshold is reached and the condition continues for at least one minute.

The relevant parts of the go-demo stack file are as follows:

services: 
 
  main: 
    ... 
 
    deploy: 
      ... 
      labels: 
        ... 
        - com.df.alertName=mem_limit 
        -  com.df.alertIf=container_memory_usage_\
bytes{container_label_com_docker_swarm_service_name...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image