如何删除 Elasticsearch 中 Jaeger 的旧索引?
How to remove old indices of Jaeger in Elasticsearch?
我将 Jaeger 与 Elasticsearch 结合使用,我想删除旧索引。我尝试了 jaeger-es-index-cleaner
,参见 Remove old data:
Remove old data
The historical data can be removed with the jaeger-es-index-cleaner
that is also used for daily indices.
docker run -it --rm --net=host -e ROLLOVER=true jaegertracing/jaeger-es-index-cleaner:latest 14 http://localhost:9200 # <1>
<1> Remove indices older than 14 days.
日志
我试图删除所有超过 2 天的索引,但没有删除任何索引:
$ docker run -it --rm --net=host -e ROLLOVER=true jaegertracing/jaeger-es-index-cleaner:latest 2 http://localhost:9200
No indices to delete
指数
如果我用 http://localhost:9200/_cat/indices
列出所有索引,我仍然看到旧索引:
yellow open jaeger-service-2021-04-09 vhdjlv5BR9yHhFgqmemiPA 5 1 70 1 38.6kb 38.6kb
yellow open jaeger-span-2021-04-09 Z-o78_oiStuiEdDJO79_6Q 5 1 49091 0 2mb 2mb
yellow open jaeger-dependencies-2021-04-13 tgCw5vK1SeG5oa6m-4osBQ 1 1 1 0 9kb 9kb
yellow open jaeger-service-2021-04-12 zi2ifth0RVKxyYNlfqe4kA 5 1 87 1 66.4kb 66.4kb
yellow open jaeger-span-2021-04-12 DeDPz2kNQKWiTI5v5rgKTg 5 1 5780283 0 188.5mb 188.5mb
yellow open jaeger-service-2021-04-13 vztAwPDPS2-okqywSGOIxw 5 1 81 22 70.7kb 70.7kb
yellow open jaeger-span-2021-04-13 SMJA7pJrQ6qZYsTXnwQVsw 5 1 4102841 0 141mb 141mb
问题
如何从 Elasticsearch 中删除 Jaeger 的旧索引?
删除 -e ROLLOVER=true
做到了:
$ docker run -it --rm --net=host jaegertracing/jaeger-es-index-cleaner:latest 2 http://localhost:9200
我将 Jaeger 与 Elasticsearch 结合使用,我想删除旧索引。我尝试了 jaeger-es-index-cleaner
,参见 Remove old data:
Remove old data
The historical data can be removed with the
jaeger-es-index-cleaner
that is also used for daily indices.docker run -it --rm --net=host -e ROLLOVER=true jaegertracing/jaeger-es-index-cleaner:latest 14 http://localhost:9200 # <1>
<1> Remove indices older than 14 days.
日志
我试图删除所有超过 2 天的索引,但没有删除任何索引:
$ docker run -it --rm --net=host -e ROLLOVER=true jaegertracing/jaeger-es-index-cleaner:latest 2 http://localhost:9200
No indices to delete
指数
如果我用 http://localhost:9200/_cat/indices
列出所有索引,我仍然看到旧索引:
yellow open jaeger-service-2021-04-09 vhdjlv5BR9yHhFgqmemiPA 5 1 70 1 38.6kb 38.6kb
yellow open jaeger-span-2021-04-09 Z-o78_oiStuiEdDJO79_6Q 5 1 49091 0 2mb 2mb
yellow open jaeger-dependencies-2021-04-13 tgCw5vK1SeG5oa6m-4osBQ 1 1 1 0 9kb 9kb
yellow open jaeger-service-2021-04-12 zi2ifth0RVKxyYNlfqe4kA 5 1 87 1 66.4kb 66.4kb
yellow open jaeger-span-2021-04-12 DeDPz2kNQKWiTI5v5rgKTg 5 1 5780283 0 188.5mb 188.5mb
yellow open jaeger-service-2021-04-13 vztAwPDPS2-okqywSGOIxw 5 1 81 22 70.7kb 70.7kb
yellow open jaeger-span-2021-04-13 SMJA7pJrQ6qZYsTXnwQVsw 5 1 4102841 0 141mb 141mb
问题
如何从 Elasticsearch 中删除 Jaeger 的旧索引?
删除 -e ROLLOVER=true
做到了:
$ docker run -it --rm --net=host jaegertracing/jaeger-es-index-cleaner:latest 2 http://localhost:9200