搭建elk环境并接入frostmourne,实现监控报警效果(五)

#修改权限目录,id 1000的账号

chown -R meng.meng data*

chmod -R 777 data*

#docker-compose.yaml

复制代码
version: '3.8'
services:
  filebeat:
    # 镜像名称
    image: docker.elastic.co/beats/filebeat:8.6.0
    # 容器名称
    hostname: filebeat
    container_name: filebeat
    #ports:
    #  - 5044:5044
    volumes:
      - /data/elk_monitor/filebeat:/usr/share/filebeat
#      - /var/log/messages:/var/log/messages
      - /data/logs:/data/logs
    networks:
      - meta 
    deploy:
      replicas: 1
networks:
  meta:
    external: true # 用已经创建好的网络

#启动

docker-compose up -d

#测试

复制代码
setup.kibana:
  host: "192.168.10.14:5601"

output.elasticsearch.allow_older_versions: true
filebeat.inputs:
- input_type: log
  paths:
    - /data/logs/t1.log
  json.keys_under_root: true
  json.overwrite_keys: true
  fields:
    index: 't1_history'

- input_type: log
  paths:
    - /data/logs/t2.log
  json.keys_under_root: true
  json.overwrite_keys: true
  fields:
    index: 't2_history'

output.elasticsearch:
  hosts: ["192.168.10.14:9200"]
  username: "elastic"
  password: "vsUZGKNvjWRtTKPmDG"110120  
  indices:
    - index: "t1_history"
      when.contains:
        fields:
          index: "t1_history"
    - index: "t2_history"
      when.contains:
        fields:
          index: "t2_history"
相关推荐
CodeGL15 分钟前
10、Python基础之进程和线程
开发语言·python
TechWayfarer1 小时前
PHP漏洞被利用,怎么揪出攻击IP?
开发语言·python·tcp/ip·网络安全·php
卡卡~~3 小时前
“101计划”核心课程实践教材《数据实验结构指导-C++语言版》题目集
开发语言·c++·学习·算法
qq_406981033 小时前
大白话rust系列09 函数调用两次有什么错?
开发语言·python·rust
学逆向的3 小时前
C 多文件开发
c语言·开发语言·网络安全
布吉岛的石头3 小时前
Java 程序员第 50 阶段3:数据工程:预训练语料清洗与去重
java·开发语言·人工智能·深度学习·transformer
benchmark_cc3 小时前
QuantDash 安装成功后,如何验证 Python 环境可以正常导入 SDK?
开发语言·python·数据分析·pandas·量化交易·股票数据·quantdash
学逆向的4 小时前
C 内存属性
c语言·开发语言·算法·网络安全
HAPPY酷5 小时前
C++ 自定义内存池优化点云处理:从裸指针到 RAII 自动回收
开发语言·c++