Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 22 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ Once you have added your API token to Netdata data source plugin you’re ready
To start using the Netdata data source plugin on your Grafana environment, local or Cloud, you need to install the plugin manually - it currently isn't signed. Here are some tips to get through this depending on your setup:
* Docker
* Linux (local)
* Windows (local)
* Windows (local - powershell)
* Building the plugin locally

The installations below will use different tools like: curl, docker, jq, wget, unzip and xcopy.

### Docker

#### Pre-buit script - setup-demo-environment
Expand Down Expand Up @@ -83,44 +85,35 @@ This script will:
2. Ensure you have the desired version of the plugin you want to install, get it from github releases

```
curl -s https://api.github.com/repos/netdata/netdata-grafana-datasource-plugin/releases/latest \
jq -r '.assets[] | select(.name|match("zip$")) | .browser_download_url'
wget `curl -s https://api.github.com/repos/netdata/netdata-grafana-datasource-plugin/releases/latest | jq -r '.assets[] | select(.name|match("zip$")) | .browser_download_url'`
```

3. Grafana plugins, by default, should be under /var/lib/grafana/plugins. Create a folder for netdata inside the container. Enter in an interactive session
3. Copy the contents of the Netdata data source plugin to Grafana plugins directory, by default /var/lib/grafana/plugins

```
docker exec -ti grafana bash
mkdir /var/lib/grafana/plugins/netdata
unzip netdata-datasource-<version_number>.zip
docker cp netdata-datasource grafana:/var/lib/grafana/plugins/
```

4. Copy the contents of the Netdata data source plugin to the new plugin folder created on step 2

4. Restart grafana container
```
unzip netdata-datasource-<version_number>.zip
docker cp netdata-datasource grafana:/var/lib/grafana/plugins/netdata/
docker restart grafana
```

### Linux (local)

1. Ensure you have the desired version of the plugin you want to install, get it from github releases

```
curl -s https://api.github.com/repos/netdata/netdata-grafana-datasource-plugin/releases/latest \
jq -r '.assets[] | select(.name|match("zip$")) | .browser_download_url'
```

2. Grafana plugins, by default, should be under /var/lib/grafana/plugins. Create a folder for netdata

```
mkdir /var/lib/grafana/plugins/netdata
wget `curl -s https://api.github.com/repos/netdata/netdata-grafana-datasource-plugin/releases/latest | jq -r '.assets[] | select(.name|match("zip$")) | .browser_download_url'`
```

3. Copy the contents of the Netdata data source plugin to the new plugin folder created on step 2
2. Copy the contents of the Netdata data source plugin to Grafana plugins directory, by default /var/lib/grafana/plugins

```
unzip netdata-datasource-<version_number>.zip
cp -rf netdata-datasource/ /var/lib/grafana/plugins/netdata
cp -rf netdata-datasource /var/lib/grafana/plugins
```

4. Ensure that Netdata plugin which currently isn’t signed can be registered
Expand All @@ -147,33 +140,20 @@ This script will:
systemctl restart grafana-server
```

### Windows (local)

1. Ensure you have the desired version of the plugin you want to install, get it from github releases

```
curl -s https://api.github.com/repos/netdata/netdata-grafana-datasource-plugin/releases/latest \
jq -r '.assets[] | select(.name|match("zip$")) | .browser_download_url'
```

2. Grafana plugins, by default, should be under C:\Program Files\GrafanaLabs\grafana\data\plugins. Create a folder for netdata
### Windows (local - powershell)

```
mkdir ‘C:\Program Files\GrafanaLabs\grafana\data\plugins\netdata
```
1. Ensure you have the desired version of the plugin you want to install, get it from github releases by:
* Going to https://github.com/netdata/netdata-grafana-datasource-plugin/releases/latest
* Downloading the zip file with the latest release, e.g. netdata-datasource-1.0.12.zip

3. Copy the contents of the Netdata data source plugin to the new plugin folder created on step 2
2. Copy the contents of the Netdata data source plugin to the Grafana plugins directory, by default C:\Program Files\GrafanaLabs\grafana\data\plugins

```
wzunzip -d netdata-datasource-<version_number>.zip
```
or
```
gzip -d < netdata-datasource-<version_number>.zip
cp .\netdata-datasource\* "C:\Program Files\GrafanaLabs\grafana\data\plugins\netdata"
Expand-Archive \.netdata-datasource-<version_number>.zip \.
xcopy .\netdata-datasource\ "C:\Program Files\GrafanaLabs\grafana\data\plugins\netdata-datasource\" /E
```

4. Ensure that Netdata plugin which currently isn’t signed can be registered
3. Ensure that Netdata plugin which currently isn’t signed can be registered

```
notepad ‘C:\Program Files\GrafanaLabs\grafana\conf\default.ini’
Expand All @@ -185,7 +165,7 @@ This script will:
allow_loading_unsigned_plugins = netdata-datasource
```

5. After adding the plugin a restart of grafana server is needed
4. After adding the plugin a restart of grafana server is needed

```
net stop Grafana
Expand Down