Random
Random input plugin generate very simple random value samples using the device interface /dev/urandom, if not available it will use a unix timestamp as value.

Configuration Parameters

The plugin supports the following configuration parameters:
Key
Description
Samples
If set, it will only generate a specific number of samples. By default this value is set to -1, which will generate unlimited samples.
Interval_Sec
Interval in seconds between samples generation. Default value is 1.
Internal_Nsec
Specify a nanoseconds interval for samples generation, it works in conjunction with the Interval_Sec configuration key. Default value is 0.

Getting Started

In order to start generating random samples, you can run the plugin from the command line or through the configuration file:

Command Line

From the command line you can let Fluent Bit generate the samples with the following options:
1
$ fluent-bit -i random -o stdout
Copied!

Configuration File

In your main configuration file append the following Input & Output sections:
1
[INPUT]
2
Name random
3
Samples -1
4
Interval_Sec 1
5
Interval_NSec 0
6
7
[OUTPUT]
8
Name stdout
9
Match *
Copied!

Testing

Once Fluent Bit is running, you will see the reports in the output interface similar to this:
1
$ fluent-bit -i random -o stdout
2
Fluent Bit v1.x.x
3
* Copyright (C) 2019-2020 The Fluent Bit Authors
4
* Copyright (C) 2015-2018 Treasure Data
5
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
6
* https://fluentbit.io
7
8
[2016/10/07 20:27:34] [ info] [engine] started
9
[0] random.0: [1475893654, {"rand_value"=>1863375102915681408}]
10
[1] random.0: [1475893655, {"rand_value"=>425675645790600970}]
11
[2] random.0: [1475893656, {"rand_value"=>7580417447354808203}]
12
[3] random.0: [1475893657, {"rand_value"=>1501010137543905482}]
13
[4] random.0: [1475893658, {"rand_value"=>16238242822364375212}]
Copied!
Last modified 7mo ago