Enable hot reload through SIGHUP signal or an HTTP endpoint
Fluent Bit supports the hot reloading feature when enabled via the configuration file or command line with -Y
or --enable-hot-reload
option.
To get started with reloading via HTTP, the first step is to enable the HTTP Server from the configuration file:
The above configuration snippet will enable the HTTP endpoint for hot reloading.
Hot reloading can be kicked via HTTP endpoints that are:
PUT /api/v2/reload
POST /api/v2/reload
If users don't enable the hot reloading feature, hot reloading via these endpoints will not work.
For using curl to reload Fluent Bit, users must specify an empty request body as:
Hot reloading also can be kicked via SIGHUP
.
SIGHUP
signal is not supported on Windows. So, users can't enable this feature on Windows.
The number of hot reloaded count can be obtained via the HTTP endpoint that is:
GET /api/v2/reload
The endpoint returns the count of hot-reloaded as follows:
The default value of that number is 0.
The hot reloading feature is currently working on Linux, macOS and Windows.