filebeat 教程

1. filebeat安装

#rpm安装方式
https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.17.5-x86_64.rpm
rpm -ivh filebeat-7.17.5-x86_64.rpm
systemctl enable filebeat --now 

#二进制包安装方式
1.下载
mkdir -p /data/tools/filebeat/ && cd /data/tools/filebeat/
wget https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.17.5-linux-x86_64.tar.gz
tar -xvf filebeat-7.17.5-linux-x86_64.tar.gz

--------------这里第二部和第三步先不操作,案例部分和2,3冲突--------------------------------
2.使用systemctl管理filebeat服务
cat > /usr/lib/systemd/system/filebeat.service <<EOF
[Unit]
Description=es
After=network.target

[Service]
Type=simple
ExecStart=/data/tools/filebeat/filebeat-7.17.5-linux-x86_64/filebeat -c /data/tools/filebeat/filebeat-7.17.5-linux-x86_64/filebeat.yml
User=filebeat
LimitNOFILE=131070

[Install]
WantedBy=multi-user.target
EOF
3.重新加载systemctl,启动filebeat
systemctl daemon-reload
systemctl enable filebeat --now

2. filbeat案例

2.1. input插件之stdin:案例

https://www.elastic.co/guide/en/beats/filebeat/7.17/index.html
-------------------------------------------------------------------------------
1. filbeat的input插件之stdin案例
	(1)创建工作目录
cd /data/tools/filebeat/filebeat-7.17.5-linux-x86_64
mkdir config

	(2)编写配置文件
[root@elk1]# cat >> config/01-stdin-to-console.yaml <<EOF
# 配置filebeat的输入端
filebeat.inputs:
  # 指定输入端的类型为标准输入
- type: stdin

# 指定filebeat的输出端为console
output.console:
  # 表示输出的内容以漂亮的格式显示
  pretty: true
EOF

	(3)启动filebeat的实例
filebeat -e -c config/01-stdin-to-console.yaml 
  (4) 测试输入输出
输入: 232323231
输出:
{
   ........
  "message": "232323231",
  .....
}

2.2. input插件之tcp:案例

]# cat >> config/02-tcp-to-console.yaml  <<EOF
# 配置filebeat的输入端
filebeat.inputs:
  # 指定输入端的类型为tcp
- type: tcp 
  # 定义tcp监听的主机和端口
  host: 0.0.0.0:8888

# 指定filebeat的输出端为console
output.console:
  # 表示输出的内容以漂亮的格式显示
  pretty: true
EOF  

	(3)启动filebeat的实例
./filebeat -e -c config/02-tcp-to-console.yaml
  (4) 测试输入输出
输入:  echo "1111"|nc 10.0.0.101 8888
输出:
{ 
......
  "message": "1111",
.....
}

2.3. input的通用字段案例:

input的通用字段案例:
filebeat input插件的通用字段(common options):
	- enabled:
		是否启用该组件,有true和false,默认值为true。当设置为false时,表示该input组件不会被加载执行!
	- tags:
		给每条数据添加一个tags标签列表。
	- fields
		给数据添加字段。
	- fields_under_root
		该值默认值为false,将自定义的字段放在一个"fields"的字段中。若设置为true,则将fields的KEY放在顶级字段中。
	- processors:
		定义处理器,对源数据进行简单的处理。
		参考链接:
			https://www.elastic.co/guide/en/beats/filebeat/7.17/defining-processors.html

2.4. 综合案例:

5 综合案例:
[root@elk]# cat >> config/03-input_common_options-to-console.yaml <<EOF
filebeat.inputs:
- type: log
  paths:
    - /tmp/logtest/*.log
    - /tmp/logtest/*/*.json
    - /tmp/logtest/**/*.exe
  # 是否启用该类型,默认值为true。
  enabled: false
