ElasticSearch CAT API的命令行包装
escat的Python项目详细描述
#elasticsearch cat cli
具有多集群支持的基本elasticsearch cat api命令行包装器
[![构建状态](https://travis-ci.org/anishmcloud/escat.svg?branch=master)(https://travis ci.org/anishmcloud/escat)
[![pypi](https://img.shields.io/pypi/v/escat.svg)(https://pypi.org/project/escat/)
功能:
-完整覆盖所有ElasticSearch“CAT”模块
-将“CAT”API调用选项公开为命令行参数
-以JSON格式获取输出,或text
-使用配置文件管理多个群集
-支持ssl和密码身份验证
\当前用户的名为`~/escat.yml`。该文件将拥有默认配置:
``yaml
clust群集:
默认:
默认:
hosts:[“http://localhost:9200”]
```
#问:是
值:'elastic'
ssl:
启用:否
证书:'
ca:[]
私钥:'
验证证书:是
````
文件的内容非常简单。密钥:“auth”和“ssl”被禁用,但对于如何为发送到elasticsearch的请求配置身份验证,可以查看这些密钥。下面提到的是多集群配置。对于其余文档,我们将使用此配置文件运行命令:
``yaml
群集:
默认:
主机:['http://localhost:9200']
开发:
主机:['https://dev-es-1:9200','https://dev-es-2:9200']
产品:
主机:['https://prod-es-1:9200',,'https://prod-es-2:9200']
ssl:
启用:是
证书:'~/.openssl/certs/prod-es-cert.cert'
ca:['~/.openssl/cas/prod-ca-1.cert','~/.openssl/cas/prod-ca-2.cert']
私钥:'~/.openssl/certs/prod-es-cert.key'
verify-certs:yes
``` ` `
如果设置如下配置:
``yaml
集群:
集群:
默认值:
主机:['http://localhost:9200']
身份:
用户名:'弹性'
密码:
问:是
``
你将在命令行上询问密码。
运行
了解一些选项,请直接参考上面的配置示例。
get help for commands
`````
escat-h
`````
get cluster health for default cluster
```l
escat health
`````
get count for selective index in the dev cluster
````
get recovery information on prodjson格式的集群
```
escat--cluster prod--format json recovery
```
使用不同的配置文件
````
escat--config~/.es.yml--cluster dev health
````
此外,为了使调试人员的生活更轻松,应该始终包括以下信息:
-command ran
-操作系统
-python版本
-elasticsearch版本
目前,escat仅在ubuntu 16.04、windows 10和mac osx上的python 3.6.5上测试。
prs是受欢迎的。一定要简要地说明公关会解决什么问题。如果公关是一种检查表的形式,那就太棒了。
具有多集群支持的基本elasticsearch cat api命令行包装器
[![构建状态](https://travis-ci.org/anishmcloud/escat.svg?branch=master)(https://travis ci.org/anishmcloud/escat)
[![pypi](https://img.shields.io/pypi/v/escat.svg)(https://pypi.org/project/escat/)
功能:
-完整覆盖所有ElasticSearch“CAT”模块
-将“CAT”API调用选项公开为命令行参数
-以JSON格式获取输出,或text
-使用配置文件管理多个群集
-支持ssl和密码身份验证
\当前用户的名为`~/escat.yml`。该文件将拥有默认配置:
``yaml
clust群集:
默认:
默认:
hosts:[“http://localhost:9200”]
```
#问:是
值:'elastic'
ssl:
启用:否
证书:'
ca:[]
私钥:'
验证证书:是
````
文件的内容非常简单。密钥:“auth”和“ssl”被禁用,但对于如何为发送到elasticsearch的请求配置身份验证,可以查看这些密钥。下面提到的是多集群配置。对于其余文档,我们将使用此配置文件运行命令:
``yaml
群集:
默认:
主机:['http://localhost:9200']
开发:
主机:['https://dev-es-1:9200','https://dev-es-2:9200']
产品:
主机:['https://prod-es-1:9200',,'https://prod-es-2:9200']
ssl:
启用:是
证书:'~/.openssl/certs/prod-es-cert.cert'
ca:['~/.openssl/cas/prod-ca-1.cert','~/.openssl/cas/prod-ca-2.cert']
私钥:'~/.openssl/certs/prod-es-cert.key'
verify-certs:yes
``` ` `
如果设置如下配置:
``yaml
集群:
集群:
默认值:
主机:['http://localhost:9200']
身份:
用户名:'弹性'
密码:
问:是
``
你将在命令行上询问密码。
运行
了解一些选项,请直接参考上面的配置示例。
get help for commands
`````
escat-h
`````
get cluster health for default cluster
```l
escat health
`````
get count for selective index in the dev cluster
````
get recovery information on prodjson格式的集群
```
escat--cluster prod--format json recovery
```
使用不同的配置文件
````
escat--config~/.es.yml--cluster dev health
````
此外,为了使调试人员的生活更轻松,应该始终包括以下信息:
-command ran
-操作系统
-python版本
-elasticsearch版本
目前,escat仅在ubuntu 16.04、windows 10和mac osx上的python 3.6.5上测试。
prs是受欢迎的。一定要简要地说明公关会解决什么问题。如果公关是一种检查表的形式,那就太棒了。