kibana(一)

一、概念理解

kibana 可以理解成一个图形化展示es 的一个web前台。连接好了es后就可以按照自己的要求展示es里面的数据

二、简单使用

  • 启动kibana

    配置kibana的配置文件

    默认是不能用root启动的,如果要使用root账户启动,就加一个 --allow-root 参数,一般会有报错提示。所以一般就用es账号启动。使用非root账号启动时,记得给文件夹用户的权限。

    ./kibana & 让kibana 在后台运行,最好使用绝对路径启动,方便看到kibana的node进程。

  • 关闭kibana

    使用 ps -ef | grep node 查看 pid,我这里看到的是用es账号启动的进程,再用 netstat -anutp | grep 5601 查看后面pid,对比确认。kill 杀掉即可。

    ps -ef | grep kibana 也可以查看kibana的进程

三、配置文件详解

kibana 配置文件

elasticsearch.hosts: ["http://localhost:9200"]			#重要的配置,kibana连接es服务的配置
server.host: "0.0.0.0"								  #允许远程用户连接						
server.port: 5601									  #默认端口号
i18n.locale: "zh-CN"								  #配置web界面显示中文

#elasticsearch.username: "kibana"						#设置登录的用户名
#elasticsearch.password: "pass"							#设置登录的密码

# Kibana由后端服务器提供服务。此设置指定要使用的端口。
server.port: 5601

#指定Kibana服务器要绑定的地址。IP地址和主机名都是有效值。
#默认是“localhost”,这通常意味着远程机器无法连接。
#若要允许来自远程用户的连接,请将此参数设置为非环回地址。
server.host: "0.0.0.0"

#允许您指定mount Kibana的路径,如果您在代理后运行。
# Use the `server.rewriteBasePath` setting to tell Kibana if it should remove the basePath
#使用“服务器”。重写basePath的设置,告诉Kibana是否应该移除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
#指定Kibana是否应该重写带前缀的请求
# `server.basePath` or require that they are rewritten by your reverse proxy.
#服务器或要求它们由反向代理重写。
# This setting was effectively always `false` before Kibana 6.3 and will
#在Kibana 6.3和will之前,这个设置实际上总是“false”
# default to `true` starting in Kibana 7.0.
#Kibana 7.0默认为“true”。
#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.
#Kibana服务器的名字。它用于显示目的。
#server.name: "your-hostname"

# The URLs of the Elasticsearch instances to use for all your queries.
#用于所有查询的Elasticsearch实例的url。
elasticsearch.hosts: ["http://192.168.0.140:9200"]

# When this setting's value is true Kibana uses the hostname specified in the server.host
#当此设置的值为true时,Kibana使用server.host中指定的主机名
# setting. When the value of this setting is false, Kibana uses the hostname of the host
#设置。当该设置的值为false时,Kibana使用主机的主机名
# that connects to this Kibana instance.
#连接到这个Kibana实例。
#elasticsearch.preserveHost: true

# Kibana uses an index in Elasticsearch to store saved searches, visualizations and
#Kibana在Elasticsearch中使用索引来存储已保存的搜索、可视化和
# dashboards. Kibana creates a new index if the index doesn't already exist.
#仪表盘。如果索引不存在,Kibana会创建一个新索引。
#kibana.index: ".kibana"

# The default application to load.
#要加载的默认应用程序。
#kibana.defaultAppId: "home"

# If your Elasticsearch is protected with basic authentication, these settings provide
#如果您的Elasticsearch被基本身份验证保护,这些设置提供
# the username and password that the Kibana server uses to perform maintenance on the Kibana
#Kibana服务器用于对Kibana执行维护的用户名和密码
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
#启动时的索引。Kibana用户仍然需要使用Elasticsearch进行身份验证
# is proxied through the Kibana server.
#通过Kibana服务器代理。
#elasticsearch.username: "kibana"
#elasticsearch.password: "pass"

