|
1 | 1 | # CoScale command line interface |
2 | | -The CoScale command line interface is an interface to the CoScale API. |
3 | 2 |
|
4 | | -It provides easy to use methods for: |
5 | | -* Managing servers and server groups. |
6 | | -* Push metric groups, metrics and data. |
7 | | -* Register events and event categories. |
8 | | -* List, acknowledge and resolve your alerts. |
9 | | - |
10 | | -## Compilation |
11 | | - |
12 | | -### Linux / Mac OS X |
13 | | - |
14 | | - |
15 | | -1. `$ git clone https://github.com/CoScale/coscale-tools.git` |
16 | | -1. [(Install Go Programming Language)](https://golang.org/doc/install) |
17 | | -1. `$ cd coscale-tools/cli` |
18 | | -1. `sh build.sh` |
19 | | - |
20 | | -## Usage |
21 | | - cli-cmd a tool for CoScale Api. |
22 | | - |
23 | | - Usage: |
24 | | - alert <action> [--<field>='<data>'] |
25 | | - |
26 | | - Actions for command "alert": |
27 | | - |
28 | | - list |
29 | | - alert list [--filter] |
30 | | - acknowledge |
31 | | - alert acknowledge (--id | --name) |
32 | | - resolve |
33 | | - alert resolve (--id | --name) |
34 | | - |
35 | | - |
36 | | - The json objects are returned formatted by default, but can be returned on 1 line by using: |
37 | | - --rawOutput |
38 | | - |
39 | | - The CoScale api configuration (authentication) by default will be taken from api.conf file, |
40 | | - placed in the same folder with the cli-cmd. api.conf file it is the same configuration file |
41 | | - used by the CoScale agent. If the api.conf file doesn't exists, the informations also can be |
42 | | - provided on the command line using: |
43 | | - --api-url |
44 | | - Base url for the api (optional, default = "https://api.coscale.com/"). |
45 | | - --app-id |
46 | | - The application id. |
47 | | - --access-token |
48 | | - A valid access token for the given application. |
49 | | - |
50 | | - Use "cli-cmd [object] <help>" for more information about a command. |
51 | | - |
52 | | -## Examples |
53 | | - |
54 | | -Adding a CoScale event category with custom attributes exitCode and executionTime (in seconds). |
55 | | - |
56 | | -`./coscale-cli event new --name "Example category" --attributeDescriptions "[{\"name\":\"exitCode\", \"type\":\"integer\"}, {\"name\":\"executionTime\", \"type\":\"integer\", \"unit\":\"s\"}]" --source "CLI"` |
57 | | - |
58 | | -Adding a CoScale event to "Example category" with name 'Event example', exitCode '0' and an executionTime of 10 seconds. |
59 | | - |
60 | | -`./coscale-cli event data --name "Example category" --message "Event example" --subject "a" --attribute "{\"exitCode\":0, \"executionTime\":10}"`` |
| 3 | +## [Go to documentation](http://docs.coscale.com/usage/cli/index/) |
0 commit comments