Skip to content

Commit 0bb9b47

Browse files
authored
Merge pull request #9 from hugovalente-pm/readme-review
review installation section
2 parents 4c77352 + a2885b2 commit 0bb9b47

File tree

1 file changed

+22
-42
lines changed

1 file changed

+22
-42
lines changed

README.md

Lines changed: 22 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ Once you have added your API token to Netdata data source plugin you’re ready
4949
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:
5050
* Docker
5151
* Linux (local)
52-
* Windows (local)
52+
* Windows (local - powershell)
5353
* Building the plugin locally
5454

55+
The installations below will use different tools like: curl, docker, jq, wget, unzip and xcopy.
56+
5557
### Docker
5658

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

8587
```
86-
curl -s https://api.github.com/repos/netdata/netdata-grafana-datasource-plugin/releases/latest \
87-
jq -r '.assets[] | select(.name|match("zip$")) | .browser_download_url'
88+
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'`
8889
```
8990

90-
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
91+
3. Copy the contents of the Netdata data source plugin to Grafana plugins directory, by default /var/lib/grafana/plugins
9192

9293
```
93-
docker exec -ti grafana bash
94-
mkdir /var/lib/grafana/plugins/netdata
94+
unzip netdata-datasource-<version_number>.zip
95+
docker cp netdata-datasource grafana:/var/lib/grafana/plugins/
9596
```
9697

97-
4. Copy the contents of the Netdata data source plugin to the new plugin folder created on step 2
98-
98+
4. Restart grafana container
99+
99100
```
100-
unzip netdata-datasource-<version_number>.zip
101-
docker cp netdata-datasource grafana:/var/lib/grafana/plugins/netdata/
101+
docker restart grafana
102102
```
103103

104104
### Linux (local)
105105

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

108108
```
109-
curl -s https://api.github.com/repos/netdata/netdata-grafana-datasource-plugin/releases/latest \
110-
jq -r '.assets[] | select(.name|match("zip$")) | .browser_download_url'
111-
```
112-
113-
2. Grafana plugins, by default, should be under /var/lib/grafana/plugins. Create a folder for netdata
114-
115-
```
116-
mkdir /var/lib/grafana/plugins/netdata
109+
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'`
117110
```
118111

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

121114
```
122115
unzip netdata-datasource-<version_number>.zip
123-
cp -rf netdata-datasource/ /var/lib/grafana/plugins/netdata
116+
cp -rf netdata-datasource /var/lib/grafana/plugins
124117
```
125118

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

150-
### Windows (local)
151-
152-
1. Ensure you have the desired version of the plugin you want to install, get it from github releases
153-
154-
```
155-
curl -s https://api.github.com/repos/netdata/netdata-grafana-datasource-plugin/releases/latest \
156-
jq -r '.assets[] | select(.name|match("zip$")) | .browser_download_url'
157-
```
158-
159-
2. Grafana plugins, by default, should be under C:\Program Files\GrafanaLabs\grafana\data\plugins. Create a folder for netdata
143+
### Windows (local - powershell)
160144

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

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

167151
```
168-
wzunzip -d netdata-datasource-<version_number>.zip
169-
```
170-
or
171-
```
172-
gzip -d < netdata-datasource-<version_number>.zip
173-
cp .\netdata-datasource\* "C:\Program Files\GrafanaLabs\grafana\data\plugins\netdata"
152+
Expand-Archive \.netdata-datasource-<version_number>.zip \.
153+
xcopy .\netdata-datasource\ "C:\Program Files\GrafanaLabs\grafana\data\plugins\netdata-datasource\" /E
174154
```
175155

176-
4. Ensure that Netdata plugin which currently isn’t signed can be registered
156+
3. Ensure that Netdata plugin which currently isn’t signed can be registered
177157

178158
```
179159
notepad ‘C:\Program Files\GrafanaLabs\grafana\conf\default.ini’
@@ -185,7 +165,7 @@ This script will:
185165
allow_loading_unsigned_plugins = netdata-datasource
186166
```
187167
188-
5. After adding the plugin a restart of grafana server is needed
168+
4. After adding the plugin a restart of grafana server is needed
189169
190170
```
191171
net stop Grafana

0 commit comments

Comments
 (0)