快速开始
采集主机日志
VERSION=3.3.2 curl -fL -o "loongcollector-${VERSION}.linux-amd64.tar.gz" \ "https://github.com/alibaba/loongcollector/releases/download/v${VERSION}/loongcollector-${VERSION}.linux-amd64.tar.gz" tar -xzvf "loongcollector-${VERSION}.linux-amd64.tar.gz" cd "loongcollector-${VERSION}"enable: true inputs: - Type: input_file # 文件输入类型 FilePaths: - ./simple.log flushers: - Type: flusher_stdout # 标准输出流输出类型 OnlyStdout: truecd conf/continuous_pipeline_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