snapctl
A powerful telemetry agent framework
Usage
$SNAP_PATH/bin/snapctl [global options] command [command options] [arguments...]
Global Options
--url, -u 'http://localhost:8181' sets the URL to use [$SNAP_URL]
--help, -h show help
--version, -v print the version
Commands
task
plugin
metric
help, h Shows a list of commands or help for one command
Command Options
task
create create <task file json|yaml>
list list
start start <task_id>
stop stop <task_id>
remove remove <task_id>
enable enable <task_id>
help, h Shows a list of commands or help for one command
plugin
load load <plugin path>
unload unload -n <plugin_name> -v <plugin_version>
list list
help, h Shows a list of commands or help for one command
metric
list list
help, h Shows a list of commands or help for one command
Example Usage
Load and unload plugins, create and start a task
Start snap with the REST interface enabled
$SNAP_PATH/bin/snapd
- load a collector plugin
- load a processing plugin
- load a publishing plugin
- list the plugins
- create a task
- start a task
- list the tasks
- unload a plugin
$SNAP_PATH/bin/snapctl plugin load $SNAP_PATH/plugin/snap-collector-psutil
$SNAP_PATH/bin/snapctl plugin load $SNAP_PATH/plugin/snap-collector-mock1
$SNAP_PATH/bin/snapctl plugin load $SNAP_PATH/plugin/snap-processor-passthru
$SNAP_PATH/bin/snapctl plugin load $SNAP_PATH/plugin/snap-publisher-influxdb
$SNAP_PATH/bin/snapctl plugin load $SNAP_PATH/plugin/snap-publisher-file
$SNAP_PATH/bin/snapctl plugin list
$SNAP_PATH/bin/snapctl task create -t $SNAP_PATH/../cmd/snapctl/sample/psutil-influx.json
$SNAP_PATH/bin/snapctl task list
$SNAP_PATH/bin/snapctl plugin unload -n psutil -v 1