亲,只收二进制

【求助】filebeat的配置文件问题,能否写成变量

默认分类 | 作者 sweetpotato | 发布于2018年09月19日 | 阅读数:3396

filebeat:
prospectors:
-
paths:
- /var/log/nginx/error.log
document_type: test_nginx_err

-
paths:
- /var/log/nginx/access.log
document_type: test_nginx_access

registry_file: /var/lib/filebeat/registry

output:
logstash:
hosts: ["172.17.11.47:5044"]
bulk_max_size: 1024

shipper:

logging:
files:
rotateeverybytes: 1048500 # = 10MB

我想请教的是  我想把paths写成/var/log/nginx/{变量}_error.log
document_type:{变量}_err
 
请问这个可以写成变量的吗  因为想写在docker里面,不想每次新增一个app就重新编辑,能否写成变量来固定这个配置文件,求大神解答
已邀请:

sweetpotato - 90IT男

赞同来自:

或者说 filebeat的配置文件,可以读取多个的吗
Process: 23938 ExecStart=/usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat
就像这个-c /etc/filebeat/filebeat.yml   能不能改成 /etc/filebeat/*yml的?

sweetpotato - 90IT男

赞同来自:

或者是固定那个type是日志的名字,请问如何写?

zqc0512 - andy zhou

赞同来自:

好像不支持样。支持*

要回复问题请先登录注册