elasticsearch REST API转义序列 [英] elasticsearch REST API escape sequence
本文介绍了elasticsearch REST API转义序列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我碰巧通过 logstash
ruby过滤器代码创建了一个奇怪的索引名称 osquery-mounts-%host'}}
,
I happened created a strange index name osquery-mounts-%host"}
via logstash
ruby filter code,
现在我无法删除它:
curl -XDELETE 'http://el:9200/osquery-mounts-%host"}'
它报告错误
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"invalid escape sequence `%ho' at index 15 of: osquery-mounts-%host"}],"type":"illegal_argument_exception","reason":"invalid escape sequence `%ho' at index 15 of: osquery-mounts-%host"},"status":400}[
无论我添加反斜杠以逃避%和{},它都会报告类似的错误.
Whatever I add backslash to escape % and { }, it report similar error.
我也尝试过从kibana开发工具中删除它,但失败了.
I'v also tried delete it from kibana develop tools but failed.
如何删除索引?
推荐答案
对不起,我知道了.
curl -sSL -XDELETE 'http://el:9200/osquery-mounts-%%\{host\}'
使用%%转义%,使用反斜杠转义{和}
Use %% to escape %, use backslash to escape { and }
这篇关于elasticsearch REST API转义序列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文