📣 极限科技诚招搜索运维工程师(Elasticsearch/Easysearch)- 全职/北京 👉 : 立即申请加入
Kibana OSS 7.10.2 连接 INFINI Easysearch

大家都知道 ELK 生态里的各软件之间是有版本验证的。那如果想用 Kibana 连接 INFINI Easysearch,要怎么办呢?

今天我们来实现一下。

首先直接请求 Easysearch API,确认返回版本信息。

# curl -ku admin:a9ce40464e259c7d1e58 https://10.0.0.1:9203
{
  "name" : "node-1",
  "cluster_name" : "infini-logs-tmp",
  "cluster_uuid" : "R_u1UaVQQo-wS1MFGOho3A",
  "version" : {
    "distribution" : "easysearch",
    "number" : "1.9.1",
    "distributor" : "INFINI Labs",
    "build_hash" : "da95c34b95dd934779d7ae5c6c1bccd2f1c25954",
    "build_date" : "2024-12-20T21:01:36.991581Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.2",
    "minimum_wire_lucene_version" : "7.7.0",
    "minimum_lucene_index_compatibility_version" : "7.7.0"
  },
  "tagline" : "You Know, For Easy Search!"
}

INFINI Easysearch 有提供版本兼容参数。

elasticsearch.api_compatibility: true
elasticsearch.api_compatibility_version: "7.10.2"

开启后再进行 API 访问,返回的版本信息已修改。

# curl -ku admin:a9ce40464e259c7d1e58 https://10.0.0.1:9203
{
  "name" : "node-1",
  "cluster_name" : "infini-logs-tmp",
  "cluster_uuid" : "R_u1UaVQQo-wS1MFGOho3A",
  "version" : {
    "number" : "7.10.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "da95c34b95dd934779d7ae5c6c1bccd2f1c25954",
    "build_date" : "2024-12-20T21:01:36.991581Z",
    "build_snapshot" : false,
    "lucene_version" : "8.7.0",
    "minimum_wire_compatibility_version" : "6.7.0",
    "minimum_index_compatibility_version" : "6.0.0"
  },
  "tagline" : "You Know, for Search"
}

配置 Kibana

elasticsearch.hosts: ["https://10.0.0.1:9203"]
elasticsearch.username: "admin"
elasticsearch.password: "a9ce40464e259c7d1e58"

使用 Kibana 进行连接时,还会出现版本错误信息。

# ./bin/kibana --allow-root
  log   [01:28:35.150] [info][plugins-service] Plugin "visTypeXy" is disabled.
  log   [01:28:35.315] [info][plugins-system] Setting up [40] plugins: [usageCollection,telemetryCollectionManager,telemetry,kibanaUsageCollection,newsfeed,securityOss,mapsLegacy,kibanaLegacy,share,legacyExport,embeddable,expressions,data,home,console,apmOss,management,indexPatternManagement,advancedSettings,savedObjects,dashboard,visualizations,visTypeVega,visTypeTimelion,timelion,visTypeTable,visTypeMarkdown,tileMap,regionMap,inputControlVis,visualize,esUiShared,charts,visTypeVislib,visTypeTimeseries,visTypeTagcloud,visTypeMetric,discover,savedObjectsManagement,bfetch]
  log   [01:28:35.553] [info][savedobjects-service] Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations...
  log   [01:28:35.934] [error][savedobjects-service] This version of Kibana (v7.10.2) is incompatible with the following Elasticsearch nodes in your cluster: v1.9.1 @ 172.80.0.1:9203 (172.80.0.1)

分析错误信息,Kibana 应该请求了“/_nodes” API 接口,执行请求,看到确实有相应的版本信息。

