-
-## Enabling app plugins
-After installing an app it have to be enabled before it show up as an datasource or panel. You can do that on the app page in the config tab.
-
-## README.md
-
-The readme file in the mounted folder will show up in the overview tab on the app page.
-
-## Module exports
-```javascript
-export {
- ExampleAppConfigCtrl as ConfigCtrl,
- StreamPageCtrl,
- LogsPageCtrl
-};
-```
-The only required export is the ConfigCtrl. Both StreamPageCtrl and LogsPageCtrl are custom pages defined in plugin.json
-
-## Custom pages
-Custom pages are defined in the plugin.json like this.
-```json
-"pages": [
- { "name": "Live stream", "component": "StreamPageCtrl", "role": "Editor"},
- { "name": "Log view", "component": "LogsPageCtrl", "role": "Viewer"}
-]
-```
-The component field have to match one of the components exported in the module.js in the root of the plugin.
-
-## Bundled plugins
-
-When Grafana starts it will scan all directories within an app plugin and load folders containing a plugin.json as an plugin.
diff --git a/docs/sources/plugins/apps.md b/docs/sources/plugins/apps.md
new file mode 100644
index 00000000000..74038a9feb9
--- /dev/null
+++ b/docs/sources/plugins/apps.md
@@ -0,0 +1,24 @@
+---
+page_title: App plugin
+page_description: App plugin for Grafana
+page_keywords: grafana, plugins, documentation
+---
+
+
+# Apps
+
+App plugins is a new kind of grafana plugin that can bundle datasource and panel plugins within one package. It also enable the plugin author to create custom pages within grafana. The custom pages enables the plugin author to include things like documentation, sign up forms or controlling other services using HTTP requests.
+
+Datasource and panel plugins will show up like normal plugins. The app pages will be available in the main menu.
+
+
+
+## Enabling app plugins
+After installing an app it have to be enabled before it show up as an datasource or panel. You can do that on the app page in the config tab.
+
+### Develop your own App
+
+> Our goal is not to have a very extensive documentation but rather have actual
+> code that people can look at. An example implementation of an app can be found
+> in this [example app repo](https://github.com/grafana/example-app)
+
diff --git a/docs/sources/plugins/datasources.md b/docs/sources/plugins/datasources.md
index c44cd842844..3732948d527 100644
--- a/docs/sources/plugins/datasources.md
+++ b/docs/sources/plugins/datasources.md
@@ -4,11 +4,18 @@ page_description: Datasource plugins for Grafana
page_keywords: grafana, plugins, documentation
---
- > Our goal is not to have a very extensive documentation but rather have actual code that people can look at. An example implementation of a datasource can be found in this [example datasource repo](https://github.com/grafana/simple-json-datasource)
# Datasources
-Datasource plugins enables people to develop plugins for any database that communicates over http. Its up to the plugin to transform the data into time series data so that any grafana panel can then show it.
+Datasource plugins enables people to develop plugins for any database that
+communicates over http. Its up to the plugin to transform the data into
+time series data so that any grafana panel can then show it.
+
+## Datasource development
+
+> Our goal is not to have a very extensive documentation but rather have actual
+> code that people can look at. An example implementation of a datasource can be
+> found in this [example datasource repo](https://github.com/grafana/simple-json-datasource)
To interact with the rest of grafana the plugins module file can export 5 different components.
@@ -19,11 +26,14 @@ To interact with the rest of grafana the plugins module file can export 5 differ
- AnnotationsQueryCtrl
## Plugin json
+
There are two datasource specific settings for the plugin.json
+
```javascript
"metrics": true,
"annotations": false,
```
+
These settings indicates what kind of data the plugin can deliver. At least one of them have to be true
## Datasource
diff --git a/docs/sources/plugins/developing_plugins.md b/docs/sources/plugins/development.md
similarity index 58%
rename from docs/sources/plugins/developing_plugins.md
rename to docs/sources/plugins/development.md
index def5b825df9..29dcd0568e3 100644
--- a/docs/sources/plugins/developing_plugins.md
+++ b/docs/sources/plugins/development.md
@@ -1,5 +1,5 @@
---
-page_title: Plugin development
+page_title: Plugin development guide
page_description: Plugin development for Grafana
page_keywords: grafana, plugins, documentation, development
---
@@ -10,8 +10,8 @@ From grafana 3.0 it's very easy to develop your own plugins and share them with
## Short version
-1. [Setup grafana](https://github.com/grafana/grafana/blob/master/DEVELOPMENT.md)
-2. Clone an example plugin into ```data/plugins```
+1. [Setup grafana](http://docs.grafana.org/project/building_from_source/)
+2. Clone an example plugin into ```/var/lib/grafana/plugins``` or `data/plugins` (relative to grafana git repo if your running development version from source dir)
3. Code away!
## What languages?
@@ -26,22 +26,27 @@ All our example plugins have build scripted configured.
## module.(js|ts)
-This is the entry point for every plugin. This is the place where you should export your plugin implementation. Depending on what kind of plugin you are developing you will be expected to export different things. You can find whats expected for [datasource](http://docs.grafana.org/v3.0/plugins/datasources/), [panels](http://docs.grafana.org/v3.0/plugins/panels/) and [apps](http://docs.grafana.org/v3.0/plugins/app/)
-plugins in the documentation.
+This is the entry point for every plugin. This is the place where you should export
+your plugin implementation. Depending on what kind of plugin you are developing you
+will be expected to export different things. You can find what's expected for [datasource](./datasources.md), [panels](./panels.md)
+and [apps](./apps.md) plugins in the documentation.
## Start developing your plugin
There are two ways that you can start developing a Grafana plugin.
-1. Setup a Grafana development environment. [(described here)](https://github.com/grafana/grafana/blob/master/DEVELOPMENT.md) and place your plugin in the ```data/plugins``` folder.
-2. Install Grafana and place your plugin the plugins directory which is set in your [config file](http://docs.grafana.org/installation/configuration/)
+
+1. Setup a Grafana development environment. [(described here)](http://docs.grafana.org/project/building_from_source/) and place your plugin in the ```data/plugins``` folder.
+2. Install Grafana and place your plugin in the plugins directory which is set in your [config file](../installation/configuration.md). By default this is `/var/lib/grafana/plugins` on Linux systems.
+3. Place your plugin directory anywhere you like and specify it grafana.ini.
We encourage people to setup the full Grafana environment so that you can get inspiration from the rest of grafana code base.
-When Grafana starts it will scan the plugin folders and mount every folder that contains a plugin.json file unless the folder contains a subfolder named dist. In that case grafana will mount the dist folder instead.
-This makes it possible to have both built and src content in the same plugin folder.
+When Grafana starts it will scan the plugin folders and mount every folder that contains a plugin.json file unless
+the folder contains a subfolder named dist. In that case grafana will mount the dist folder instead.
+This makes it possible to have both built and src content in the same plugin git repo.
-## Boilerplate
+## Examples
We currently have three different examples that you can fork/download to get started developing your grafana plugin.
- - [simple-json-datasource](https://github.com/grafana/simple-json-datasource) (small datasource plugin for quering json data from backends)
+ - [simple-json-datasource](https://github.com/grafana/simple-json-datasource) (small datasource plugin for querying json data from backends)
- [piechart-panel](https://github.com/grafana/piechart-panel)
- [example-app](https://github.com/grafana/example-app)
diff --git a/docs/sources/plugins/index.md b/docs/sources/plugins/index.md
new file mode 100644
index 00000000000..08654bfb946
--- /dev/null
+++ b/docs/sources/plugins/index.md
@@ -0,0 +1,21 @@
+---
+page_title: Plugin overview
+page_description: Plugins for Grafana
+page_keywords: grafana, plugins, documentation
+---
+
+# Plugins
+
+From Grafana 3.0 not only datasource plugins are supported but also panel plugins and apps.
+Having panels as plugins make it easy to create and add any kind of panel, to show your data
+or improve your favorite dashboards. Apps is something new in Grafana that enables
+bundling of datasources, panels, dashboards and Grafana pages into a cohesive experience.
+
+Grafana already have a strong community of contributors and plugin developers.
+By making it easier to develop and install plugins we hope that the community
+can grow even stronger and develop new plugins that we would never think about.
+
+You can discover available plugins on [Grafana.net](http://grafana.net)
+
+
+
diff --git a/docs/sources/plugins/installation.md b/docs/sources/plugins/installation.md
index 7a4ed1889f9..c83a54bdce3 100644
--- a/docs/sources/plugins/installation.md
+++ b/docs/sources/plugins/installation.md
@@ -4,14 +4,12 @@ page_description: Plugin installation for Grafana
page_keywords: grafana, plugins, documentation
---
-# Plugins
-
-## Installing plugins
+# Installing plugins
The easiest way to install plugins is by using the CLI tool grafana-cli which is bundled with grafana. Before any modification take place after modifying plugins, grafana-server needs to be restarted.
### Grafana plugin directory
-On Linux systems the grafana-cli will assume that the grafana plugin directory is "/var/lib/grafana/plugins". It's possible to override the directory which grafana-cli will operate on by specifing the --path flag. On Windows systems this parameter have to be specified for every call.
+On Linux systems the grafana-cli will assume that the grafana plugin directory is `/var/lib/grafana/plugins`. It's possible to override the directory which grafana-cli will operate on by specifying the --path flag. On Windows systems this parameter have to be specified for every call.
### Grafana-cli commands
@@ -30,14 +28,14 @@ List installed plugins
grafana-cli plugins ls
```
-Upgrade all installed plugins
+Update all installed plugins
```
-grafana-cli plugins upgrade-all
+grafana-cli plugins update-all
```
-Upgrade one plugin
+Update one plugin
```
-grafana-cli plugins upgrade Specify a complete HTTP url (http://your_server:8080)
+Specify a complete HTTP url (for example http://your_server:8080)
- Your access method isDirect, this means the url
+ Your access method is Direct, this means the url
needs to be accessable from the browser.
- Your access method is currently Proxy, this means the url
+ Your access method is currently Proxy, this means the url
needs to be accessable from the grafana backend.