Type converter

circle-info

Supported event types: logs

The Type converter filter plugin converts data types and appends new key-value pairs.

You can use this filter in combination with plugins which expect incoming string value. For example, Grep and Modify.

Configuration parameters

The plugin supports the following configuration parameters. It needs four parameters.

<config_parameter> <src_key_name> <dst_key_name> <dst_data_type>`

dst_data_type allows int, uint, float, and string. For example, int_key id id_str string.

Key
Description

float_key

This parameter is for a float source.

int_key

This parameter is for an integer source.

str_key

This parameter is for a string source.

uint_key

This parameter is for an unsigned integer source.

Get started

To start filtering records, you can run the filter from the command line or through the configuration file.

This is a sample in_mem record to filter.

{"Mem.total"=>1016024, "Mem.used"=>716672, "Mem.free"=>299352, "Swap.total"=>2064380, "Swap.used"=>32656, "Swap.free"=>2031724}

The plugin outputs uint values and filter_type_converter converts them into string type.

Convert uint to string

You can also run the filter from command line.

The output will be

Last updated

Was this helpful?