ELK日志分析系统之Kibana7.x最新版安装与配置

3、Kibana的简介

Kibana 让您能够自由地选择如何呈现自己的数据。Kibana 核心产品搭载了一批经典功能:柱状图、线状图、饼图、旭日图等等。

3.1、软件包下载地址:https://www.elastic.co/cn/downloads/kibana

3.1.1 软件包tar压缩包,解压到/application目录中,并创建链接文件。

ln -s /application/kibana-7.3.2-linux-x86_64 /application/kibana

3.2、配置Kibana服务的配置文件/application/kibana/config/kibana.yml

# Kibana is served by a back end server. This setting specifies the port to use.
server.port: 5601   #kibana端口

# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is ‘localhost‘, which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
server.host: "10.0.0.169"    #绑定的主机IP地址

# Enables you to specify a path to mount Kibana at if you are running behind a proxy.
# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
# from requests it receives, and to prevent a deprecation warning at startup.
# This setting cannot end in a slash.
#server.basePath: ""

# Specifies whether Kibana should rewrite requests that are prefixed with
# `server.basePath` or require that they are rewritten by your reverse proxy.
# This setting was effectively always `false` before Kibana 6.3 and will
# default to `true` starting in Kibana 7.0.
#server.rewriteBasePath: false

# The maximum payload size in bytes for incoming server requests.
#server.maxPayloadBytes: 1048576

# The Kibana server‘s name.  This is used for display purposes.
#server.name: "your-hostname"

# The URLs of the Elasticsearch instances to use for all your queries.
elasticsearch.hosts: ["http://10.0.0.169:9200"]      #elasticsearch的主机IP

# When this setting‘s value is true Kibana uses the hostname specified in the server.host
# setting. When the value of this setting is false, Kibana uses the hostname of the host
# that connects to this Kibana instance.
#elasticsearch.preserveHost: true

# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
# dashboards. Kibana creates a new index if the index doesn‘t already exist.
kibana.index: ".kibana"     #开启此选项

# The default application to load.
#kibana.defaultAppId: "home"

# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
#elasticsearch.username: "kibana"
#elasticsearch.password: "pass"

# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
# These settings enable SSL for outgoing requests from the Kibana server to the browser.
#server.ssl.enabled: false
#server.ssl.certificate: /path/to/your/server.crt
#server.ssl.key: /path/to/your/server.key

# Optional settings that provide the paths to the PEM-format SSL certificate and key files.
# These files validate that your Elasticsearch backend uses the same key files.
#elasticsearch.ssl.certificate: /path/to/your/client.crt
#elasticsearch.ssl.key: /path/to/your/client.key

# Optional setting that enables you to specify a path to the PEM file for the certificate
# authority for your Elasticsearch instance.
#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]

# To disregard the validity of SSL certificates, change this setting‘s value to ‘none‘.
#elasticsearch.ssl.verificationMode: full

# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of
# the elasticsearch.requestTimeout setting.
#elasticsearch.pingTimeout: 1500

# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
# must be a positive integer.
#elasticsearch.requestTimeout: 30000

# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
# headers, set this value to [] (an empty list).
#elasticsearch.requestHeadersWhitelist: [ authorization ]

# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.
#elasticsearch.customHeaders: {}

# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
#elasticsearch.shardTimeout: 30000

# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
#elasticsearch.startupTimeout: 5000

# Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
#elasticsearch.logQueries: false

# Specifies the path where Kibana creates the process ID file.
#pid.file: /var/run/kibana.pid

# Enables you specify a file where Kibana stores log output.
#logging.dest: stdout

# Set the value of this setting to true to suppress all logging output.
#logging.silent: false

# Set the value of this setting to true to suppress all logging output other than error messages.
#logging.quiet: false

# Set the value of this setting to true to log all events, including system usage information
# and all requests.
#logging.verbose: false

# Set the interval in milliseconds to sample system and process performance
# metrics. Minimum is 100ms. Defaults to 5000.
#ops.interval: 5000

# Specifies locale to be used for all localizable strings, dates and number formats.
# Supported languages are the following: English - en , by default , Chinese - zh-CN .
i18n.locale: "zh-CN"     #kibana默认文字是英文,变更成中文

3.3、启动kibana

如果使用root用户启动服务,后面必须加--allow-root选项。

[[email protected]_ansible ~]# /application/kibana/bin/kibana --allow-root

3.4、通过浏览器访问地址:http://10.0.0.169:5601

由上述可知,kibana服务安装和配置成功。

3.5、通过访问kibana浏览器,我们可以直接在需要收集日志的主机上安装Beats软件,不需要安装Logstash软件包。

通过配置Beats服务的配置文件,来收集不同服务的日志。

3.5.1、例收集本机的系统日志文件

1

下载并安装 Filebeat

 curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-7.3.2-x86_64.rpm
sudo rpm -vi filebeat-7.3.2-x86_64.rpm

步骤 2

编辑配置

修改 /etc/filebeat/filebeat.yml 以设置连接信息:

output.elasticsearch:
  hosts: ["<es_url>"]
  username: "elastic"
  password: "<password>"
setup.kibana:
  host: "<kibana_url>" 

其中,<password> 是 elastic 用户的密码,<es_url> 是 Elasticsearch 的 URL,<kibana_url> 是 Kibana 的 URL。

步骤 3

启用和配置 system 模块

sudo filebeat modules enable system

在 /etc/filebeat/modules.d/system.yml 文件中修改设置。

步骤 4

启动 Filebeat

setup 命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。

sudo filebeat setup
sudo service filebeat start

未完成步骤

模块状态

