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

Latest commit

 

History

History

docker-example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Running an example in docker-compose

Requirements

  • docker and docker-compose are installed and configured
  • this plugin downloaded and configured
  • build snap-relay for Linux by running GOOS=linux go build -o snap-relay main.go from the top level of the snap-relay repo

Example

This docker-compose example will load two plugins: snap-relay and snap-plugin-publisher-influxdb, start a task, and publish metrics to influxDB from the relay collector plugin.

Start your containers

In a terminal window navigate to the docker-example directory of this plugin and run,

$ docker-compose up -d

Check that the two plugins and the task manifest were loaded correctly:

$ docker logs init

docker-compose-new-take3

Explore the relay container

$ docker exec -it snap ash

The above command will open a bash terminal where you can perform normal snaptel commands such as the following, $ snaptel plugin list, $ snaptel metric list, $ snaptel task list, etc. You can see the full list of snap commands here.

To exit the container, $ exit.

relay-container-take2

Explore the influxDB container and influx database

$ docker exec -it influxdb bash

The above command will drop you into a bash terminal in the influxDB container. To access the influx database first type, ```$ influx````

Specify which database you want to use:

$ use snap

You can see the full list of series,

$ show series

To see the metrics from a specific series,

$ select * from "<SOME_SERIES>"

Visit docs.influxdata.com to see the full list of capabilities of the influxDB interactive shell.

To close the container, $ exit and $ exit again.

influxdb-container