Skip to main content
Version: 1.x

Fake

Input plugin : Fake​

Description​

Input plugin for producing test data.

Options​

nametyperequireddefault value
data_formatstringnotext
json_keysarrayno-
num_of_fieldsnumberno10
ratenumberyes-
text_delimeterstringno,
data_format [string]​

The format of test data, supports text and json

json_keys [array]​

The list of JSON data's key, used when data_format is json

num_of_fields [number]​

The number of fields, used when data_format is text

rate [number]​

The number of test data produced per second

text_delimiter [string]​

Text data separator, used when data_format is text

Examples​

  1. With data_format

    fake {
    data_format = "text"
    text_delimeter = ","
    num_of_fields = 5
    rate = 5
    }
  • Input

    +-------------------------------------------------------------------------------------------+
    |raw_message |
    +-------------------------------------------------------------------------------------------+
    |Random1-1462437280,Random215896330,Random3-2009195549,Random41027365838,Random51525395111 |
    |Random1-2135047059,Random2-1030689538,Random3-854912064,Random4126768642,Random5-1483841750|
    +-------------------------------------------------------------------------------------------+
  1. Without data_format

    fake {
    content = ['name=ricky&age=23', 'name=gary&age=28']
    rate = 5
    }
  • Input

    +-----------------+
    |raw_message |
    +-----------------+
    |name=gary&age=28 |
    |name=ricky&age=23|
    +-----------------+

    Randomly extract the string from the content list