yum安装Logstash

DevOps ELK评论1,769字数 639阅读2分7秒阅读模式

下载rpm包

[root@ip-172-31-0-46 ~]# wget https://artifacts.elastic.co/downloads/logstash/logstash-7.17.0-x86_64.rpm

安装rpm包

[root@ip-172-31-0-46 ~]# yum install -y logstash-7.17.0-x86_64.rpm

添加日志拉取

[root@ip-172-31-0-46 ~]# cd /etc/logstash/conf.d/
root@ip-172-31-0-46 conf.d]# vim puff-gateserver.conf
input {
  file {
    path => "/workspace/puffserver/puffdeploy/puff-488/logs/gateserver.log"
    path => "/workspace/puffserver/puffdeploy/puff-488/logs/gateserver.log.err"
  }
}

output {
  elasticsearch {
    hosts => ["http://10.98.211.174:9200"]
    index => "puff-gateserver-%{+YYYY.MM.dd}"
    user => "elastic"
    password => "c-{vq%oEddad_mq;>1Op99"
  }
}

启动Logstash

[root@ip-172-31-0-46 conf.d]# systemctl start logstash

 

DevOps
  • 本文由 发表于 2022年11月30日 11:31:24
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
  • Logstash
EFK集群[案例] ELK

EFK集群[案例]

Elasticsearch集群配置信息 硬件配置信息 机器名/节点名 IP 内存 cpu 磁盘 us...
python定时清理ES 索引 ELK

python定时清理ES 索引

只保留三天 #!/usr/bin/env python3 # -*- coding:utf-8 -*- import os import datetime # 时间转化为字符串 n...
评论  0  访客  0

发表评论