9 Creating custom plugins

 

This chapter covers

  • Developing custom Fluentd plugins for Redis
  • Using Fluentd utilities to speed up development
  • Implementing the Fluentd plugin life cycle methods
  • Testing and packaging custom Fluentd plugins
  • Creating documentation for the custom plugins

At various points in the book, we have referred to Fluentd’s support for the development of plugins beyond those from the core product. The extensibility of Fluentd has led to a robust ecosystem of third-party plugins to make it easy to capture, filter, manipulate, and send them to many different systems and data stores. We have also discussed how custom plugins could connect to and monitor esoteric and legacy solutions when things cannot easily or efficiently be achieved with the existing plugins.

In this chapter, we will walk through the process of creating an input and output plugin that makes use of Redis’s list capability. We will take a closer look at Redis and the rationale behind its use.

9.1 Plugin source code

9.2 What is Redis, and why build a plugin with the Redis list capability?

9.2.1 Redis list over RedisTimeSeries

9.3 Illustrating our objective using Redis CLI

9.4 Preparing for development

9.5 Plugin frameworks

9.5.1 Creating the skeleton plugin

9.5.2 Plugin life cycle

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