Book description
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 problems
About 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.
Quotes
I highly recommend using Logging in Action as a getting-started guide, a refresher, or as a way to optimize your logging journey.
- From the Foreword by Anurag Gupta, Fluent maintainer and Cofounder, Calyptia
Covers everything you need if you want to implement a logging system using open source technology such as Fluentd and Kubernetes.
- Alex Saez, Naranja X
A great exploration of the features and capabilities of Fluentd, along with very useful hands-on exercises.
- George Thomas, Manhattan Associates
A practical holistic guide to integrating logging into your enterprise architecture.
- Satej Sahu, Honeywell
Table of contents
- inside front cover
- Logging in Action
- Copyright
- contents
- front matter
- Part 1. From zero to “Hello World”
-
1 Introduction to Fluentd
- 1.1 Elevator pitch for Fluentd
- 1.2 Why do we produce logs?
- 1.3 Evolving ideas
- 1.4 Log unification
- 1.5 Software stacks
- 1.6 Log routing as a vehicle for security
- 1.7 Log event life cycle
- 1.8 Evolution of Fluentd
- 1.9 Where can Fluentd and Fluent Bit be used?
- 1.10 Fluentd UI-based editing
- 1.11 Plugins
- 1.12 How Fluentd can be used to make operational tasks easier
- Summary
- 2 Concepts, architecture, and deployment of Fluentd
- Part 2. Fluentd in depth
-
3 Using Fluentd to capture log events
- 3.1 Dry running to check a configuration
-
3.2 Reading log files
- 3.2.1 Putting the adaption of a Fluentd configuration to Fluent Bit into action
- 3.2.2 Rereading and resuming reading of log files
- 3.2.3 Configuration considerations for tracking position
- 3.2.4 Wildcards in the path attribute
- 3.2.5 Expressing time
- 3.2.6 Controlling the impact of wildcards in filenames
- 3.2.7 Replacing wildcards with delimited lists in action
- 3.2.8 Handling log rotation
- 3.3 Self-monitoring
- 3.4 Imposing structure on log events
- Summary
- 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
- 8.1 Fluentd out of the box from Docker Hub
- 8.2 Using Docker log drivers
- 8.3 Kubernetes components logging and the use of Fluentd
- 8.4 Demonstrating logging with Kubernetes
- 8.5 Getting a peek at host logs
- 8.6 Configuring a Kubernetes logging DaemonSet
- 8.7 Kubernetes configuration in action
- 8.8 More Kubernetes monitoring and logging to watch for
- Summary
-
9 Creating custom plugins
- 9.1 Plugin source code
- 9.2 What is Redis, and why build a plugin with the Redis list capability?
- 9.3 Illustrating our objective using Redis CLI
- 9.4 Preparing for development
- 9.5 Plugin frameworks
-
9.6 Implementing the plugin core
- 9.6.1 How configuration attributes work
- 9.6.2 Starting up and shutting down
- 9.6.3 Getting the plugin to work with our Fluentd installation
- 9.6.4 Putting additional configuration validation into action
- 9.6.5 Implementing the Redis output logic
- 9.6.6 Putting the testing of synchronous output into action
- 9.7 Implementing the Redis input plugin
- 9.8 Extending output with buffering
- 9.9 Unit testing
- 9.10 Putting the development of unit tests into action
- 9.11 Package and deployment
- 9.12 Extending to be an enterprise-class solution
- Summary
- Part 4. Good logging practices and frameworks to maximize log value
- 10 Logging best practices
-
11 Logging frameworks
- 11.1 Value of logging frameworks
- 11.2 Typical structure of a logging framework
- 11.3 Appender structures
- 11.4 Logging framework landscape
- 11.5 Choosing a framework
- 11.6 Fluentd’s own logging and appenders
-
11.7 Illustrations of an application logging directly to Fluentd
- 11.7.1 Python with logging framework: Using the Fluentd library
- 11.7.2 Invoking Fluentd appender directly
- 11.7.3 Illustration with only Python’s logging
- 11.7.4 Illustration without Python’s logging or Fluentd library
- 11.7.5 Porting the Fluentd calls to another language into action
- 11.7.6 Using generic appenders: The takeaways
- Summary
- Appendix A. Installation of additional tools and services
- Appendix B. Processing times and dates, regular expressions, and other configuration values
- Appendix C. Plugins summary
- Appendix D. Real-world use case
-
Appendix E. Useful resources
- E.1 Helpful Fluentd resources
- E.2 Helpful Fluentd third-party tools
- E.3 Helpful logging practices resources
- E.4 Common log formats and descriptions
- E.5 Helpful Ruby resources
- E.6 Docker and Kubernetes
- E.7 Elasticsearch
- E.8 Redis
- E.9 SSL/TLS and security
- E.10 Environment setup
- E.11 Logging frameworks
- E.12 Information portals on legislation
- E.13 Other handy sources of information
- E.14 Supporting Fluentd resources
- E.15 Related reading
- index
- inside back cover
Product information
- Title: Logging in Action
- Author(s):
- Release date: April 2022
- Publisher(s): Manning Publications
- ISBN: 9781617298356
You might also like
book
API Security in Action
A web API is an efficient way to communicate with an application or service. However, this …
book
Microservices Security in Action
Unlike traditional enterprise applications, Microservices applications are collections of independent components that function as a system. …
book
Logging and Log Management
Logging and Log Management: The Authoritative Guide to Understanding the Concepts Surrounding Logging and Log Management …
book
Amazon Web Services in Action, Third Edition
Master essential best practices for deploying and managing applications on Amazon Web Services. This revised bestseller …