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

介绍

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一般只能试用一月,继续使用需要续费或破译。

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

  • 14
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Elasticsearch X-Pack 是一个强大的插件,它为 Elasticsearch 提供了一系列的扩展功能,包括安全、监控、报告、机器学习等。下面简单介绍一下如何安装 Elasticsearch X-Pack。 1. 下载 Elasticsearch X-Pack 插件 你可以从 Elastic 官网下载对应版本的 X-Pack 插件,链接为:https://www.elastic.co/cn/downloads/x-pack。 2. 安装 Elasticsearch X-Pack 插件 安装 Elasticsearch X-Pack 插件需要使用 Elasticsearch 的插件安装命令。将下载好的 X-Pack 插件解压到 Elasticsearch 的 plugins 目录下,然后使用以下命令安装插件: ``` bin/elasticsearch-plugin install file:///path/to/x-pack-xxx.zip ``` 其中,`/path/to/x-pack-xxx.zip` 是 X-Pack 插件的压缩包路径。 3. 配置 Elasticsearch X-Pack 插件 安装 Elasticsearch X-Pack 插件后,你需要在 Elasticsearch 的配置文件中进行相应的配置。具体配置方法可以参考官方文档。 4. 启动 Elasticsearch X-Pack 插件 启动 Elasticsearch X-Pack 插件需要先启动 Elasticsearch,然后在 Elasticsearch 的命令行界面输入以下命令: ``` bin/elasticsearch ``` 如果一切顺利,你应该可以看到 Elasticsearch 启动成功的日志信息。 5. 验证 Elasticsearch X-Pack 插件是否安装成功 你可以通过访问 Elasticsearch 的 API 或者使用 Kibana 来验证 Elasticsearch X-Pack 插件是否安装成功。如果安装成功,你应该可以看到 X-Pack 相关的 API 和功能。 总之,在安装 Elasticsearch X-Pack 插件之前,你需要先了解自己的 Elasticsearch 版本,然后下载对应版本的 X-Pack 插件。安装插件需要使用 Elasticsearch 的插件安装命令,并且需要在 Elasticsearch 的配置文件中进行相应的配置。启动插件后,你可以通过访问 Elasticsearch 的 API 或者使用 Kibana 来验证插件是否安装成功。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值