- type: tcp
  enabled: true
  host: "0.0.0.0:8888"
  # 给数据打标签,会在顶级字段多出来多个标签
  tags: ["2024","new","happy"]
  # 给数据添加KEY-VALUE类型的字段,默认是放在"fields"中的
  fields:
    school: qinghua
    class: "5-4"
    classroom: "032"
    ip: 219.141.136.10
    port: 13306
  # 若设置为true时,则将fields添加的自定义字段放在顶级字段中,默认值为false。
  fields_under_root: true
  # 定义处理器,过滤指定的数据
  processors:
    # 删除消息是以linux开头的事件(event)
  - drop_event:
      when:
        regexp:
          message: "^linux"
    # 消息包含error内容事件(event)就可以删除自定义字段或者tags。无法删除内置的字段.
  - drop_fields:
      when:
        contains:
          message: "error"
      fields: ["class","tags"]
      ignore_missing: false
    # 修改字段的名称
  - rename:
      fields:
          # 源字段
        - from: "school"
          # 目标字段
          to: "学校"  
        - from: "log"
          to: "日志"
    # 转换数据,将字段的类型转换对应的数据类型,并存放在指定的字段中,本案例将其放在"tom"字段中
  - convert:
      fields:
        - {from: "ip", to: "tom.ip", type: "ip"}
        - {from: "port", to: "tom.port", type: "integer"}

# 指定filebeat的输出端为console
output.console:
  # 表示输出的内容以漂亮的格式显示
  pretty: true
EOF

2.5. input插件之log(log插件在7.16版本后弃用)

2.5.1. input插件之log:采集常规数据
# filbeat的input插件之log案例(log插件在7.16版本后弃用)
	(1)编写配置文件
[root@elk1]# cat >> config/04-log-to-console.yaml <<EOF
filebeat.inputs:
  # 指定输入类型是log
- type: log
  # 指定文件路径
  paths:
    # 一个*,只匹配logtest单层目录下面的以log结尾的文件
    - /tmp/logtest/*.log
    # 两个*,可以递归匹配logtest下面所有层级的以json结尾的文件
    - /tmp/logtest/**/*.json
    
# 指定filebeat的输出端为console
output.console:
  # 表示输出的内容以漂亮的格式显示
  pretty: true
EOF

	(2)启动filebeat实例
