filebeat配置不同路径下的log的两种方法
第一种方法:
vim /etc/filebeat/filebeat.yml filebeat.inputs: # Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations. - type: log # Change to true to enable this input configuration.
enabled: true
harvester_limit: 100
#close_eof : true
close_inactive : 10m
#close_timeout : true
ignore_older : 72h
clean_inactive : 73h
scan_frequency: 10s
# Paths that should be crawled and fetched. Glob based paths.
json.keys_under_root: true
paths:
- /etc/logs/*.log
- /var/www/logs/*.logs
第二种方法,增加个tag字段,区分不同地方的log,建议使用
- type: log # Change to true to enable this input configuration.
#enabled: false
enabled: true
harvester_limit: 100
close_inactive: 10m
ignore_older: 168h
clen_inactive: 170h
scan_frequency: 10s
json.keys_under_root: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /var/log/*.log
tags: ["all"] - type: log # Change to true to enable this input configuration.
#enabled: false
enabled: true
harvester_limit: 100
close_inactive: 10m
ignore_older: 168h
clen_inactive: 170h
scan_frequency: 10s
json.keys_under_root: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /opt/logs/test.log
tags: ["only_test"]
filebeat配置不同路径下的log的两种方法的更多相关文章
- SQL Server中灾难时备份结尾日志(Tail of log)的两种方法
转自:http://www.cnblogs.com/CareySon/archive/2012/02/23/2365006.html SQL Server中灾难时备份结尾日志(Tail of log) ...
- 20155212 C语言实现linux下pwd命令的两种方法
20155212 C语言实现linux下pwd命令的两种方法 学习pwd命令 通过man pwd命令查看 pwd [OPTION],一般不加参数 -P显示当前目录的物理路径 -L显示当前目录的连接路径 ...
- Linux 下操作GPIO(两种方法,驱动和mmap)(转载)
目前我所知道的在Linux下操作GPIO有两种方法: 1.编写驱动,这当然要熟悉Linux下驱动的编写方法和技巧,在驱动里可以使用ioremap函数获得GPIO物理基地址指针,然后使用这个指针根据io ...
- Linux 下操作gpio(两种方法,驱动和mmap)
目前我所知道的在linux下操作GPIO有两种方法: 1. 编写驱动,这当然要熟悉linux下驱动的编写方法和技巧,在驱动里可以使用ioremap函数获得GPIO物理基地址指针,然后使用这个指针根据 ...
- suse下设置IP的两种方法
/Files/yzhxhwt/DB_51aspx.rar 第一种SUSE Linux IP设置方法ifconfig eth0 192.168.1.22 netmask 255.255.255.0 up ...
- spring boot 下websocket实现的两种方法
websocket前台实现代码,保存为html执行就好 html代码来自:https://blog.csdn.net/M348915654/article/details/53616837 <h ...
- Centos6、7下安装Nginx的两种方法
一,通过yum命令安装 1.操作系统版本的确认很重要,因为下一步我们要依靠这个来创建yum源文件 2.创建 nginx.repo vi /etc/yum.repos.d/nginx.repo 文件内容 ...
- 上拉刷新和下拉刷新的两种方法(包括使用第三方库MJRefresh)
一.使用苹果原生的方法 1.下拉刷新 2.上拉刷新 (1 首先要新建一个footer得XIB文件,当然同时包括对应的控制器文件,例如在XIB文件中可以如下拖拉对应的控件 (2 然后在代码文件中写一个实 ...
- Android下打印堆栈的两种方法
1. for(StackTraceElement i:Thread.currentThread().getStackTrace()){ System.out.println(i); } 2. Log. ...
随机推荐
- ptxdist for sama5d3
http://www.vahanus.net/~csc/scm/ptxdist-at91sama5d3-xpld.git/
- Office Web App2013 在线查看PDF文件
经常会有客户问,在SharePoint中,如何在浏览器中查看与编辑文档,通常给出的解决方案是集成Office Web App. 而在实际应用过程中,客户通常会要求实现PDF文件在线查看,对于PDF文件 ...
- 微信小程序6 - 页面之间传参及通知系统封装
1. 简单传参 wx.navigateTo({ url: '/pages/demo/index/index?id=1' }) /pages/demo/index/index.js 中 onLoad(o ...
- CI 多表关联查询
方法一:$this->db->query("sql 语句"); 直接写sql语句 方法二: #多表关联查询 $data=$this->db->fr ...
- 数据库 Proc编程二
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <stri ...
- python 神经网络实例
#http://python.jobbole.com/82758/ # import numpy as np # # # # sigmoid function # def nonlin(x, deri ...
- Python爬虫(五)
源码: import requests from lxml import etree from my_mysql import MysqlConnect mc = MysqlConnect(','ho ...
- P2483 [SDOI2010]魔法猪学院
P2483 [SDOI2010]魔法猪学院 摘要 --> 题目描述 iPig在假期来到了传说中的魔法猪学院,开始为期两个月的魔法猪训练.经过了一周理论知识和一周基本魔法的学习之后,iPig对猪世 ...
- 链接href的多重使用
1. 拨打电话 在电话号码前面可以加上 + (加号)表示国际号码. <a href="tel:10086">10086</a> 使用wtai协议进行拨打电话 ...
- switch语句相关
Cannot switch on a value of type long. Only convertible int values, strings or enum variables are pe ...