iLogtail
metric_debug_file 插件是一个用于调试的插件,它可以逐行读取指定文件的内容,并将其与指定的名称绑定在一起成为一个字段,用于模拟文件输入。源代码
metric_debug_file
Stable
content
echo "2022/07/26/14:25:47 hello world" >> /home/test-log/debug_file.logecho "2023/05/23/19:37:47 hello world" >> /home/test-log/debug_file.log
enable: trueinputs: - Type: metric_debug_file InputFilePath: /home/test-log/debug_file.log FieldName: HelloWorldflushers: - Type: flusher_stdout OnlyStdout: true
{ "HelloWorld": "2022/07/26/14:25:47 hello world", "__time__":"1658814799"}{ "HelloWorld": "2023/05/23/19:37:47 hello world", "__time__":"1658814799"}