#使用分层表单来设置管道的批处理大小和批处理延迟 pipeline: batch: size: 125 #管道批处理大小 delay: 5 #管道批处理延迟 #若要表示与平面键相同的值: pipeline.batch.size: 125 pipeline.batch.delay: 5 #节点名称,在集群中具有惟一性,默认为logstash主机的主机名 node.name: logstast-node1 #logstash及其插件所使用的数据路径,默认路径为logstash家目录下的data目录 path.data: /usr/local/logstash-7.0.0/data/ #管道的ID,默认为main pipeline.id: main #输入、输出及过滤器的总工做数量,也就是logstash的工做进程,此工做进程默认为主机的cpu核心数量 pipeline.workers: 16 #在输入阶段,单个工做线程将从输入中收集的最大事件数,此事件数堆内存开销较大,内存开销可在jvm.options中设置堆内存大小来优化此选项 pipeline.batch.size: 125 #在将一个较小的批发送到filters+output以前,轮询下一个事件时等待的时间(以毫秒为单位) pipeline.batch.delay: 50 #设置为true时,在强制关闭logstash期间,即便内存中还有事件,那么为true将会强制关闭,致使数据丢失;默认为false,false在强制关闭logstash期间,将拒绝退出,直到全部在管道中的事件被安全输出,再关闭。 pipeline.unsafe_shutdown: false #指定管道配置的目录,在此目录下的全部管道配置文件都将被logstash读取,除管道配置外,不要听任何文件 path.config: /usr/local/logstash-7.0.0/conf.d/ #在启动时,测试配置是否有效并退出,检测配置文件是否正确,包括检测管道配置文件,默认为false config.test_and_exit: true #按期检查配置是否更改并从新加载管道,默认为false config.reload.automatic: true #logstash间隔多久检查一次配置中的更改,默认为3秒 config.reload.interval: 600s #设置为true时,将彻底编译的配置显示为调试日志消息 config.debug: false #用于事件缓冲的内部排队模型;能够指定内存memory或者磁盘persisted,内存处理速度相对磁盘来讲效率要高,默认为内存 queue.type: memory #启用持久队列时将存储数据文件的目录路径,默认为logstash路径下的queue path.queue: /usr/local/logstash-7.0.0/queue/ #启用持久队列时使用的页面数据文件的大小(queue.type: persisted)队列数据由分红页面的仅附加数据文件组成 queue.page_capacity: 64mb #启用持久队列时队列中未读事件的最大数量(queue.type: persisted),默认为0,0为无限制 queue.max_events: 0 #队列的总容量,以字节数表示,默认为1G,根据业务需求而定 queue.max_bytes: 1024mb #启用持久队列时强制检查点以前最大的ACK事件数量(queue.type: persisted),设置为0,表示无限制,默认为1024 queue.checkpoint.acks: 1024 #启用持久队列时强制检查点以前写入事件的最大数量(queue,type: persisted),设置为0,表示无限制,默认为1024 queue.checkpoint.writes: 1024 #启用持久队列(queue,type: persisted),强制在头部页面上设置检查点的间隔(以毫秒为单位),有周期性检查点的默认值是1000毫秒 queue.checkpoint.interval: 1000 #用于指示logstast启用插件支持DLQ功能的标志,默认为false dead_letter_queue.enable: false #每一个死信队列的最大大小,若是条目超过此设置会增长死信队列的大小,则会删除条目,默认为1024mb dead_letter_queue.max_bytes: 1024mb #为死信队列存储数据文件的目录路径 path.dead_letter_queue: /usr/local/logstash-7.0.0/letter-queue #度量标准REST端点的绑定地址,默认为127.0.0.1 http.host: "127.0.0.1" #度量标准REST端点的绑定端口,默认为9600 http.port: 9600 #日志级别,能够设置为如下几种级别,默认为info log.level: info fatal error warn info (default) debug trace #logstash日志目录位置,默认为logstash路径下的logs path.logs: /usr/local/logstash-7.0.0/logs #logstash插件路径 path.plugins: []
# ------------ Other Settings -------------- # # Where to find custom plugins # path.plugins: [] # # ------------ X-Pack Settings (not applicable for OSS build)-------------- # # X-Pack Monitoring # https://www.elastic.co/guide/en/logstash/current/monitoring-logstash.html #xpack.monitoring.enabled: false #xpack.monitoring.elasticsearch.username: logstash_system #xpack.monitoring.elasticsearch.password: password #xpack.monitoring.elasticsearch.hosts: ["https://es1:9200", "https://es2:9200"] #xpack.monitoring.elasticsearch.ssl.certificate_authority: [ "/path/to/ca.crt" ] #xpack.monitoring.elasticsearch.ssl.truststore.path: path/to/file #xpack.monitoring.elasticsearch.ssl.truststore.password: password #xpack.monitoring.elasticsearch.ssl.keystore.path: /path/to/file #xpack.monitoring.elasticsearch.ssl.keystore.password: password #xpack.monitoring.elasticsearch.ssl.verification_mode: certificate #xpack.monitoring.elasticsearch.sniffing: false #xpack.monitoring.collection.interval: 10s #xpack.monitoring.collection.pipeline.details.enabled: true # # X-Pack Management # https://www.elastic.co/guide/en/logstash/current/logstash-centralized-pipeline-management.html #xpack.management.enabled: false #xpack.management.pipeline.id: ["main", "apache_logs"] #xpack.management.elasticsearch.username: logstash_admin_user #xpack.management.elasticsearch.password: password #xpack.management.elasticsearch.hosts: ["https://es1:9200", "https://es2:9200"] #xpack.management.elasticsearch.ssl.certificate_authority: [ "/path/to/ca.crt" ] #xpack.management.elasticsearch.ssl.truststore.path: /path/to/file #xpack.management.elasticsearch.ssl.truststore.password: password #xpack.management.elasticsearch.ssl.keystore.path: /path/to/file #xpack.management.elasticsearch.ssl.keystore.password: password #xpack.management.elasticsearch.ssl.verification_mode: certificate #xpack.management.elasticsearch.sniffing: false #xpack.management.logstash.poll_interval: 5s