From 387a3c047e84160873928e532298e66bb68f071e Mon Sep 17 00:00:00 2001 From: David Kaltschmidt Date: Tue, 19 Apr 2016 10:43:29 +0200 Subject: [PATCH] Fix plugins docs * fix json highlighting on github * added screenshot * note about kernel version for bcc plugin * sentence about seeing plugin in the UI --- examples/plugins/README.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/plugins/README.md b/examples/plugins/README.md index 2cec47958..51a1fe63d 100644 --- a/examples/plugins/README.md +++ b/examples/plugins/README.md @@ -2,6 +2,8 @@ Scope probe plugins let you insert your own custom metrics into Scope and get them displayed in the UI. +Scope Probe plugin screenshot + You can find some examples at the [the example plugins](https://github.com/weaveworks/scope/tree/master/examples/plugins) directory. We currently provide two examples: @@ -9,6 +11,7 @@ directory. We currently provide two examples: [Python plugin](https://github.com/weaveworks/scope/tree/master/examples/plugins/http-requests) using [bcc](http://iovisor.github.io/bcc/) to extract incoming HTTP request rates per process, without any application-level instrumentation requirements. + **Note:** This plugin needs a kernel version 4.3+. It will not compile on current [dlite](https://github.com/nlf/dlite) and boot2docker hosts. * A [Go plugin](https://github.com/weaveworks/scope/tree/master/examples/plugins/iovisor), using [iostat](https://en.wikipedia.org/wiki/Iostat) to provide host-level CPU IO wait @@ -19,6 +22,9 @@ This will build the plugin, and immediately run it in the foreground. To run the plugin in the background, see the `Makefile` for examples of the `docker run ...` command. +If the running plugin was picked up by Scope, you will see it in the list of `PLUGINS` +in the bottom right of the UI. + ## Protocol @@ -42,14 +48,13 @@ probe's report and sent to the app. An example of the report structure can be viewed at the `/api/report` endpoint of any scope app. In addition to any data about the topology nodes, the report returned -from the plugin must include some information about the plugin. +from the plugin must include some metadata about the plugin itself. For example: ```json { - "Processes: { ... }, - ... + "Processes": {}, "Plugins": [ { "id": "iowait", @@ -62,9 +67,9 @@ For example: } ``` -Note that the "Plugins" section includes exactly one plugin +Note that the `Plugins` section includes exactly one plugin description. The plugin description fields are: -"interfaces" including "reporter". +`interfaces` including `reporter`. The fields are: