Elasticsearch 7.0 中还引入了一个新的聚合来处理地理地图图块,允许用户在地图上放大和缩小,而不会改变结果数据的形状,实现更加平滑地缩放 Elastic Maps;使用纳秒精度存储时序数据的时间戳,允许具有高频数据采集需求的用户可以更加精确地存储和排序他们的数据

  详情查看发布公告

  https://www.elastic.co/cn/blog/elastic-stack-7-0-0-released

  一,系统环境查看及软件版本选择

  系统环境查看

ELK之7版本Elastic Maps功能介绍

 

   软件版本选择

elasticsearch-7.4.0-x86_64.rpm
filebeat-7.4.0-x86_64.rpm
kibana-7.4.0-x86_64.rpm
logstash-7.4.0.rpm
metricbeat-7.4.0-x86_64.rpm
jdk 1.8.0_171

  二,安装配置

  安装jdk环境不详述

  官方网站下载对应软件包

  安装elasticsearch

rpm -ivh elasticsearch-7.4.0-x86_64.rpm

  修改配置文件

/etc/elasticsearch/elasticsearch.yml

  配置如下

cluster.name: myes
node.name: node-1
path.data: /var/lib/elasticsearch
path.logs: /data/es-data
network.host: 0.0.0.0
http.port: 9200
#集群设置,必须设置否则无法启动elasticsearch
cluster.initial_master_nodes: ["node-1"]

  创建es数据文件夹并设置权限

mkdir -p /data/es-data
chown -R elasticsearch:elasticsearch /data/es-data/

  启动es

systemctl start elasticsearch
systemctl enable elasticsearch

  测试

# curl http://127.0.0.1:9200
{
  "name" : "node-1",
  "cluster_name" : "myes",
  "cluster_uuid" : "lEHaDsPGQ6CHL71yHX4oig",
  "version" : {
    "number" : "7.4.0",
    "build_flavor" : "default",
    "build_type" : "rpm",
    "build_hash" : "22e1767283e61a198cb4db791ea66e3f11ab9910",
    "build_date" : "2019-09-27T08:36:48.569419Z",
    "build_snapshot" : false,
    "lucene_version" : "8.2.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

  安装kibana

rpm -ivh kibana-7.4.0-x86_64.rpm

  修改配置文件

/etc/kibana/kibana.yml

  配置如下

server.port: 5601
server.host: "0.0.0.0"
server.name: "node-1"
elasticsearch.hosts: ["http://192.168.1.5:9200"]
kibana.index: ".kibana"

  启动kibana

systemctl start kibana
systemctl enable kibana

  web页面查看比老版本多了maps

http://192.168.1.5:5601

  

ELK之7版本Elastic Maps功能介绍

 

   为了测试maps功能安装一个能收集地理数据filebeat进行测试

  安装filebeat

rpm -ivh filebeat-7.4.0-x86_64.rpm

  修改配置文件把filebeat输出至elasticsearch和kibana

/etc/filebeat/filebeat.yml

  配置如下

filebeat.config.modules:
  path: ${path.config}/modules.d/*.yml
  reload.enabled: false
setup.template.settings:
  index.number_of_shards: 1
setup.kibana:
  host: "192.168.1.4:5601"
output.elasticsearch:
  hosts: ["192.168.1.4:9200"]
processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~

  开启nginx模块

filebeat modules enable nginx

  查看是否开启

# filebeat modules list
Enabled:
nginx

Disabled:
apache
auditd

  修改配置文件设置nginx日志文件位置

/etc/filebeat/modules.d/nginx.yml

  配置如下分别指定nginx访问日志和错误日志位置即可

- module: nginx
  access:
    enabled: true
    var.paths:
      - "/nas/nas/logs/nginx/www_access.log"
  error:
    enabled: true
    var.paths:
      - "/nas/nas/logs/nginx/www_error.log"

  启动filebeat

systemctl start filebeat
systemctl enable filebeat
filebeat setup

  三,Elastic Maps

  打开kibana新建一个maps

  选择菜单栏maps新建一个maps

  默认包含map图层

  添加一个图层layer

ELK之7版本Elastic Maps功能介绍

 

ELK之7版本Elastic Maps功能介绍

 

   设置该图层属性

ELK之7版本Elastic Maps功能介绍

 

 ELK之7版本Elastic Maps功能介绍

 

  显示效果图

ELK之7版本Elastic Maps功能介绍

 

   新加一个图层把中国显示与其他国家区别

ELK之7版本Elastic Maps功能介绍

 

ELK之7版本Elastic Maps功能介绍

 

 ELK之7版本Elastic Maps功能介绍

 

 ELK之7版本Elastic Maps功能介绍

 

  最终效果图如下

ELK之7版本Elastic Maps功能介绍

 

相关文章:

  • 2021-12-02
  • 2021-11-05
  • 2021-11-06
  • 2022-01-22
  • 2021-08-13
  • 2021-09-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2021-11-05
  • 2021-11-11
  • 2021-07-29
相关资源
相似解决方案