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

Updated SNAPTEL.md - added mention about separated snap-cli repo #1732

Merged
merged 7 commits into from
Sep 13, 2017
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 43 additions & 10 deletions docs/SNAPTEL.md
Original file line number Diff line number Diff line change
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 separated repo [snap-cli](https://github.com/intelsdi-x/snap-cli).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor correction:
in separated repo --> in a separate repo


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 @@ -206,5 +235,9 @@ $ snaptel plugin unload processor passthru <version>
$ snaptel plugin unload publisher publisher <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**.