这是基于阿里巴巴 iLogtail 项目 Config Server 通信协议的一个命令行实现,使用 Cobra 开发。
快速开始
git clone https://github.com/liangry/cscli
cd cscli
go build
# 执行命令前,先启动 iLogtai Config Server
export CONFIG_SERVER_ADDRESS=http://127.0.0.1:8899
./cscli group list
命令速查
命令
接口
示例
缩写
group list
ListAgentGroups
cscli group list
cscli g l
group get
GetAgentGroup
cscli group get --name default
cscli g g -n default
group create
CreateAgentGroup
cscli group create --name test --desc "unit test" cluster unit
cscli g cr -n test -d "unit test" cluster unit
group update
UpdateAgentGroup
cscli group update --name test --desc "uat test" cluster uat
cscli g u -n test -d "uat test" cluster uat
group delete
DeleteAgentGroup
cscli group delete --name test
cscli g d -n test
config create
CreateConfig
cscli config create --name test --file /path/to/config
cscli c c -n test -f /path/to/config
config list
ListConfigs
cscli config list
cscli c l
config get
GetConfig
cscli config get --name test
cscli c ge -n test
config update
UpdateConfig
cscli config update --name test --file /path/to/config
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.