# curl -ku admin:a9ce40464e259c7d1e58 https://10.0.0.1:9203/_nodes\?pretty
{
  "_nodes" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "cluster_name" : "infini-logs-tmp",
  "nodes" : {
    "ZZtIpBZpQxWsy3yRC0FKcg" : {
      "name" : "node-1",
      "transport_address" : "172.80.0.1:9303",
      "host" : "172.80.0.1",
      "ip" : "172.80.0.1",
      "version" : "1.9.1",
      "build_flavor" : "default",
      "build_type" : "tar",
      "build_hash" : "da95c34b95dd934779d7ae5c6c1bccd2f1c25954",
      "total_indexing_buffer" : 107374182,
      "roles" : [
        "data",
        "ingest",
        "master",
        "remote_cluster_client"
      ],
.......

现在想办法把返回的版本信息进行调整,看可行不?

这里可以通过 INFINI Gateway 来进行返回数据的调整,配置(gateway.yml)如下:

entry:
  - name: proxy_es
    enabled: true
    router: my_router
    max_concurrency: 10000
    network:
      binding: 0.0.0.0:9002

router:
  - name: my_router
    default_flow: default_flow
    rules:
      - method:
          - "GET"
        pattern:
          - "/_nodes"
        flow:
          - overwrite_flow

flow:
  - name: default_flow
    filter:
      - http: ##another general option to proxy requests
          schema: "https" #https or http
          max_idle_conn_duration: "900s"
          skip_failure_host: false
          hosts:
            - "10.0.0.1:9203"
  - name: overwrite_flow
    filter:
      - http: ##another general option to proxy requests
          schema: "https" #https or http
          max_idle_conn_duration: "900s"
          skip_failure_host: false
          hosts:
            - "10.0.0.1:9203"
      - set_context:
          context:
            _ctx.response.body_json.nodes.ZZtIpBZpQxWsy3yRC0FKcg.version: '"7.10.2"'

启动 Gateway。

# ./gateway-linux-amd64

   ___   _   _____  __  __    __  _
  / _ \ /_\ /__   \/__\/ / /\ \ \/_\ /\_/\
 / /_\///_\\  / /\/_\  \ \/  \/ //_\\\_ _/
/ /_\\/  _  \/ / //__   \  /\  /  _  \/ \
\____/\_/ \_/\/  \__/    \/  \/\_/ \_/\_/

[GATEWAY] A light-weight, powerful and high-performance search gateway.
[GATEWAY] 1.0.0_SNAPSHOT#001, 2024-09-02 08:53:26, 2024-12-31 10:10:10, 250cefeb7c16438f1bf4e6416b7f3eeeec7d9aef
[12-29 09:30:37] [INF] [app.go:285] initializing gateway, pid: 45373
[12-29 09:30:37] [INF] [app.go:286] using config: /opt/demo-environment/gateway_es_tmp/gateway.yml
[12-29 09:30:37] [INF] [instance.go:78] workspace: /opt/demo-environment/gateway_es_tmp/data/gateway/nodes/ctnsiut3q95hgcqen710
[12-29 09:30:37] [INF] [module.go:136] started module: badger
[12-29 09:30:37] [INF] [api.go:196] local ips: 192.168.3.181, 10.0.0.1, 172.80.2.1, 172.80.3.1, 169.254.25.10, 10.233.39.174, 10.233.9.199, 10.233.0.1, 10.233.0.3, 10.233.62.114, 10.233.23.74, 10.233.27.40, 10.233.23.200, 10.233.3.49, 10.233.23.21, 10.233.19.207, 10.233.41.58, 10.233.28.97, 10.233.17.129, 10.233.14.179, 10.233.24.184, 10.233.14.180, 10.233.112.0, 172.80.0.1, 172.34.0.1, 192.168.122.1
[12-29 09:30:37] [INF] [api.go:360] api listen at: http://0.0.0.0:2904
[12-29 09:30:37] [INF] [module.go:136] started module: api
[12-29 09:30:37] [INF] [module.go:136] started module: disk_queue
[12-29 09:30:37] [INF] [module.go:136] started module: elasticsearch
[12-29 09:30:37] [INF] [module.go:136] started module: kafka_queue
[12-29 09:30:37] [INF] [module.go:136] started module: queue
[12-29 09:30:37] [INF] [module.go:136] started module: redis
[12-29 09:30:37] [INF] [module.go:136] started module: s3
[12-29 09:30:37] [INF] [module.go:136] started module: simple_stats
[12-29 09:30:37] [INF] [module.go:136] started module: task
[12-29 09:30:37] [INF] [module.go:136] started module: pipeline
[12-29 09:30:37] [INF] [module.go:155] started plugin: floating_ip
[12-29 09:30:37] [INF] [module.go:155] started plugin: force_merge
[12-29 09:30:37] [INF] [module.go:155] started plugin: metrics
[12-29 09:30:37] [INF] [module.go:155] started plugin: statsd
[12-29 09:30:37] [INF] [entry.go:398] entry [proxy_es] listen at: http://0.0.0.0:9002
[12-29 09:30:37] [INF] [module.go:155] started plugin: gateway
[12-29 09:30:37] [INF] [module.go:161] all modules are started
[12-29 09:30:37] [INF] [app.go:511] gateway is up and running now.

通过 Gateway 访问 API 确认版本信息。

# curl -ku admin:a9ce40464e259c7d1e58 http://10.0.0.1:9002
{
  "name" : "node-1",
  "cluster_name" : "infini-logs-tmp",
  "cluster_uuid" : "R_u1UaVQQo-wS1MFGOho3A",
  "version" : {
    "number" : "7.10.2",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "da95c34b95dd934779d7ae5c6c1bccd2f1c25954",
    "build_date" : "2024-12-20T21:01:36.991581Z",
    "build_snapshot" : false,
    "lucene_version" : "8.7.0",
    "minimum_wire_compatibility_version" : "6.7.0",
    "minimum_index_compatibility_version" : "6.0.0"
  },
  "tagline" : "You Know, for Search"
}
# curl -ku admin:a9ce40464e259c7d1e58 http://10.0.0.1:9002/_nodes\?pretty
{
  "_nodes" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "cluster_name" : "infini-logs-tmp",
  "nodes" : {
    "ZZtIpBZpQxWsy3yRC0FKcg" : {
      "name" : "node-1",
      "transport_address" : "172.80.0.1:9303",
      "host" : "172.80.0.1",
      "ip" : "172.80.0.1",
      "version" : "7.10.2",
      "build_flavor" : "default",
      "build_type" : "tar",
      "build_hash" : "da95c34b95dd934779d7ae5c6c1bccd2f1c25954",
      "total_indexing_buffer" : 107374182,
      "roles" : [
        "data",
        "ingest",
        "master",
        "remote_cluster_client"
      ],
......

修改 Kibana 配置文件(config/kibana.yml),通过 Gateway 访问集群。

elasticsearch.hosts: ["http://10.0.0.1:9002"]

启动 Kibana 成功,无报错。

# ./bin/kibana --allow-root
  log   [01:31:42.733] [info][plugins-service] Plugin "visTypeXy" is disabled.
  log   [01:31:42.865] [info][plugins-system] Setting up [40] plugins: [usageCollection,telemetryCollectionManager,telemetry,kibanaUsageCollection,securityOss,newsfeed,mapsLegacy,kibanaLegacy,share,legacyExport,embeddable,expressions,data,home,console,apmOss,management,indexPatternManagement,advancedSettings,savedObjects,dashboard,visualizations,visTypeVega,visTypeTimelion,timelion,visTypeTable,visTypeMarkdown,tileMap,regionMap,inputControlVis,visualize,esUiShared,charts,visTypeVislib,visTypeTimeseries,visTypeTagcloud,visTypeMetric,discover,savedObjectsManagement,bfetch]
  log   [01:31:43.098] [info][savedobjects-service] Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations...
  log   [01:31:43.151] [info][savedobjects-service] Starting saved objects migrations
  log   [01:31:43.228] [info][plugins-system] Starting [40] plugins: [usageCollection,telemetryCollectionManager,telemetry,kibanaUsageCollection,securityOss,newsfeed,mapsLegacy,kibanaLegacy,share,legacyExport,embeddable,expressions,data,home,console,apmOss,management,indexPatternManagement,advancedSettings,savedObjects,dashboard,visualizations,visTypeVega,visTypeTimelion,timelion,visTypeTable,visTypeMarkdown,tileMap,regionMap,inputControlVis,visualize,esUiShared,charts,visTypeVislib,visTypeTimeseries,visTypeTagcloud,visTypeMetric,discover,savedObjectsManagement,bfetch]
  log   [01:31:43.477] [info][listening] Server running at http://0.0.0.0:5602
  log   [01:31:43.516] [info][server][Kibana][http] http server running at http://0.0.0.0:5602
标签
Easysearch x
产品更新 x
performance x
2026 x
开源 x
赞助 x
开源生态 x
社区 x
Coco AI x
二等奖 x
兴智杯 x
人工智能 x
赛事 x
低空经济 x
商业化 x
数据分析 x
金猿奖 x
国产化 x
搜索引擎 x
技术卓越奖 x
创新产品奖 x
IT168 x
APM x
Skywalking x
Easy-Es x
Coco x
AI x
GitLab x
代码审核 x
石油石化 x
Gitee x
投票 x
Meilisearch x
Rust x
轻量级 x
搜索百科 x
Docker x
Docker Compose x
Easyserach x
Console x
DevOps x
Elasticsearch x
国产替代 x
backup x
snapshot x
CCR x
Gateway x
esdump x
source_reuse x
ignore_above x
OpenSearch x
AWS x
Lucene x
Solr x
Easyearch x
发明专利 x
数据分区 x
国际专利 x
一等奖 x
人工智能应用创新大赛 x
bulk x
embedding x
OpenAI x
IK x
TDBC x
2025 x
信通院 x
可信数据库大会 x
搜索型数据库 x
中国数据库产业图谱 x
上海开源创新菁英荟 x
开源创新新星企业 x
Workshop x
AI 搜索 x
智能助手 x
Automation x
Logstash x
MongoDB x
开源中国 x
直播 x
merge x
Elasticsearch 9 x
GitCode x
AI搜索 x
Cloud x
rollup x
Kubernetes x
Operator x
Arm64 x
Snapshot x
S3 x
Grafana x
Opensearch x
Nginx x
直播活动 x
搜索客社区 x
Meetup x
ES x
企业搜索 x
DeepSeek x
RAG x
certificate x
windows x
Rollup x
TopN x
Filebeat x
Ubuntu x
请求限速 x
INFINI Console x
指标 x
Kibana x
多集群 x
client x
Spring Boot x
ECE x
ES Bulk x
vector database x
Postgres x
可搜索快照 x
SDK x
官网 x
Web 开发 x
Next.js x
React x
Three.js x
Metrics x
Helm x
filter x
querycache x
practice x
Agent x
localStorage x
响应式 x
时间组件 x
时区组件 x
极限科技 x
三周年 x
周年庆 x
国家高新技术企业 x
校园招聘 x
湖北工业大学 x
Tauri x
Web 开发人员 x
桌面应用开发 x
桌面端 x
Electron x
Pizza x
认证培训 x
报名 x
Scrapy x
爬虫 x
Rust开发者大会 x
docsearch x
文档搜索 x
Easyseach x
有奖征文 x
黑神话悟空 x
EKS x
征文系列 x
跨集群搜索 x
科技中小企业 x
白皮书 x
Python SDK x
数据库产业图谱 x
超大规模 x
分布式集群 x
写入限流 x
2024可信数据库发展大会 x
创新型中小企业 x
搜索数据库 x
正排索引 x
免费许可证 x
K8S x
DTC2024 x
实时搜索 x
ES国产化 x
Redis x
OOM x
测试 x
内存 x
趋势 x
AI绘画 x
Stable Diffusion x
Diffusion x
Model x
GAN x
语义搜索 x
知识图 x
向量数据库 x
中国信通院 x
星河(Galaxy) x
标杆案例 x
鲲鹏 x
鲲鹏技术认证 x
客户端 x
日志平台 x
LDAP x
Loadgen x
中国一汽 x
国内数据库 x
墨天轮 x
监控系统 x
集成测试 x
ZSTD x
Helm Charts x
国产适配 x
兆芯 x
Linux x
LoongArch x
信创适配 x
二维拆分算法 x
中国移动云 x
Vault x
加密 x
安全工具 x
kNN x
向量检索 x
图片搜索 x
Alerting x
SQL x
搜索 x
Embedding x
可信数据库 x
统信 x
海光 x
龙芯 x
restore x
Arm x
大数据企业证书 x
移动云大会 x
信通院产品评测 x
国内首家 x
数据可视化 x
北京软协 x
第十届理事会会员单位 x
Apache Arrow x
宣传片 x
大会分享 x
多集群管理 x
无缝数据迁移 x
Loadrun x
INFINI Gateway x
log4j x