# Enables SSL and paths to the PEM-format SSL certificate and SSL key files, respectively.
#分别启用SSL和PEM-format SSL证书和SSL密钥文件的路径。
# These settings enable SSL for outgoing requests from the Kibana server to the browser.
##这些设置为Kibana服务器向浏览器发出的请求启用了SSL。
#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.
#可选设置,提供通往PEM-format SSL证书和密钥文件的路径。
# These files are used to verify the identity of Kibana to Elasticsearch and are required when
#这些文件用于验证Kibana的身份,以Elasticsearch和需要
# xpack.security.http.ssl.client_authentication in Elasticsearch is set to required.
#xpack.security.http.ssl。在Elasticsearch中将client_authentication设置为required。
#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
#可选设置,允许您指定证书的PEM文件的路径
# authority for your Elasticsearch instance.
#为您的Elasticsearch实例设置#权限。
#elasticsearch.ssl.certificateAuthorities: [ "/path/to/your/CA.pem" ]

# To disregard the validity of SSL certificates, change this setting's value to 'none'.
#若要忽略SSL证书的有效性,请将此设置的值更改为“none”。
#elasticsearch.ssl.verificationMode: full

# Time in milliseconds to wait for Elasticsearch to respond to pings. Defaults to the value of
#等待Elasticsearch响应ping的时间(毫秒)。默认值
# the elasticsearch.requestTimeout setting.
#elasticsearch。requestTimeout设置。
#elasticsearch.pingTimeout: 1500

# Time in milliseconds to wait for responses from the back end or Elasticsearch. This value
#等待后端或Elasticsearch响应的时间(毫秒)。这个值
# must be a positive integer.
#必须是正整数。
#elasticsearch.requestTimeout: 30000

# List of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
#Kibana客户端头的列表发送到Elasticsearch。发送*no*客户端
# headers, set this value to [] (an empty list).
#headers,将此值设置为[](空列表)。
#elasticsearch.requestHeadersWhitelist: [ authorization ]

# Header names and values that are sent to Elasticsearch. Any custom headers cannot be overwritten
#发送到Elasticsearch的标题名称和值。不能覆盖任何自定义标头
# by client-side headers, regardless of the elasticsearch.requestHeadersWhitelist configuration.
#由客户端头,而不考虑elasticsearch。requestHeadersWhitelist配置。
#elasticsearch.customHeaders: {}

# Time in milliseconds for Elasticsearch to wait for responses from shards. Set to 0 to disable.
#Elasticsearch等待碎片响应的时间(毫秒)。设置为0为禁用。
#elasticsearch.shardTimeout: 30000

# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.
#在Kibana启动之前等待Elasticsearch的时间(毫秒)。
#elasticsearch.startupTimeout: 5000

# Logs queries sent to Elasticsearch. Requires logging.verbose set to true.
#记录发送到Elasticsearch的查询。需要记录。verbose设置为true
#elasticsearch.logQueries: false

# Specifies the path where Kibana creates the process ID file.
#指定Kibana创建进程ID文件的路径
#pid.file: /var/run/kibana.pid

# Enables you specify a file where Kibana stores log output.
#允许指定Kibana存储日志输出的文件
#logging.dest: stdout

# Set the value of this setting to true to suppress all logging output.
#将此设置的值设置为true以禁止所有日志记录输出。
#logging.silent: false

# Set the value of this setting to true to suppress all logging output other than error messages.
#将此设置的值设置为true以禁止除错误消息外的所有日志记录输出。
#logging.quiet: false

# Set the value of this setting to true to log all events, including system usage information
#将此设置的值设置为true以记录所有事件,
# and all requests.
#包括系统使用信息
#logging.verbose: false

# Set the interval in milliseconds to sample system and process performance
#设置以毫秒为单位的时间间隔来采样系统和进程性能
# metrics. Minimum is 100ms. Defaults to 5000.
#指标。最低是100 ms。默认为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 .
#支持的语言如下:English - en,默认情况下,Chinese - chu - cn。
i18n.locale: "zh-CN"
posted @ 2021-12-27 23:05  风风羊  阅读(187)  评论(0编辑  收藏  举报