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

Commit

Permalink
Refactors examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jcooklin committed Dec 8, 2015
1 parent e104776 commit e5e4207
Show file tree
Hide file tree
Showing 8 changed files with 331 additions and 1,062 deletions.
6 changes: 3 additions & 3 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ limitations under the License.
-->

# Examples
Example package contains a collection of snap examples and [videos](./videos.md) that demonstrate the snap libraries and usages.
Example package contains a collection of snap examples that demonstrate the snap libraries and usages.

* [configs](./configs) is an example of the global configuration file that powers your plugins
* [influxdb-grafana](./influxdb-grafana) has an example of [snap Influxdb publisher plugin](https://github.com/intelsdi-x/snap-plugin-publisher-influxdb). The example demonstrates
Intel [PCM](https://software.intel.com/en-us/articles/intel-performance-counter-monitor) (Performance Counter Monitor) and [PSUTIL](https://github.com/intelsdi-x/snap-plugin-collector-psutil) (Processes and System Utilization) plugins to publish data into Influxdb and using Grafana to view the results.
* [influxdb-grafana](./influxdb-grafana) Has an example that shows
publishing [psutil](https://github.com/intelsdi-x/snap-plugin-collector-psutil) (Processes and System Utilization) data into [Influxdb](https://github.com/intelsdi-x/snap-plugin-publisher-influxdb) and using Grafana to view the results
* [riemann](./riemann) has an example of [snap Riemann publisher plugin](https://github.com/intelsdi-x/snap-plugin-publisher-riemann)
* [tasks](./tasks) has JSON and YAML formatted execution requests for snap tasks
36 changes: 14 additions & 22 deletions examples/influxdb-grafana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,35 +17,27 @@ See the License for the specific language governing permissions and
limitations under the License.
-->

# docker-compose based examples

These examples all include configuring and starting influxdb (a time series database) and grafana (a metrics dashboard).

You can find demo videos [here](../videos.md).

### How to run the example

These examples all include configuring and starting influxdb (a time series database) and grafana (a metrics dashboard).
This example includes configuring and starting influxdb (a time series database) and grafana (a metrics dashboard).

The following scripts can be used to start the demos
The example:
- Starts containers for Influxdb and Grafana (using Dockwer)
- Starts snapd
- Gets, loads and starts snap plugins
- Creates and starts a task that collects from psutil and publishes to InfluxDB

Start the example by running `run-psutil.sh`

- run-pcm.sh *\<docker-machine name\>*
- starts snapd
- creates and starts a task that collects from both the pcm and psutil plugins
- run-psutil.sh *\<docker-machine\>*
- starts snapd
- creates and starts a task that collects from psutil plugin
- ./run.sh *\<docker-machine\>*
- configured influxdb and grafana only
![run-psutil.sh](http://i.giphy.com/d2Zhwlh8lMZM9nkQ.gif)

### Requirements
- docker-machine
+ installed and configured

- docker-compose
+ installed
- docker
- docker-compose
- netcat
- SNAP_PATH env var set to the snap build directory

- PCM configured on the host
Note: The script also supports docker-machine but doesn't require it.

### Issues/Warning

Expand Down
Loading

0 comments on commit e5e4207

Please sign in to comment.