使用Kibana让es集群形象起来

部署Elasticsearch集群详细步骤参考本人:

https://blog.csdn.net/m0_59933574/article/details/134605073?spm=1001.2014.3001.5502icon-default.png?t=N7T8https://blog.csdn.net/m0_59933574/article/details/134605073?spm=1001.2014.3001.5502

kibana部署

es集群设备

安装软件主机名IP地址系统版本配置
Elasticsearchelk-1192.168.231.245centos7.5.18043核4G
Elasticsearches1192.168.231.246centos7.5.18042核4G
Elasticsearches2192.168.231.247centos7.5.18042核4G

软件版本:kibana-7.13.2-linux-x86_64.tar.gz

三台机器都启动Elasticsearch,elk-1还启动head

1. 安装配置Kibana

只在elk-1上安装

安装,解压
有包直接上传到/root
rz  解压
[root@elk-1 ~]# tar zxf kibana-7.13.2-linux-x86_64.tar.gz -C /usr/local/

2.配置

[root@elk-1 ~]# cat /usr/local/kibana-7.13.2-linux-x86_64/config/kibana.yml server.port: 5601
server.host: "192.168.231.245"
elasticsearch.hosts: ["http://192.168.231.245:9200"]
kibana.index: ".kibana"
i18n.locale: "zh-CN"

server.port  监听端口 5601

server.host  本机的IP

elasticsearch.hosts : 查询es节点的URL

3. 配置项含义

server.port kibana服务端口,默认5601
server.host kibana主机IP地址,默认localhost
elasticsearch.url   用来做查询的ES节点的URL,默认http://localhost:9200
kibana.index        kibana在Elasticsearch中使用索引来存储保存的searches, visualizations和dashboards,默认.kibana

4.启动

[root@elk-1 ~]# cd /usr/local/kibana-7.13.2-linux-x86_64/

kibana不能使用root用户启动

正确启动

5.观察kibana

http://192.168.231.245:5601

如果出现Kibana  server is not ready yet

将es集群全部启动即可

6.再次访问web端

安装配置nginx反向代理

还是在elk-1那台服务器做实验

1. 配置yum源

[root@elk-1 ~]# rpm -ivh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

2. 下载nginx

[root@elk-1 ~]# yum -y install nginx 

3.安装httpd-tools

用于生成nginx认证访问的用户密码文件

[root@elk-1 ~]# yum install -y nginx httpd-tools

4. 配置反向代理

[root@elk-1 ~]# cat /etc/nginx/nginx.conf 
user  nginx;
worker_processes  auto;
error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;
worker_rlimit_nofile 65535;events {worker_connections  65535;use epoll;
}http {include       mime.types;default_type  application/octet-stream;log_format  main  '$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';access_log  /var/log/nginx/access.log  main;server_names_hash_bucket_size 128;autoindex on;sendfile        on;tcp_nopush     on;tcp_nodelay on;keepalive_timeout  120;fastcgi_connect_timeout 300;fastcgi_send_timeout 300;fastcgi_read_timeout 300;fastcgi_buffer_size 64k;fastcgi_buffers 4 64k;fastcgi_busy_buffers_size 128k;fastcgi_temp_file_write_size 128k;#gzip模块设置gzip on; #开启gzip压缩输出gzip_min_length 1k;    #最小压缩文件大小gzip_buffers 4 16k;    #压缩缓冲区gzip_http_version 1.0;    #压缩版本(默认1.1,前端如果是squid2.5请使用1.0)gzip_comp_level 2;    #压缩等级gzip_types text/plain application/x-javascript text/css application/xml;    #压缩类型,默认就已经包含textml,所以下面就不用再写了,写上去也不会有问题,但是会有一个warn。gzip_vary on;#开启限制IP连接数的时候需要使用#limit_zone crawler $binary_remote_addr 10m;#tips:#upstream bakend{#定义负载均衡设备的Ip及设备状态}{#    ip_hash;#    server 127.0.0.1:9090 down;#    server 127.0.0.1:8080 weight=2;#    server 127.0.0.1:6060;#    server 127.0.0.1:7070 backup;#}#在需要使用负载均衡的server中增加 proxy_pass http://bakend/;server {listen       80;server_name  192.168.231.245;#charset koi8-r;# access_log  /var/log/nginx/host.access.log  main;access_log off;location / {  auth_basic "Kibana";   #可以是string或off,任意string表示开启认证,off表示关闭认证。auth_basic_user_file /etc/nginx/passwd.db;   #指定存储用户名和密码的认证文件。proxy_pass http://192.168.231.245:5601;proxy_set_header Host $host:5601;  proxy_set_header X-Real-IP $remote_addr;  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;  proxy_set_header Via "nginx";  }location /status { stub_status on; #开启网站监控状态 access_log /var/log/nginx/kibana_status.log; #监控日志 auth_basic "NginxStatus"; } location /head/ {auth_basic "head";auth_basic_user_file /etc/nginx/passwd.db;proxy_pass http://192.168.231.245:9100/;proxy_set_header Host $host:9100;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header Via "nginx";}  # redirect server error pages to the static page /50x.htmlerror_page   500 502 503 504  /50x.html;location = /50x.html {root   html;}}
}

修改事项:

将worker_processes改成auto

将server_name改成本机IP

location内的所有proxy_pass 改成本机的IP

5. 配置授权用户和密码

[root@elk-1 ~]# htpasswd -cm /etc/nginx/passwd.db kibana[root@elk-1 ~]# htpasswd -m /etc/nginx/passwd.db head
第一次加c,第二次不加c。如果第二次也+c,会将第一次添加的覆盖掉

