linux系统安装和配置kibana管理工具

本文涉及的产品
检索分析服务 Elasticsearch 版,2核4GB开发者规格 1个月
简介: 版权声明:本文为博主原创文章,如需转载,请标明出处。 https://blog.csdn.net/alan_liuyue/article/details/78824089 简介  Kibana是一个针对Elasticsearch的开源分析及可视化平台,用来搜索、查看交互存储在Elasticsearch索引中的数据。
版权声明:本文为博主原创文章,如需转载,请标明出处。 https://blog.csdn.net/alan_liuyue/article/details/78824089

简介

  Kibana是一个针对Elasticsearch的开源分析及可视化平台,用来搜索、查看交互存储在Elasticsearch索引中的数据。使用Kibana,可以通过各种图表进行高级数据分析及展示,是对elasticsearch搜索引擎进行有效管理的工具;

实践

  上一篇博客,我们已经对elasticsearch在linux系统上安装进行了详细的说明,那么es运行起来之后,我们需要选择一种可视化的管理工具对es进行管理,那么kibana就是其中一种管理工具,相对来说是比较好用的(另一种管理工具是head工具,这里就不进行详细说明了,有需要可以自行百度);
那么接下来就对安装kibana进行详细说明:</font>

  1. 下载kibana-5.6.1压缩安装包,下载路径可参考如下:kibana-5.6.1工具包下载,然后在linux存放es的同级目录下解压(方便管理);
  2. 解压之后呢,就开始进行文件配置了,找到config目录下的kibana.yml文件,然后进行配置,具体的参考配置如下,为了方便下面的配置只设置了本机地址和es访问连接地址,有其他需求的话可继续配置:
#设置kibna端口;默认5601
#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.
#设置本机IP地址
server.host: "127.0.0.1"

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

#设置ES访问地址(自行修改),端口9200
elasticsearch.url: "http://192.168.1.1:9200"

# 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
#
# 设置访问kibana时的用户名;默认为空;可以直接访问
#elasticsearch.username: "user"
#
# 设置访问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: 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"
  1. 以上文件配置完了之后,那么就可以去启动kibana了,所以这一个工具的安装还是挺方便的,进入bin目录,执行命令语句: ./ kibana & 后台启动;
  2. 启动之后,怎么查看kibana的进程呢,使用传统的 ps aux|grep kibana 命令是无法查看kibana的进程的,需要执行命令语句:fuser -n tcp 5601;
  3. 查看到kibana的进程之后,说明启动成功了,如果想要杀死进程,可直接执行: kill -9 进程号 命令即可;

问题

  看到上面安装、配置、启动如此简单,那么当然就避免不了可能会发生的几种问题,以下是一些问题的总结和解决方式:

  1. JDK版本不兼容,或者太低。安装启动kibana的JDK必须1.8或以上,在不改变当前JDK环境变量的情况下,可以在bin目录下的kibana
    启动文件里面的头部新增如下命令(jdk1.8的linux版本如果没有,需要自行下载,放到指定的路径下),这种解决方式和前面提到过的es启动遇到的问题的解决方式是一样的:
    export JAVA_HOME=/usr/local/jdk1.8.0_121
    export PATH=$JAVA_HOME/bin:$PATH

    jdk1.8.0_121是自行下载的一个jdk版本,如果没有可自行下载;

  2. 启动kibana的时候可能会报找不到node命令的错误,需要先安装nodejs,配置node环境,具体安装步骤:
    (1) 下载node-v6.10.0-linux-x64.tar.xz安装包(网上一大堆下载,这里就不放上来了),放到kibana同级目录(方便管理);
    (2) tar -xvf node-v6.10.0-linux-x64.tar.xz
    (3) mv node-v6.10.0-linux-x64 nodejs
    (4) 确认一下nodejs下bin目录是否有node 和npm文件,如果有,执行软连接,如果没有,重新下载执行上边步骤;
    建立软连接,变为全局
    (5) ln -s /app/software/nodejs/bin/npm /usr/local/bin/
    (6) ln -s /app/software/nodejs/bin/node /usr/local/bin/
    (7) 测试版本:node -v

总结

  以上就是安装kibana管理工具的全过程,可能会出现的问题也提供了相应的解决方法,如果有其他的可能会遇到的问题,欢迎交流;
  安装好了kibana之后,访问kibana的地址一般是ip地址+5601的端口号,端口号可在配置文件自行更改;
  那么es搜索引擎的管理工具kibana也安装完成了,成功对elasticsearch里面的索引和类型进行有效管理,接下来的博客将会讲到如何使用logstash去重oracle、postgresql、sqlserever等数据库全量或增量导入数据到es里面,一键导入各类型数据库数据;

