Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Simplifying Service Management with Consul

You're reading from   Simplifying Service Management with Consul Overcome connectivity and security challenges within dynamic service architectures

Arrow left icon
Product type Paperback
Published in Nov 2021
Publisher Packt
ISBN-13 9781800202627
Length 234 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Robert E. Jackson Robert E. Jackson
Author Profile Icon Robert E. Jackson
Robert E. Jackson
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Section 1: Consul Use Cases and Architecture
2. Chapter 1: Consul Overview – Operation and Use Cases FREE CHAPTER 3. Chapter 2: Architecture – How Does It Work? 4. Chapter 3: Keep It Safe, Stupid, and Secure Your Cluster! 5. Chapter 4: Data Center (Not Trade) Federation 6. Section 2: Use Cases Deep Dive
7. Chapter 5: Little Bo Peep Lost Her Service 8. Chapter 6: Connect Four or More 9. Chapter 7: Animate Me 10. Chapter 8: Where Do We Go Now? 11. Other Books You May Enjoy

Watching your handlers

Way back in Chapter 5, Little Bo Peep Lost Her Service, where Little Bo Peep lost her service, we touched on the functionality of Consul watches and handlers. Recall that a Consul watch observes any number of parameters within Consul, and based on value changes, can execute a handler to perform some function. Within Chapter 5, Little Bo Peep Lost Her Service, we focused on being able to watch the status of a service, in order to inform a third party about service health. We can use this same functionality, but instead of watching service status, we can watch the status of a parameter within the KV store.

For example, if we wanted to watch our key, using the direct command line, we would execute the following:

$ consul watch -type=key -key=son/seventh/gift
{
    "Key": "son/seventh/gift",
    "CreateIndex": 194,
    "ModifyIndex": 237,
   &...
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 €18.99/month. Cancel anytime