快速开始
采集主机日志
wget https://loongcollector-community-edition.oss-cn-shanghai.aliyuncs.com/0.2.0/loongcollector-0.2.0.linux-amd64.tar.gz tar -xzvf loongcollector-0.2.0.linux-amd64.tar.gz cd loongcollector-0.2.0enable: true inputs: - Type: input_file # 文件输入类型 FilePaths: - ./simple.log flushers: - Type: flusher_stdout # 标准输出流输出类型 OnlyStdout: truecd ./config/local wget https://raw.githubusercontent.com/alibaba/loongcollector/main/example_config/quick_start/config/file_simple.yaml cd -nohup ./loongcollector > stdout.log 2> stderr.log &echo 'Hello, LoongCollector!' >> simple.logcat stdout.log2024-12-05 15:50:29 {"__tag__:__path__":"./simple.log","content":"Hello, LoongCollector!","__time__":"1733385029"}
更多采集配置
Last updated