AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-576716

Kumar's questions

Martin Hope
Kumar
Asked: 2020-05-28 07:48:11 +0800 CST

使用 beats 将日志从应用程序服务器发送到 ELK 服务器

  • 0

我正在为生产环境构建日志分析器。我的场景是,我需要在一台要使用 ELK 服务器的 centos7 服务器上设置elasticsearch、Logstash 和 kibana,另一台是 apache 服务器(远程服务器)。

我已经配置了以下

(i).ELK 服务器 - elasticsearch,kibana,logstash 和 nginx 代理

(ii).Application server(apache server)-在apache服务器上安装beats

(i).ELK服务器配置

弹性搜索配置

vi /etc/elasticsearch/elasticsearch.yml

network.host: 本地主机

http.port: 9200

Kibana 仪表板配置

vi /etc/kibana/kibana.yml

server.port: 5601
server.host: "localhost"
elasticsearch.hosts: ["http://localhost:9200"]

Nginx 配置:

server {
listen 80;
server_name 172.xx.xx.xx;
location / {
    proxy_pass http://localhost:5601;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
  }
}

Logstash 配置

猫 /etc/logstash/conf.d/02-beats-input.conf

input {
  beats {
  port => 5044
 }
}

我也配置了过滤器部分..

猫 /etc/logstash/conf.d/30-elasticsearch-output.conf

output {
 elasticsearch {
  hosts => ["localhost:9200"]
  sniffing => true
  manage_template => false
  index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
 }
}

ii) 应用服务器 Beats 配置

我已经在应用程序服务器中安装了 beats 并使用 logstash 发送日志。

文件节拍配置:

猫 /etc/filebeat/filebeat.yml

output.logstash:
   #the logstash hosts
hosts: ["172.xx.xx.xx:5044"]

在这里,我不确定如何在 kibana 中加载 filebeat 索引模板、索引和仪表板。当我尝试从 apache 服务器运行“filebeat setup”命令时,出现以下错误。

[root@webserver ~]# filebeat setup
Exiting: Index management requested but the Elasticsearch output is not configured/enabled.

我知道如果我用 elasticsearch 输出配置 filebeat,我可以将索引直接加载到 kibana。但我不希望 apache 服务器直接与 elasticsearch 联系。

有人可以建议我如何将“索引、索引模板和仪表板”直接从 apache 服务器加载到 kibana,同时配置节拍输出到 logstash。

我搜索了很多网站,但没有得到任何答案。是否有任何其他替代方法(如导入方法)在 kibana 和 elk 服务器中加载 apache 服务器 filebeat indexe。

我渴望等待有人为此提供解决方案。

谢谢

库马尔

elk logstash
  • 1 个回答
  • 849 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve