|
|
# Stork CLI
|
|
|
|
|
|
There is currently no dedicated Stork Command Line Interface available. However, an existing tool called [grpcurl](https://github.com/fullstorydev/grpcurl) can be used.
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
Ubuntu: ...
|
|
|
|
|
|
MacOS: `brew install grpcurl`
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
List available APIs:
|
|
|
|
|
|
```
|
|
|
$ grpcurl -plaintext -proto backend/api/agent.proto localhost:8888 describe agentapi.Agent
|
|
|
agentapi.Agent is a service:
|
|
|
service Agent {
|
|
|
rpc detectServices ( .agentapi.DetectServicesReq ) returns ( .agentapi.DetectServicesRsp );
|
|
|
rpc getState ( .agentapi.GetStateReq ) returns ( .agentapi.GetStateRsp );
|
|
|
rpc restartKea ( .agentapi.RestartKeaReq ) returns ( .agentapi.RestartKeaRsp );
|
|
|
}
|
|
|
```
|
|
|
|
|
|
Use specific API:
|
|
|
```
|
|
|
$ grpcurl -plaintext -proto backend/api/agent.proto localhost:8888 agentapi.Agent.getState
|
|
|
{
|
|
|
"agentVersion": "0.1.0",
|
|
|
"hostname": "copernicus",
|
|
|
"cpus": "8",
|
|
|
"cpusLoad": "1.68 1.46 1.28",
|
|
|
"memory": "16",
|
|
|
"usedMemory": "59",
|
|
|
"uptime": "2",
|
|
|
"os": "darwin",
|
|
|
"platform": "darwin",
|
|
|
"platformFamily": "Standalone Workstation",
|
|
|
"platformVersion": "10.14.6",
|
|
|
"kernelVersion": "18.7.0",
|
|
|
"kernelArch": "x86_64",
|
|
|
"hostID": "c41337a1-0ec3-3896-a954-a1f85e849d53"
|
|
|
}
|
|
|
``` |
|
|
\ No newline at end of file |