[root@elk1]# ./filebeat -e -c config/04-log-to-console.yaml 

	(3)测试数据
]# tree /tmp/logtest/
/tmp/logtest/
├── 1
│   ├── 1.json
│   └── 1.log
├── 1.json
└── 1.log
/tmp/logtest/*.log    收集/tmp/logtest/1.log, 不收集/tmp/logtest/1/1.log
/tmp/logtest/**/*.json  收集/tmp/logtest/1.json /tmp/logtest/1/1.json
2.5.2. input插件之log:采集json数据,指定数据采集,排除指定数据采集
6 包含指定数据采集,排除指定数据采集及json格式数据采集案例
[root@elk]# cat config/05-log-to-console.yaml 
filebeat.inputs:
- type: log
  paths:
    - /tmp/logtest/*
  # 排除以log结尾的文件
  exclude_files: ['\.log$']
  # 只采集包含指定信息的数据 
  # include_lines: ['linux']
  # 只要包含特定的数据就不采集该事件(event)
  # exclude_lines: ['^linux']
  # 将message字段的json数据格式进行解析,并将解析的结果放在顶级字段中
  json.keys_under_root: true
  # 如果解析json格式失败,则会将错误信息添加为一个"error"字段输出
  json.add_error_key: true

# 指定filebeat的输出端为console
output.console:
  # 表示输出的内容以漂亮的格式显示
  pretty: true
2.5.3. input插件之log:采集nginx原生格式日志
7 使用filebeat采集nginx日志
	(1)搭建nginx环境
		1.1 添加yum源
cat > /etc/yum.repos.d/nginx.repo <<'EOF'
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true

[nginx-mainline]

baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
EOF

		1.2 安装nginx
yum -y install nginx
systemctl start nginx

	(2)使用filebeat采集nginx日志
[root@elk1 filebeat-7.17.5-linux-x86_64]# cat >> config/06-log_nginx-to-console.yaml <<EOF
filebeat.inputs:
- type: log
  paths:
    - /var/log/nginx/access.log*

output.console:
  # 表示输出的内容以漂亮的格式显示
  pretty: true
EOF

[root@elk1 filebeat-7.17.5-linux-x86_64]# ./filebeat -e -c config/06-log_nginx-to-console.yaml
2.5.4. input插件之log:采集nginx的json格式日志
7 使用filebeat采集nginx的json格式日志
	(1)修改nginx的配置文件
# vim /etc/nginx/nginx.conf 

...
    # log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                   '$status $body_bytes_sent "$http_referer" '
    #                   '"$http_user_agent" "$http_x_forwarded_for"';

    # access_log  /var/log/nginx/access.log  main;

    log_format nginx_json '{"@timestamp":"$time_iso8601",'
                              '"host":"$server_addr",'
                              '"clientip":"$remote_addr",'
                              '"SendBytes":$body_bytes_sent,'
                              '"responsetime":$request_time,'
                              '"upstreamtime":"$upstream_response_time",'
                              '"upstreamhost":"$upstream_addr",'
                              '"http_host":"$host",'
                              '"uri":"$uri",'
                              '"domain":"$host",'
                              '"xff":"$http_x_forwarded_for",'
                              '"referer":"$http_referer",'
                              '"tcp_xff":"$proxy_protocol_addr",'
                              '"http_user_agent":"$http_user_agent",'
                              '"status":"$status"}';

    access_log  /var/log/nginx/access.log  nginx_json;

	(2)热加载nginx
systemctl reload nginx
> /var/log/nginx/access.log

	(3)测试访问nginx
curl http://10.0.0.101/


	(4)filebeat采集nginx的json格式日志
[root@elk1 filebeat-7.17.5-linux-x86_64]# cat > config/07-log_nginx_json-to-console.yaml <<EOF
filebeat.inputs:
- type: log
  paths:
    - /var/log/nginx/access.log*
  json.keys_under_root: true
  json.add_error_key: true

output.console:
  # 表示输出的内容以漂亮的格式显示
  pretty: true
EOF
	(5)启动filebeat实例
[root@elk1 filebeat-7.17.5-linux-x86_64]# ./filebeat -e -c config/07-log_nginx_json-to-console.yaml 
2.5.5. input插件之log:采集tomcat访问日志json格式
8 使用filebeat采集tomcat访问日志:
	(1)安装tomcat
		1.1 下载tomcat软件包
mkdir -p /data/tools/tomcat/ && cd /data/tools/tomcat/
wget https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-9/v9.0.91/bin/apache-tomcat-9.0.91.tar.gz

		1.2 解压软件包
tar xf apache-tomcat-9.0.91.tar.gz

	(2)修改tomcat的配置文件
cd /data/tools/tomcat/apache-tomcat-9.0.91/conf
cp server.xml{,.bak}
vim  server.xml
 ...(切换到行尾修改,大概是在133-149之间)       

		<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
            prefix="tomcat_access_log" suffix=".txt"
pattern="{&quot;clientip&quot;:&quot;%h&quot;,&quot;ClientUser&quot;:&quot;%l&quot;,&quot;authenticated&quot;:&quot;%u&quot;,&quot;AccessTime&quot;:&quot;%t&quot;,&quot;request&quot;:&quot;%r&quot;,&quot;status&quot;:&quot;%s&quot;,&quot;SendBytes&quot;:&quot;%b&quot;,&quot;Query?string&quot;:&quot;%q&quot;,&quot;partner&quot;:&quot;%{Referer}i&quot;,&quot;http_user_agent&quot;:&quot;%{User-Agent}i&quot;}"/>
		  
	(3)配置环境变量并启动tomcat服务
[root@elk1]# cat > /etc/profile.d/tomcat.sh <<'EOF'
#!/bin/bash
export TOMCAT_HOME=/data/tools/tomcat/apache-tomcat-9.0.91/
export PATH=$PATH:$TOMCAT_HOME/bin
EOF
[root@elk]# source /etc/profile.d/tomcat.sh 

[root@elk]# catalina.sh start

	(4)使用filebeat采集tomcat日志
[root@elk1 filebeat-7.17.5-linux-x86_64]# cat > config/08-log_tomcat-to-console.yaml <<EOF
filebeat.inputs:
- type: log
  paths:
    - /data/tools/tomcat/apache-tomcat-9.0.91/logs/tomcat_access_log*.txt
  json.keys_under_root: true
  json.add_error_key: true

output.console:
  # 表示输出的内容以漂亮的格式显示
  pretty: true
EOF
[root@elk103.oldboyedu.com filebeat-7.17.5-linux-x86_64]# 
	(5)启动filebeat实例
[root@elk1 filebeat-7.17.5-linux-x86_64]# ./filebeat -e -c config/08-log_tomcat-to-console.yaml
2.5.6. input插件之log: 采集-tomcat的启动日志中错误日志,多行匹配案例
https://www.elastic.co/guide/en/beats/filebeat/7.17/multiline-examples.html
9 采集tomcat的错误日志多行匹配案例
[root@elk1 filebeat-7.17.5-linux-x86_64]# cat > config/09-log-tomcat_error-to-es.yaml <<EOF
filebeat.inputs:
- type: log
  paths:
    - /data/tools/tomcat/apache-tomcat-9.0.91/logs/catalina*
  multiline.type: pattern
  multiline.pattern: '^\d{2}'
  multiline.negate: true
  multiline.match: after

# 指定输出端为ES集群
output.elasticsearch:
  hosts: ["http://10.0.0.101:9200","http://10.0.0.102:9200","http://10.0.0.103:9200"] 
EOF

#参数解释:
negate英语翻译是取反
multiline.negate: false|true, flase表匹配,true表示不匹配
multiline.match:before|after
用法说明:
1.当multiline.negate为false时:
multiline.match为after  表示 【匹配的行】 会被放到 上一个【不匹配的行】 【后】,形成一行
multiline.match为before 表示 【匹配的行】 会被放到 下一个【不匹配的行】 【前】,形成一行
2.当multiline.negate为true时:
multiline.match为after  表示 【不匹配的行】 会被放到 上一个【匹配的行】 【后】,形成一行
multiline.match为before 表示 【不匹配的行】 会被放到 下一个【匹配的行】 【前】,形成一行

#启动filebeat
[root@elk1 filebeat-7.17.5-linux-x86_64]# ./filebeat -e -c config/09-log-tomcat_error-to-es.yaml

2.6. input插件之filestream(替代log插件)

2.6.1. input插件之filestream: output到console
11 filebeat的input类型之filestream实战案例:
[root@elk1 filebeat-7.17.5-linux-x86_64]# ]# cat config/11-filestream-to-console.yaml
filebeat.inputs:
  # 指定类型为filestream,在7.16版本中已经弃用log类型
- type: filestream
  enabled: false 
  paths:
    - /tmp/logtest/1.log
  parsers:
    #配置解析多行模式
    - multiline:
        type: pattern
        pattern: '^\['
        negate: true
        match: after

- type: filestream
  enabled: true 
  paths:
    - /tmp/logtest/student.log
  # 配置解析
  parsers:
    # 配置json格式解析
    - ndjson:
        # 将错误消息记录到error字段中
        add_error_key: true
        # 如果解析的json格式字段和filebeat内置的顶级字段冲突,则覆盖,默认是不覆盖的。
        overwrite_keys: true
        # 将message解析的字段放入一个自定义的字段下。若不指定该字段,则默认解析的键值对会在顶级字段.
        target: "student"

output.console:
  pretty: true
EOF

 [root@elk1 filebeat-7.17.5-linux-x86_64]# ./filebeat -e -c config/11-filestream-to-console.yaml  
2.6.2. input插件之filestream,output到logstash
#input插件之filestream-收集ningx日志,output的logstash插件发送到logstash
[root@elk1filebeat-7.17.5-linux-x86_64]# cat > config/15-filestream-nginx-to-logstash.yaml <<EOF
filebeat.inputs:
  # 指定类型为filestream,在7.16版本中已经弃用log类型
- type: filestream
  enabled: true 
  paths:
    - /var/log/nginx/access.log*
  # 配置解析
  parsers:
    # 配置json格式解析
    - ndjson:
        # 将错误消息记录到error字段中
        add_error_key: true
        # 如果解析的json格式字段和filebeat内置的顶级字段冲突,则覆盖,默认是不覆盖的。
        overwrite_keys: true

# 将数据输出到logstash中
output.logstash:
  # 指定logstash的主机和端口
  hosts: ["10.0.0.101:8888"]
EOF
[root@elk103.oldboyedu.com filebeat-7.17.5-linux-x86_64]# 
[root@elk103.oldboyedu.com filebeat-7.17.5-linux-x86_64]# ./filebeat -e -c config/15-filestream-nginx-to-logstash.yaml

2.7. input插件之container: 采集docker日志

10 使用filebeat采集docker日志
	(1)安装docker
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sed -i 's+download.docker.com+mirrors.aliyun.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo
yum makecache fast
yum -y install docker-ce docker-compose

	(2)配置docker的镜像加速,启动服务
[root@elk1]# cat > /etc/docker/daemon.json <<EOF
{
  "registry-mirrors": ["https://2k3sfxf3.mirror.aliyuncs.com"]
}
EOF

[root@elk1 ~]# systemctl enable --now docker


	(3)下载nginx镜像
docker run -dp 88:80 --name mynginx --restart always nginx:alpine
docker run -dp 89:8080 --name mytomcat --restart always  tomcat:jre8-alpine


	(4)使用filebeat采集容器日志
方式一:(此方法从[7.2.0]版本开始已弃用)
[root@elk1 filebeat-7.17.5-linux-x86_64]# cat >config/10-docker-to-console.yaml <<EOF
filebeat.inputs:
  # 指定输入类型为docker类型
- type: docker
  # 指定容器的ID
  containers.ids: 
    - '*'

output.console:
  pretty: true
EOF

方式二:(推荐使用)
[root@elk1 filebeat-7.17.5-linux-x86_64]# cat >config/10-docker-to-console.yaml <<EOF
filebeat.inputs:
- type: container
  paths: 
    - '/var/lib/docker/containers/*/*.log'

