Kaynağa Gözat

docs: manual installation of plugins

Daniel Lee 8 yıl önce
ebeveyn
işleme
2877ad1a7d
1 değiştirilmiş dosya ile 42 ekleme ve 3 silme
  1. 42 3
      docs/sources/plugins/installation.md

+ 42 - 3
docs/sources/plugins/installation.md

@@ -19,15 +19,15 @@ can grow even stronger and develop new plugins that we would never think about.
 
 To discover plugins checkout the official [Plugin Repository](https://grafana.com/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
+### 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 specifying the --pluginsDir flag. On Windows systems this parameter have to be specified for every call.
 
-### Grafana-cli commands
+### Grafana-cli Commands
 
 List available plugins
 ```
@@ -63,3 +63,42 @@ Remove one plugin
 ```
 grafana-cli plugins remove <plugin-id>
 ```
+
+### Installing Plugins Manually
+
+If your Grafana Server does not have access to the Internet, then the plugin will have to downloaded and manually copied to your Grafana Server.
+
+The Download URL from Grafana.com API is in this form:
+
+`https://grafana.com/api/plugins/<plugin id>/versions/<version number>/download`
+
+To manually install a Plugin via the Grafana.com API:
+
+1. Find the plugin you want to download, the plugin id can be found on the Installation Tab on the plugin's page on Grafana.com. In this example, the plugin id is `jdbranham-diagram-panel`:
+
+    {{< imgbox img="/img/docs/installation-tab.png" caption="Installation Tab" >}}
+
+2. Use the Grafana API to find the plugin using this url `https://grafana.com/api/plugins/<plugin id from step 1>`. For example: https://grafana.com/api/plugins/jdbranham-diagram-panel should return:
+    ```
+    {
+      "id": 145,
+      "typeId": 3,
+      "typeName": "Panel",
+      "typeCode": "panel",
+      "slug": "jdbranham-diagram-panel",
+      "name": "Diagram",
+      "description": "Diagram panel for grafana",
+    ...
+    ```
+
+3. Find the download link:
+    ```
+    {
+       "rel": "download",
+       "href": "/plugins/jdbranham-diagram-panel/versions/1.4.0/download"
+    }
+    ```
+
+4. Download the plugin with `https://grafana.com/api/plugins/<plugin id from step 1>/versions/<current version>/download` (for example: https://grafana.com/api/plugins/jdbranham-diagram-panel/versions/1.4.0/download). Unzip the downloaded file into the Grafana Server's `data/plugins` directory.
+
+5. Restart the Grafana Server.