Extend plugin documentation

* Add section to main README
* Add introduction to plugins-specific README
This commit is contained in:
Alfonso Acosta
2016-04-14 15:48:55 +00:00
committed by Paul Bellamy
parent 412fdd1a27
commit 5f7c49197d
3 changed files with 34 additions and 3 deletions

View File

@@ -1,4 +1,24 @@
# Scope Plugins
# Scope Probe Plugins
Scope probe plugins let you insert your own custom metrics into Scope and get them displayed in the UI.
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:
* A
[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.
* 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
metrics.
The example plugins can be run by calling `make` in their directory.
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.
## <a id="protocol"></a>Protocol
@@ -13,8 +33,6 @@ reports from it via `GET /report`.
All plugin endpoints are expected to respond within 500ms, and respond in the JSON format.
For more information see [the example plugins.](https://github.com/weaveworks/scope/tree/master/example/plugins)
### <a id="report"></a>Report
When the scope probe discovers a new plugin unix socket it will begin