相关实践学习
使用阿里云Elasticsearch体验信息检索加速
通过创建登录阿里云Elasticsearch集群,使用DataWorks将MySQL数据同步至Elasticsearch,体验多条件检索效果,简单展示数据同步和信息检索加速的过程和操作。
ElasticSearch 入门精讲
ElasticSearch是一个开源的、基于Lucene的、分布式、高扩展、高实时的搜索与数据分析引擎。根据DB-Engines的排名显示,Elasticsearch是最受欢迎的企业搜索引擎,其次是Apache Solr(也是基于Lucene)。 ElasticSearch的实现原理主要分为以下几个步骤: 用户将数据提交到Elastic Search 数据库中 通过分词控制器去将对应的语句分词,将其权重和分词结果一并存入数据 当用户搜索数据时候,再根据权重将结果排名、打分 将返回结果呈现给用户 Elasticsearch可以用于搜索各种文档。它提供可扩展的搜索,具有接近实时的搜索,并支持多租户。
相关文章
|
2天前
|
负载均衡 Linux 应用服务中间件
Linux系统中前后端分离项目部署指南
Linux系统中前后端分离项目部署指南
|
1天前
|
Unix Linux Shell
Linux系统使用超详细(一)
Linux系统是一种开源的、类Unix操作系统内核的实现,它基于Unix的设计原理和思想,并在全球范围内广泛应用。以下是对Linux系统的详细描述:
|
1天前
|
Ubuntu Linux 编译器
【Linux】详解动静态库的制作和使用&&动静态库在系统中的配置步骤
【Linux】详解动静态库的制作和使用&&动静态库在系统中的配置步骤
|
1天前
|
Linux Windows
虚拟机添加新硬盘之linux系统篇
虚拟机添加新硬盘之linux系统篇
|
2天前
|
监控 安全 Linux
Linux系统入侵排查(三)
本文介绍了Linux系统入侵排查的相关知识。首先解释了进行系统入侵排查的原因,即当企业遭受黑客攻击、系统崩溃或其他安全事件时,需要迅速恢复系统并找出入侵来源。接着,重点讲述了日志入侵排查的重要性,因为日志文件记录了系统的重要活动,可以提供入侵行为的线索。
|
2天前
|
安全 Linux Shell
Linux系统入侵排查(二)
本文介绍了Linux系统入侵排查的步骤,包括检查历史命令记录、可疑端口和进程、开机启动项以及定时任务。作者强调了了解这些技能对于攻防两端的重要性,并提供了相关命令示例,如查看`/root/.bash_history`记录、使用`netstat`分析网络连接、检查`/etc/rc.local`和`/etc/cron.*`目录下的可疑脚本等。此外,还提到了如何查看和管理服务的自启动设置,以判断是否被恶意篡改。文章旨在帮助读者掌握Linux服务器安全维护的基本技巧。
|
2天前
|
缓存 安全 Linux
Linux系统入侵排查(一)
本文探讨了在遭遇黑客入侵或系统异常时进行应急响应和排查的必要性,重点介绍了基于Kali Linux的入侵排查步骤。排查的目标是找出潜在的恶意活动,恢复系统的安全性,并防止未来攻击。总结来说,进行Linux系统入侵排查需要密切关注账号安全,跟踪历史命令,及时识别并消除安全隐患。同时,保持对最新攻击手段和技术的了解,以便更好地防御和应对潜在的网络安全威胁。
|
2天前
|
Linux C语言
【Linux】 拿下 系统 基础文件操作!!!
怎么样,我们的猜测没有问题!!!所以语言层的文件操作函数,本质底层是对系统调用的封装!通过不同标志位的封装来体现w r a+等不同打开类型! 我们在使用文件操作时,一般都要使用语言层的系统调用,来保证代码的可移植性。因为不同系统的系统调用可以会不一样!
13 2
|
2天前
|
关系型数据库 MySQL Linux
在Linux系统上实现高效安装与部署环境的全方位指南
在Linux系统上实现高效安装与部署环境的全方位指南
|
3天前
|
人工智能 数据可视化 Unix
【Linux】Linux系统基础指令 ( 1 )
本文讲解的指令是基础的操作,下一篇文章我们将继续讲解不同指令。
13 0