output.console:
  pretty: true
EOF

(5)启动filebeat实例
 [root@elk1 filebeat-7.17.5-linux-x86_64]# ./filebeat -e -c config/10-docker-to-console.yaml

2.8. output插件之file-将数据写入到本地文件案例

12 将数据写入到本地文件案例
[root@elk1 filebeat-7.17.5-linux-x86_64]# cat > config/12-stdin-to-file.yaml <<EOF
filebeat.inputs:
- type: stdin

# 指定输出的类型为本地文件
output.file:
  # 指定文件存储的路径
  path: "/tmp/tom/"
  # 指定文件的名称
  filename: stdin.log
EOF

[root@elk1 filebeat-7.17.5-linux-x86_64]# ./filebeat -e -c config/12-stdin-to-file.yaml

2.9. output插件之elasticsearch:写入数据到ES集群

13 写入数据到ES集群
[root@elk1 filebeat-7.17.5-linux-x86_64]# cat > config/13-filestream-to-es.yaml <<EOF
filebeat.inputs:
- type: filestream
  enabled: true
  paths:
    - /tmp/logtest/shopping.json
  parsers:
    - ndjson:
       add_error_key: true
       overwrite_keys: true

output.elasticsearch:
  # 指定ES集群地址
  hosts: 
  - "http://10.0.0.101:9200"
  - "http://10.0.0.102:9200"
  - "http://10.0.0.103:9200"
  # 指定索引
  index: "shopping-%{+yyyy.MM.dd}"
  #连接es的用户名密码
  username: "filebeat-user"
  password: "123456"

