x-pack和Kibana 介绍-安装-报错-注意

本文介绍了如何在Elasticsearch中安装和配置X-Pack监控组件,以通过Kibana实时监控集群健康、性能以及索引节点,同时探讨了Kibana作为X-Pack客户端的使用和配置要点。文章还提及了在安装过程中遇到的问题,如版本匹配、用户权限管理和证书有效期等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

介绍

X-pack监控组件使通过Kibana轻松地监控ElasticSearch。可以实时查看集群的健康和性能,以及分析过去的集群、索引和节点度量。及监视Kibana本身性能。x-pack监控组件使通过Kibana轻松地监控ElasticSearch。可以实时查看集群的健康和性能,以及分析过去的集群、索引和节点度量。及监视Kibana本身性能。

当你安装X-pack在群集上,监控代理运行在每个节点上收集和指数指标从Elasticsearch。安装在X-pack在Kibana上,您可以查看通过一套专门的仪表板监控数据。

在安装X-pack的时候分别在ElasticSearch根目录和Kibana根目录下操作

X-pack提供简单,但功能强大的图形开发API,和Kibana交互式图形可视化工具

可以简单理解为:x-pack是监管es的插件。kibana只是读写x-pack的客户端。

es → x-pack → kibana

配置目录

ES 5.6.2

程序目录  /usr/share/elasticsearch
配置目录  /etc/elasticsearch

Kibana 5.6.2

程序目录  /root/lz/kiabna/kibana-5.6.2-linux-x86_64

给ES安装x-pack

./bin/elasticsearch-plugin install x-pack

安装Kiabna

Kibana是一个为 ElasticSearch 提供的数据分析的 Web 接口。可使用它对日志进行高效的搜索、可视化、分析等各种操作。

首先到官网下载最新版本的Kiabna压缩包。

可以使用如下命令,注意将最新的可用的下载链接填入:

wget https://artifacts.elastic.co/downloads/kibana/kibana-5.6.2-linux-x86_64.tar.gz
tar -xzf kibana-5.6.2-linux-x86_64.tar.gz
cd kibana/

启动  ./bin/kibana

配置文件  ./conf/kibana.yml ,初始状态,全部被注释,去掉#号,为我改过的配置,可供参考

# Kibana is served by a back end server. This setting specifies the port to use.

server.port: 5601

# 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: "0.0.0.0"

# Enables you to specify a path to mount Kibana at if you are running behind a proxy. This only affects

# the URLs generated by Kibana, your proxy is expected to remove the basePath value before forwarding requests

# to Kibana. This setting cannot end in a slash.

#server.basePath: ""

# 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 URL of the Elasticsearch instance to use for all your queries.

elasticsearch.url: "http://localhost:9205"

# 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: "discover"

# 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: "elastic"

elasticsearch.password: "changeme"

# 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: 0

# Time in milliseconds to wait for Elasticsearch at Kibana startup before retrying.

#elasticsearch.startupTimeout: 5000

# 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

# The default locale. This locale can be used in certain circumstances to substitute any missing

# translations.

#i18n.defaultLocale: "en"

注意:

安装kibana的x-pack

kibana-plugin install x-pack

kibana安装x-pack后,会出现登录界面,此时就需要帐号和密码了。不装xpack不需要登录。

username

role

权限

elasticsuperuser内置的超级用户
kibanakibana_system用户kibana用来连接elasticsearch并与之通信。Kibana服务器以该用户身份提交请求以访问集群监视API和 .kibana索引。不能访问index。
logstash_systemlogstash_system用户Logstash在Elasticsearch中存储监控信息时使用

报错

新增一次超管  lz 用户成功后 : 新增 用户 报错,新增 角色 报错。

探索记录:1.es的x-pack,以及 kibana和kibana的x-pack。都是5.6.2的版本,查看相关的security的参数,都是5.6.2。版本没有错误。

                  2.我在另一个系统中也部署了一遍,和上述情况基本一样,新增一个 角色 后,之后对用户和角色的操作都会报错。以及设置了一个新的 superadmin用户,以前的superadmin的用户就不能用了。
必须去改kibana的配置文件,换成新superadmin的帐号和密码

答案:此是es的数据问题。应清掉数据、并重装es。

注意

x-pack一般只能试用一月,继续使用需要续费或破译。

由图可见,证书的有效期是一个月

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值