zombodb 几个方便的_cat api
zombodb 暴露所有es _cat/ api 为视图,我们可以通过视图方便的查询es 的信息,默认在zdb的schema 中
包含的视图
几个方便的view
- 查看索引统计信息zdb.index_stats
select * from zdb.index_stats;
-[ RECORD 1 ]----+-------------------------------------------
alias | postgres.public.products.idxproducts-17176
index_name | 12358.2200.17166.17176-91249167
url | http://elasticsearch:9200/
table_name | products
es_docs | 5
es_size | 23 kB
es_size_bytes | 23297
pg_docs_estimate | 0
pg_size | 32 kB
pg_size_bytes | 32768
shards | 5
replicas | 0
doc_count | 5
aborted_xids | 0
- 查询es 集群文档信息 zdb.cat_count
select * from zdb.cat_count;
-[ RECORD 1 ]-------------------------
url | http://elasticsearch:9200/
epoch | 1554168344
timestamp | 01:25:44
count | 5
- 查询es集群状态cat_health
select * from zdb.cat_health;
-[ RECORD 1 ]---------+---------------------------
url | http://elasticsearch:9200/
epoch | 1554168541
timestamp | 01:29:01
cluster | docker-cluster
status | green
node.total | 1
node.data | 1
shards | 5
pri | 5
relo | 0
init | 0
unassign | 0
pending_tasks | 0
max_task_wait_time |
active_shards_percent | 100.0%
- 查看索引信息 zdb.cat_indices
select * from zdb.cat_indices;
-[ RECORD 1 ]--+-------------------------------------------
url | http://elasticsearch:9200/
health | green
status | open
alias | postgres.public.products.idxproducts-17176
index | 12358.2200.17166.17176-91249167
uuid | 2H5Q20ctSMGrkpIoWSL5ow
pri | 5
rep | 0
docs.count | 5
docs.deleted | 0
store.size | 23297
pri.store.size | 23297
- es 集群节点属性信息zdb.cat_nodeattrs
-[ RECORD 1 ]---------------------
url | http://elasticsearch:9200/
node | YYRl4wX
host | 172.18.0.2
ip | 172.18.0.2
relo | 0
-[ RECORD 1 ]---------------------
url | http://elasticsearch:9200/
node | YYRl4wX
host | 172.18.0.2
ip | 172.18.0.2
attr | ml.machine_memory
value | 2095869952
-[ RECORD 2 ]---------------------
url | http://elasticsearch:9200/
node | YYRl4wX
host | 172.18.0.2
ip | 172.18.0.2
attr | xpack.installed
value | true
-[ RECORD 3 ]---------------------
url | http://elasticsearch:9200/
node | YYRl4wX
host | 172.18.0.2
ip | 172.18.0.2
attr | ml.max_open_jobs
value | 20
-[ RECORD 4 ]---------------------
url | http://elasticsearch:9200/
node | YYRl4wX
host | 172.18.0.2
ip | 172.18.0.2
attr | ml.enabled
value | true
- es 集群节点拓扑查看zdb.cat_nodes
select * from zdb.cat_nodes;
url | http://elasticsearch:9200/
id | YYRl
pid | 1
ip | 172.18.0.2
port | 9300
http_address | 172.18.0.2:9200
version | 6.6.0
build | a9861f4
jdk | 11.0.1
disk.total | 62722478080
disk.used | 6214967296
disk.avail | 56507510784
disk.used_percent | 9.91
heap.current | 212820616
heap.percent | 41
heap.max | 518979584
ram.current | 2018529280
ram.percent | 96
ram.max | 2095869952
file_desc.current | 237
file_desc.percent | 0
file_desc.max | 1048576
cpu | 1
.....
说明
zombodb 暴露的视图还是比较多,同时对于es 的信息展示还是很全的
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
2017-04-02 web 优化原则