6. 启动nginx

[root@elk-1 ~]# systemctl start nginx

访问,只访问http://192.168.231.245 那么会跳转到kibana

访问head,输入http://192.168.231.245/head

访问status,访问http://192.168.231.245/status

介绍:

Kibana是一个开源的数据可视化和分析平台,它是弹性搜索栈(Elastic Stack)的一部分,旨在帮助用户以更直观和交互式的方式分析和查询数据。Kibana提供了丰富的可视化选项,包括图表、地图和仪表板,可以对弹性搜索集群中的数据进行实时分析和可视化。Kibana还提供强大的查询工具和聚合框架,可以针对大规模的数据集进行高效的查询和分析。Kibana还支持实时协作和数据共享,可以获取团队内共享的仪表板和可视化项目。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/218446.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

最详细手把手教你安装 Git + TortoiseGit 及使用

软件下载 从 Git 官网 下载 Git 安装程序,点击 Download for Windows: 点击下载 64-bit Git for Windows Setup: Git for Windows Setup 为安装版本,建议选择此版本Git for Windows Portable 为绿色免安装版本 从 TortoiseGit 官网 下载 T…

云计算领域的第三代浪潮!

根据IDC不久前公布的数据,2023年上半年中国公有云服务整体市场规模(IaaS/PaaS/SaaS)为190.1亿美元,阿里云IaaS、PaaS市场份额分别为29.9%和27.9%,都远超第二名,是无可置疑的行业领头羊。 随着人工智能(AI)…

BUUCTF [HBNIS2018]低个头 1

BUUCTF:https://buuoj.cn/challenges 题目描述: 得到的 flag 请包上 flag{} 提交。来源: https://github.com/hebtuerror404/CTF_competition_warehouse_2018 密文: 下载附件,得到一个.txt文件。 解题思路: 1、低头…

公交路线查询系统

公交路线查询系统 一:目标一:类的定义构造方法 set和get方法:目标二:静态属性 静态方法 toString方法:目标三:抽象类的定义 抽象方法 实际应用:abstract class AbstractRoute{目标四&#xff1…

【Linux】指令详解(三)

目录 1. 前言2. 常见指令2.1 重定向2.1.1 >2.1.2 >>2.1.3 < 2.2 与文件有关指令2.2.1 more2.2.2 less &#xff08;推荐使用&#xff09;2.2.3 head2.2.4 tail2.2.5 wc2.2.6 | 2.3 find2.4 grep 3. 时间相关的指令3.1 data3.2 时间戳3.3 cal 4. zip/unzip 1. 前言 …

Qt手写ListView

创建视图&#xff1a; QHBoxLayout* pHLay new QHBoxLayout(this);m_pLeftTree new QTreeView(this);m_pLeftTree->setEditTriggers(QAbstractItemView::NoEditTriggers); //设置不可编辑m_pLeftTree->setFixedWidth(300);创建模型和模型项&#xff1a; m_pLeftTree…

解决Linux Visual Studio Code显示字体有问题/Liunx下Visual Studio Code更换字体

01、具体问题 在Linux下VsCode控制台与代码区显示异常&#xff0c;如下图所示&#xff1a; 代码显示 终端显示 02、解决方案 下载字体 [rootlocalhost mhzzj]$ cd /usr/share/fonts # 进入目录 [rootlocalhost fonts]$ sudo yum install git # 下载字体 [rootlocalhost fo…

MyBatisPlus入门介绍

目录 一、MyBatisPlus介绍 润物无声 效率至上 丰富功能 二、Spring集成MyBatisPlus 三、SpringBoot集成MyBatisPlus 一、MyBatisPlus介绍 MyBatis-Plus&#xff08;简称 MP&#xff09;是一个MyBatis的增强工具&#xff0c;在MyBatis的基础上只做增强不做改变&#xff0c…

微软 Edge 浏览器目前无法支持 avif 格式

avif 格式在微软 Edge 浏览器中还是没有办法支持。 如果你希望能够查看 avif 格式&#xff0c;那么只能通过浏览器打开&#xff0c;然后浏览器将会把这个文件格式下载到本地。 avif 格式已经在其他的浏览器上得到了广泛的支持&#xff0c;目前不支持的可能就只有 Edge 浏览器。…

可观测性建设实践之 - 日志分析的权衡取舍

指标、日志、链路是服务可观测性的三大支柱&#xff0c;在服务稳定性保障中&#xff0c;通常指标侧重于发现故障和问题&#xff0c;日志和链路分析侧重于定位和分析问题&#xff0c;其中日志实际上是串联这三大维度的一个良好桥梁。 但日志分析往往面临成本和效果之间的权衡问…

高级JVM

一、Java内存模型 1. 我们开发人员编写的Java代码是怎么让电脑认识的 首先先了解电脑是二进制的系统&#xff0c;他只认识 01010101比如我们经常要编写 HelloWord.java 电脑是怎么认识运行的HelloWord.java是我们程序员编写的&#xff0c;我们人可以认识&#xff0c;但是电脑不…

柑橘病害数据集(四类图像分类,没有打yolo标签)

1.文件夹分为训练集和测试集 在这个数据集中&#xff0c;有一类是新鲜柑橘&#xff0c;还有另外三种疾病&#xff0c;溃疡病、黑斑病和绿化病。 2.train文件夹 2.1.blackspot&#xff08;黑斑病&#xff09; 文件夹 206张照片 2.2.canker&#xff08;溃疡病&#xff09; 文…