Type Converter
Last updated
Was this helpful?
Was this helpful?
[INPUT]
Name mem
[FILTER]
Name type_converter
Match *
uint_key Mem.total Mem.total_str string
uint_key Mem.used Mem.used_str string
uint_key Mem.free Mem.free_str string
[OUTPUT]
Name stdout
Match *pipeline:
inputs:
- name: mem
filters:
- name: type_converter
match: '*'
uint_key:
- Mem.total Mem.total_str string
- Mem.used Mem.used_str string
- Mem.free Mem.free_str string
outputs:
- name: stdout
match: '*'$ fluent-bit -i mem -o stdout -F type_converter -p 'uint_key=Mem.total Mem.total_str string' -p 'uint_key=Mem.used Mem.used_str string' -p 'uint_key=Mem.free Mem.free_str string' -m '*'[0] mem.0: [1639915154.160159749, {"Mem.total"=>8146052, "Mem.used"=>4513564, "Mem.free"=>3632488, "Swap.total"=>1918356, "Swap.used"=>0, "Swap.free"=>1918356, "Mem.total_str"=>"8146052", "Mem.used_str"=>"4513564", "Mem.free_str"=>"3632488"}]