确认已从 Filebeat system 模块成功收到数据


完成所有步骤后,您便可以随时浏览自己的数据。

3.6、在kibana服务中,可以根据收集不同的日志,在不同的主机上安装rpm包。具体详情如下:

原文地址:https://www.cnblogs.com/eeexu123/p/11608669.html

时间: 2024-07-30 18:06:22

ELK日志分析系统之Kibana7.x最新版安装与配置的相关文章

ELK日志分析系统 介绍 安装配置

ELK日志分析系统 一.ELK介绍 ELK顾名思义:是由Elasticsearch,Logstash 和 Kibana三部分组成的. 其中Elasticsearch 是一个实时的分布式搜索和分析引擎,它可以用于全文搜索,结构化搜索以及分析.它是一个建立在全文搜索引擎 Apache Lucene 基础上的搜索引擎,使用 Java 语言编写.目前,最新的版本是 5.4. 主要特点 实时分析 分布式实时文件存储,并将每一个字段都编入索引 文档导向,所有的对象全部是文档 高可用性,易扩展,支持集群(Cl

ELK日志分析系统搭建配置

我们主要用ELK日志分析系统来分析Nginx访问日志,mysql慢查询日志,tomcat运行日志以及系统日志等. 介绍:ELK:ElasticSearch+LogStash+Kibana=ElkStackElasticSearch:存储.收索.分析(可以用solr替代)LogStash:收集器,输入,处理分析,存储到ESKibana:展示备注:ElasticSearch支持集群功能,日志收集后会在每个节点存放一份(可以选择) 1.安装jdkwget http://sg-new.oss-cn-ha

elk 日志分析系统Logstash+ElasticSearch+Kibana4

elk 日志分析系统 Logstash+ElasticSearch+Kibana4 logstash 管理日志和事件的工具 ElasticSearch 搜索 Kibana4 功能强大的数据显示客户端 redis 缓存 安装包 logstash-1.4.2-1_2c0f5a1.noarch.rpm elasticsearch-1.4.4.noarch.rpm logstash-contrib-1.4.2-1_efd53ef.noarch.rpm kibana-4.0.1-linux-x64.tar

十分钟搭建和使用ELK日志分析系统

前言 为满足研发可视化查看测试环境日志的目的,准备采用EK+filebeat实现日志可视化(ElasticSearch+Kibana+Filebeat).题目为"十分钟搭建和使用ELK日志分析系统"听起来有点唬人,其实如果单纯满足可视化要求,并且各软件都已经下载到本地,十分钟是可以搭建一个ELK系统的.本文介绍如何快速安装.配置.使用EK+FILEBEAT去实现日志搜集.本文中没有使用LOGSTASH做日志搜集过滤,但为了后期需要先进行了安装. 工作原理 ElasticSearch:是

在CentOS7中部署ELK日志分析系统

在CentOS7中部署ELK日志分析系统 ELK原理介绍 什么是ELK ELK是三个开源软件的缩写,分别表示:Elasticsearch , Logstash, Kibana , 它们都是开源软件.新增了一个FileBeat,它是一个轻量级的日志收集处理工具(Agent),Filebeat占用资源少,适合于在各个服务器上搜集日志后传输给Logstash,官方也推荐此工具. Elasticsearch是实时全文搜索和分析引擎,提供搜集.分析.存储数据三大功能:是一套开放REST和JAVA API等

基于Docker容器部署ELK日志分析系统

部署ELK日志分析系统,比较消耗计算机硬件,如果使用虚拟机进行测试部署,建议分配较多的硬件资源,否则,当elk容器运行后,会使其无法正常运行.我这里将分配给docker主机5G内存,四个CPU. 一.环境准备 我这里使用一台docker主机(如需要部署docker服务,可以参考博文:Docker的安装详细配置),其IP地址为192.168.20.6,在其之上运行elk容器. 二.配置docker主机运行elk容器 [[email protected] ~]# echo "vm.max_map_c

ELK日志分析系统(实例!!!)

ELK日志分析系统概述 ELK是Elasticsearch.Logstash.Kibana的简称 Elasticsearch是实时全文搜索和分析引擎 Logstash是一个用来搜集.分析.过滤日志的工具 Kibana是一个基于Web的图形界面,用于搜索.分析和可视化存储在 Elasticsearch指标中的日志数据 日志服务器 提高安全性 集中存放日志 缺陷:对日志的分析困难 ELK日志分析系统 收集数据:LogstashAgent 建立索引:ElasticSearchCluster 数据可视化

ELK日志分析系统(理论+部署)

ELK日志分析系统简介 日志服务器 提高安全性 集中存放日志 缺陷 对日志的分析困难 ELK日志分析系统 Elasticsearch Logstash Kibana 日志处理步骤 将日志进行集中化管理 将日志格式化( Logstash )并输出到Elasticsearch 对格式化后的数据进行索弓|和存储( Elasticsearch ) 前端数据的展示( Kibana ) Elasticsearch介绍 Elasticsearch的概述 提供了一个分布式多用户能力的全文搜索弓|擎 Elasti

ELK日志分析系统(实战!)

简介 日志服务器 提高安全性集中存放日志缺陷:对日志的分析困难 ELK日志分析系统 Elasticsearch:存储,索引池 Logstash:日志收集器Kibana:数据可视化 日志处理步骤 1,将日志进行集中化管理2,将日志格式化(Logstash)并输出到Elasticsearch3,对格式化后的数据进行索引和存储(Elasticsearch)4,前端数据的展示(Kibana) Elasticsearch的概述 提供了一个分布式多用户能力的全文搜索引擎 Elasticsearch的概念 接