From bc738d5648e2288b0895c1d7c545edcfbcd4124f Mon Sep 17 00:00:00 2001 From: Izabella Raulin Date: Wed, 13 Sep 2017 11:39:55 +0200 Subject: [PATCH] Updated SNAPTEL.md - added mention about separated snap-cli repo (#1732) --- docs/SNAPTEL.md | 55 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 44 insertions(+), 11 deletions(-) diff --git a/docs/SNAPTEL.md b/docs/SNAPTEL.md index 928f981fb..624cc0ec9 100644 --- a/docs/SNAPTEL.md +++ b/docs/SNAPTEL.md @@ -18,16 +18,45 @@ limitations under the License. --> # snaptel -A powerful telemetry framework -## Usage -The `snap-telemetry` package installs `snaptel` in `/usr/local/sbin/snaptel`, and `snapteld` in `/usr/local/sbin/snapteld`. Either ensure `/usr/local/bin:/usr/local/sbin` is in your path, or use fully qualified filepath to the `snaptel`/`snapteld` binary: +The command-line interface (CLI) for Snap - a powerful telemetry framework + +## General information + +### Snap CLI on top of REST API V1 + +The `snaptel` which bases on [REST API V1](REST_API_V1.md) is available in the main Snap repo, as a part of +[Snap releases](https://github.com/intelsdi-x/snap/releases) and `snap-telemetry` package. + + +### Snap CLI on top of REST API V2 + +The _alpha version_ of `snaptel` which relays on [Snap API Go client](https://github.com/intelsdi-x/snap-client-go) talking to [REST API V2](REST_API_V2.md) is available in a separate repo [snap-cli](https://github.com/intelsdi-x/snap-cli). + +The separated Snap API client and CLI support [Swagger Open API Specification](https://swagger.io/specification). The Snap API client can be autogenerated based on provided [swagger.json](https://github.com/intelsdi-x/snap/swagger.json) in different languages/frameworks supported by [swagger-code-generator](https://github.com/swagger-api/swagger-codegen#swagger-code-generator) - to generate a new Snap API client in your preferred language, please follow the instruction provided there. + +To get more help on the Snap API client and Snap CLI check out: + - [snap-client-go](https://github.com/intelsdi-x/snap-client-go) + - [snap-cli](https://github.com/intelsdi-x/snap-cli) + + +**Important:** +_For Snap daemon running in the [Tribe mode](TRIBE.md), please use `snaptel` which bases on REST API V1 since Tribe commands +are not yet supported by REST API V2_ + + +## Snap CLI (REST API V1) + +### Usage +The `snap-telemetry` package installs `snaptel` in `/usr/local/sbin/snaptel`, and `snapteld` +in `/usr/local/sbin/snapteld`. Either ensure `/usr/local/bin:/usr/local/sbin` is in your path, or use fully qualified filepath to +the `snaptel`/`snapteld` binary: ``` $ snaptel [global options] command [command options] [arguments...] ``` -### Global Options +#### Global Options ``` --url, -u 'http://localhost:8181' Sets the URL to use [$SNAP_URL] --insecure Ignore certificate errors when Snap's API is running HTTPS [$SNAP_INSECURE] @@ -38,7 +67,7 @@ $ snaptel [global options] command [command options] [arguments...] --version, -v print the version ``` -### Commands +#### Commands ``` metric plugin @@ -46,9 +75,9 @@ task help, h Shows a list of commands or help for one command ``` -### Command Options +#### Command Options -#### task +##### task ``` $ snaptel task command [command options] [arguments...] ``` @@ -82,7 +111,7 @@ enable enable help, h Shows a list of commands or help for one command ``` -#### plugin +##### plugin ``` $ snaptel plugin command [command options] [arguments...] ``` @@ -94,7 +123,7 @@ list list help, h Shows a list of commands or help for one command ``` -#### metric +##### metric ``` $ snaptel metric command [command options] [arguments...] ``` @@ -203,8 +232,12 @@ $ snaptel task create -w workflow.json -i 1s -d 10s $ snaptel task list $ snaptel plugin unload collector mock $ snaptel plugin unload processor passthru -$ snaptel plugin unload publisher publisher +$ snaptel plugin unload publisher mock-file ``` -## More information +### More information * [SECURE_PLUGIN_COMMUNICATION](SECURE_PLUGIN_COMMUNICATION.md) + +## Snap CLI (REST API V2) +The documentation for the Snap CLI which bases on REST API V2 is located in [snap-cli](https://github.com/intelsdi-x/snap-cli). +Please, be aware that this is currently in **alpha stage**.