# 禁用索引声明管理周期,若不禁用则自动忽略自定义索引名称
setup.ilm.enabled: false
# 设置索引模板的名称
setup.template.name: "shopping"
# 指定索引模板的匹配模式
setup.template.pattern: "shopping-*"
# 是否覆盖原有的索引模板
setup.template.overwrite: true
# 设置索引模板
setup.template.settings:
  # 指定分片数量为8
  index.number_of_shards: 8
  # 指定副本数量为0
  index.number_of_replicas: 0
EOF
[root@elk1 filebeat-7.17.5-linux-x86_64]#  ./filebeat -e -c config/13-filestream-to-es.yaml 

2.10. output插件之elasticsearch:将多个数据源写入到ES集群不同索引

14 将多个数据源写入到ES集群不同索引
[root@elk1 filebeat-7.17.5-linux-x86_64]# cat > config/14-filestream-indices-to-es.yaml <<EOF
filebeat.inputs:
- type: filestream
  enabled: true
  tags: "docker"
  paths:
    - /tmp/logtest/docker.json
  parsers:
    - ndjson:
       add_error_key: true
       overwrite_keys: true

- type: filestream
  enabled: true
  tags: "linux"
  paths:
    - /tmp/logtest/linux.log
  parsers:
    #配置解析多行模式
    - multiline:
        type: pattern
        pattern: '^\['
        negate: true
        match: after

