Command
Overview
Casvisor provides a command feature that allows you to execute commands on multiple machines via SSH. This feature is useful for managing multiple machines at the same time. You can execute commands on multiple machines at the same time, and the results will be displayed in the web UI. Casvisor also exposes API for executing commands.
Usage
- Click the
add
button in the command list page to add a new command. - Input the command in the command input box, if you want to execute multiple commands, you can input commands in multiple lines.
- Select the assets of SSH protocol that you want to execute the command on.
- Click the
Run All
button to execute the command on all selected assets. Or click theRun
button to execute the command on a single asset.
API
Casvisor provides an API for executing commands. The API is as follows:
Get /api/get-exec-output
Params:
- id: The id ( owner/name ) of the command
Response:
{
"code": 200,
"msg": "success",
"data": {
"<asset name1>": "output",
"<asset name2>": "output"
}
}