Skip to main content

KetaDB Client

Project description

ketadb 工具

示例

ketacli login --name <username> --endpoint http://localhost:9000 --token <yourtoken>

ketacli logout

# 枚举所有仪表盘
ketacli list dashboard --fields id,app,updateTime --sort updateTime --order asc --prefix test 

# 描述资源的字段
ketacli describe dashboard 

# 插入一条数据

ketacli insert --repo test01 '[{"a":1}]'

# 查询一条数据

ketacli search 'repo=test01 | limit 10' 

# 指定返回格式,支持json、csv、html、latex等

ketacli search 'repo=test01 | limit 10' --format json

#  创建一个资源

ketacli create repos test_repo --file file.json

# 删除一个资源
ketacli delete repos -n test_repo

# 查看可操作的资源列表
ketacli rs

# 查看具体资源操作方法
ketacli rs --type repos

# watch 资源变化
ketacli list repo --watch

ketacli search '''search2 repo="*"|stats count() as cnt by repo,sourcetype |sort by cnt |limit 10''' -w --interval 1

自动补全

在你的 .bashrc / .zshrc 中加入以下语句

#zshrc 中不存在的话也需要添加
autoload -U +X bashcompinit && bashcompinit

eval "$(register-python-argcomplete ketacli)"

Project details


Release history Release notifications | RSS feed

This version

0.20

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ketacli-0.20.tar.gz (25.6 kB view details)

Uploaded Source

File details

Details for the file ketacli-0.20.tar.gz.

File metadata

  • Download URL: ketacli-0.20.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.6

File hashes

Hashes for ketacli-0.20.tar.gz
Algorithm Hash digest
SHA256 86cf0941de04b8e99fa928d88726174e9de52d34845eb1249b4644a017f47e7d
MD5 a84203698e4efad74abff92520693164
BLAKE2b-256 63916aa1e18b937792c6dfbc3f778710322c3a2fa57a52abc6517cf4a665ec88

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page