output.elasticsearch:
  hosts: 
  - "http://10.0.0.101:9200"
  - "http://10.0.0.102:9200"
  - "http://10.0.0.103:9200"
  #连接es的用户名密码
  username: "filebeat-user"
  password: "123456"
  indices:
     - index: "tom-docker-%{+yyyy.MM.dd}"
       when.contains:
         tags: "docker"
     - index: "tom-linux-%{+yyyy.MM.dd}"
       when.contains:
         tags: "linux"

setup.ilm.enabled: false
setup.template.name: "tom"
setup.template.pattern: "tom-*"
setup.template.overwrite: true
setup.template.settings:
  index.number_of_shards: 3
  index.number_of_replicas: 0
EOF
[root@elk1 filebeat-7.17.5-linux-x86_64]# filebeat -e -c config/14-filestream-indices-to-es.yaml 

2.11. output插件之kafka

filebeat将数据写入到Kafka实战:
[root@elk101 filebeat-7.17.5-linux-x86_64]# cat > config/17-stdin-to-kafka.yaml <<EOF
filebeat.inputs:
- type: stdin

# 将数据输出到kafka
output.kafka:
  # 指定kafka主机列表
  hosts:
  - 10.0.0.101:9092
  - 10.0.0.102:9092
  - 10.0.0.103:9092
  # 指定kafka的topic
  topic: "topic-1"
EOF

[root@elk101 filebeat-7.17.5-linux-x86_64]# ./filebeat -e -c config/17-stdin-to-kafka.yaml

3. config.inputs插件:包含多个子配置文件


filebeat.config.inputs:
  enabled: true
  #指定子配置文件的路径
  path: configs/*.yaml
  #是否实时重载,配置文件变化时,不需要重启filebeat
  reload.enabled: true
  #实时重载扫描间隔时间
  reload.period: 10s

]# cat filebeat.yml
filebeat.config.inputs:
  enabled: true
  #指定子配置文件的路径
  path: configs/*.yaml
  #是否实时重载,配置文件变化时,不需要重启filebeat
  reload.enabled: true
  #实时重载扫描间隔时间
  reload.period: 10s
[root@elk1 filebeat-7.17.5-linux-x86_64]# tree config/
config/
├── 01-stdin-to-console.yaml
├── 02-tcp-to-console.yaml
├── 04-log-to-console.yaml

  

  • 9
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
当然!我可以为您提供关于Filebeat的基础教程Filebeat是一个轻量级的日志传输工具,用于将日志数据从各种来源(如文件、系统日志等)发送到目标位置(如Elasticsearch、Logstash等)。下面是Filebeat的基本步骤: 1. 安装和配置Filebeat:首先,您需要从Elasticsearch官方网站下载并安装Filebeat安装完成后,您需要编辑Filebeat配置文件(filebeat.yml)以指定您要监控和传输的日志来源。 2. 配置日志来源:在配置文件中,您需要定义要监控的日志文件路径或其他来源。例如,使用`paths`参数指定要监控的文件路径,或者使用`syslog`模块来监听系统日志。 3. 配置目标位置:您还需要定义日志数据的目标位置。可以将数据发送到Elasticsearch、Logstash等。在配置文件中,您需要指定输出选项,如输出类型、主机和端口等。 4. 启动Filebeat:完成配置后,您可以启动Filebeat。它将按照您的配置监控和传输日志数据。 5. 可选步骤:根据您的需求,您还可以进行其他一些配置,如启用安全特性、定义数据处理和过滤规则等。 通过以上步骤,您就可以使用Filebeat来传输和管理日志数据了。请注意,这只是Filebeat的基础教程,您还可以深入学习更多高级功能和配置选项。 希望这个简单的教程对您有所帮助!如果您需要了解更多细节或有其他问题,请随时告诉我。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值