Logging in Action
With Fluentd, Kubernetes and more
Phil Wilkins
- 392 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Logging in Action
With Fluentd, Kubernetes and more
Phil Wilkins
About This Book
Make log processing a real asset to your organization with powerful and free open source tools. In Logging in Action you will learn how to: Deploy Fluentd and Fluent Bit into traditional on-premises, IoT, hybrid, cloud, and multi-cloud environments, both small and hyperscaled
Configure Fluentd and Fluent Bit to solve common log management problems
Use Fluentd within Kubernetes and Docker services
Connect a custom log source or destination with Fluentd's extensible plugin framework
Logging best practices and common pitfalls Logging in Action is a guide to optimize and organize logging using the CNCF Fluentd and Fluent Bit projects. You'll use the powerful log management tool Fluentd to solve common log management, and learn how proper log management can improve performance and make management of software and infrastructure solutions easier. Through useful examples like sending log-driven events to Slack, you'll get hands-on experience applying structure to your unstructured data. About the technology
Don't fly blind! An effective logging system can help you see and correct problems before they cripple your software. With the Fluentd log management tool, it's a snap to monitor the behavior and health of your software and infrastructure in real time. Designed to collect and process log data from multiple sources using the industry-standard JSON format, Fluentd delivers a truly unified logging layer across all your systems. About the book
Logging in Action teaches you to record and analyze application and infrastructure data using Fluentd. Using clear, relevant examples, it shows you exactly how to transform raw system data into a unified stream of actionable information. You'll discover how logging configuration impacts the way your system functions and set up Fluentd to handle data from legacy IT environments, local data centers, and massive Kubernetes-driven distributed systems. You'll even learn how to implement complex log parsing with RegEx and output events to MongoDB and Slack. What's inside Capture log events from a wide range of systems and software, including Kubernetes and Docker
Connect to custom log sources and destinations
Employ Fluentd's extensible plugin framework
Create a custom plugin for niche problemsAbout the reader
For developers, architects, and operations professionals familiar with the basics of monitoring and logging. About the author
Phil Wilkins has spent over 30 years in the software industry. Has worked for small startups through to international brands.Table of Contents
PART 1 FROM ZERO TO "HELLO WORLD"
1 Introduction to Fluentd
2 Concepts, architecture, and deployment of Fluentd
PART 2 FLUENTD IN DEPTH
3 Using Fluentd to capture log events
4 Using Fluentd to output log events
5 Routing log events
6 Filtering and extrapolation
PART 3 BEYOND THE BASICS
7 Performance and scaling
8 Driving logs with Docker and Kubernetes
9 Creating custom plugins
PART 4 GOOD LOGGING PRACTICES AND FRAMEWORKS TO MAXIMIZE LOG VALUE
10 Logging best practices
11 Logging frameworks
Frequently asked questions
Information
Part 1. From zero to âHello Worldâ
1 Introduction to Fluentd
- Examining use cases for logs and log events
- Identifying the value of log unification
- Differentiating between log analytics and unified logging
- Understanding monitoring concepts
- Understanding Fluentd and Fluent Bit
1.1 Elevator pitch for Fluentd
1.1.1 What is a log event?
- Log events are humanly readable information that is primarily textual in nature. The textual information can range from unstructured to highly structured.
- Each log event has a place in time, defined with a timestamp (usually absolute 01:00:00 1 Jan 1970, but could be relative +0.60), or time can be inferred by the log eventâs position in a series of events.
- Each event also has an explicit or implicit association to a location that can be associated with a component running in a location that may be physical or logical.
1.1.2 Fluentd compared to middleware
1.2 Why do we produce logs?
- Debugging âKnowing which parts of the code are being executed in a scenario makes it easy to isolate a bug. Yes, we have debuggers, and so on, but often itâs just as easy to drop a few log lines in to help. Some of these log messages will be left in to provide assurance that things are running fine during production. Other lines of log messages may be disabled while weâre not developing and testing software. Note that we would never recommend trying to connect to a production environment with a debugger. Allowing a production system to log information intended for debugging should be done with an understanding of the possible consequences (later in the book, weâll explore why this is so).
- Unexpected data values or abnormal conditions occurring â...