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选项。
[root@harlan_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、例收集本机的系统日志文件
下载并安装 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
编辑配置
修改 /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。
启用和配置 system 模块
sudo filebeat modules enable system
在 /etc/filebeat/modules.d/system.yml
文件中修改设置。
启动 Filebeat
setup
命令加载 Kibana 仪表板。如果仪表板已设置,请省略此命令。
sudo filebeat setup
sudo service filebeat start
模块状态
确认已从 Filebeat system
模块成功收到数据
完成所有步骤后,您便可以随时浏览自己的数据。
原文地址:https://www.cnblogs.com/eeexu123/p/11608669.html
- 革了短信的命之后,微信开始把枪口对准了应用市场
- 建构微服务的第一步: 微服务哪里来?
- 最新机器学习必备十大入门算法!都在这里了
- ASP.NET MVC的Razor引擎:IoC在View激活过程中的应用
- 深度学习笔记:深度学习在计算机视觉的应用
- 快速添加永久存储到到Minishift / CDK 3
- 张小龙发布2018微信全新计划(内附演讲全文)
- 使用JClouds在Java中获取和发布云服务器
- 利用ASP.NET SiteMap生成与Bootstrap"兼容"菜单
- 埃隆·马斯克强烈推荐的5本书,看完之后他开始改变世界
- 算法:AOE网(Activity On edge Network)与关键路径简介
- ASP.NET Core的配置(4):多样性的配置来源[中篇]
- ASP.NET MVC的Razor引擎:RazorViewEngine
- 算法:求解AOE网的关键路径
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- PHP中quotemeta()函数的用法讲解
- 微信公众号实现扫码获取微信用户信息(网页授权)
- 实例说明js脚本语言和php脚本语言的区别
- 在Ubuntu 18.04上安装PHP 7.3 7.2和7.0的方法
- PHP7匿名类的用法示例
- laravel配置Redis多个库的实现方法
- PHP中Static(静态)关键字功能与用法实例分析
- 详解PHP 二维数组排序保持键名不变
- 详解PHP的抽象类和抽象方法以及接口总结
- keras的ImageDataGenerator和flow()的用法说明
- python 识别登录验证码图片功能的实现代码(完整代码)
- Laravel事件监听器用法实例分析
- iOS 性能优化实践:头条抖音如何实现 OOM 崩溃率下降50%+
- PHP join()函数用法与实例讲解
- Laravel框架实现的使用smtp发送邮件功能示例