Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Updated SNAPTEL.md - added mention about separated snap-cli repo (#1732)
Browse files Browse the repository at this point in the history
  • Loading branch information
IzabellaRaulin committed Sep 13, 2017
1 parent c78db8d commit bc738d5
Showing 1 changed file with 44 additions and 11 deletions.
55 changes: 44 additions & 11 deletions docs/SNAPTEL.md
Expand Up @@ -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]
Expand All @@ -38,17 +67,17 @@ $ snaptel [global options] command [command options] [arguments...]
--version, -v print the version
```

### Commands
#### Commands
```
metric
plugin
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...]
```
Expand Down Expand Up @@ -82,7 +111,7 @@ enable enable <task_id>
help, h Shows a list of commands or help for one command
```

#### plugin
##### plugin
```
$ snaptel plugin command [command options] [arguments...]
```
Expand All @@ -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...]
```
Expand Down Expand Up @@ -203,8 +232,12 @@ $ snaptel task create -w workflow.json -i 1s -d 10s
$ snaptel task list
$ snaptel plugin unload collector mock <version>
$ snaptel plugin unload processor passthru <version>
$ snaptel plugin unload publisher publisher <version>
$ snaptel plugin unload publisher mock-file <version>
```

## 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**.

0 comments on commit bc738d5

Please sign in to comment.