Skip to content

Commit 74b79e0

Browse files
authored
Add Documentation to README and BUILD (#188)
* Add Documentation to README and BUILD * Update README.md
1 parent 6b83972 commit 74b79e0

File tree

2 files changed

+14
-202
lines changed

2 files changed

+14
-202
lines changed

BUILD.md

Lines changed: 2 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,3 @@
1-
# How to install and build Grafana with Redis Datasource on RPM-based Linux
1+
# How to build and install Redis Data Source
22

3-
## Clone repository
4-
5-
```bash
6-
git clone https://github.com/RedisGrafana/grafana-redis-datasource.git
7-
```
8-
9-
## Install Grafana
10-
11-
- Follow [Install on RPM-based Linux](https://grafana.com/docs/grafana/latest/installation/rpm/) to install and start Grafana
12-
13-
- Open Grafana in web-browser `http://X.X.X.X:3000`
14-
15-
## Build Datasource
16-
17-
Redis datasource consists of both frontend and backend components.
18-
19-
### React Frontend
20-
21-
- Install latest version of Node.js using [Node Version Manager](https://github.com/nvm-sh/nvm)
22-
23-
- Install `yarn` to build Datasource
24-
25-
```bash
26-
npm install yarn -g
27-
```
28-
29-
- Install Datasource dependencies
30-
31-
```bash
32-
yarn install
33-
```
34-
35-
- Build Datasource
36-
37-
```bash
38-
yarn build
39-
```
40-
41-
### Golang Backend
42-
43-
- Install Golang
44-
45-
```bash
46-
yum install go
47-
```
48-
49-
- Install [Grafana plugin SDK for Go](https://grafana.com/docs/grafana/latest/developers/plugins/backend/grafana-plugin-sdk-for-go/) dependency
50-
51-
```bash
52-
go get -u github.com/grafana/grafana-plugin-sdk-go
53-
```
54-
55-
- Install mage (make-like build tool using Go)
56-
57-
```bash
58-
git clone https://github.com/magefile/mage
59-
cd mage
60-
go run bootstrap.go
61-
```
62-
63-
- Build backend plugin binaries for Linux, Windows and MacOS
64-
65-
```bash
66-
mage -v
67-
```
68-
69-
## Update Grafana Configuration
70-
71-
- Move distribution to Grafana's `plugins/` folder
72-
73-
```bash
74-
mv dist/ /var/lib/grafana/plugins/redis-datasource
75-
```
76-
77-
- Add `redis-datasource` to allowed unsigned plugins
78-
79-
```bash
80-
vi /etc/grafana/grafana.ini
81-
```
82-
83-
```
84-
[plugins]
85-
;enable_alpha = false
86-
;app_tls_skip_verify_insecure = false
87-
# Enter a comma-separated list of plugin identifiers to identify plugins that are allowed to be loaded even if they lack a valid signature.
88-
allow_loading_unsigned_plugins = redis-datasource
89-
```
90-
91-
- Verify that plugin registered
92-
93-
```bash
94-
tail -100 /var/log/grafana/grafana.log
95-
```
96-
97-
```
98-
t=2020-07-01T06:03:38+0000 lvl=info msg="Starting plugin search" logger=plugins
99-
t=2020-07-01T06:03:38+0000 lvl=warn msg="Running an unsigned backend plugin" logger=plugins pluginID=redis-datasource pluginDir=/var/lib/grafana/plugins/redis-datasource
100-
t=2020-07-01T06:03:38+0000 lvl=info msg="Registering plugin" logger=plugins name=redis-datasource
101-
t=2020-07-01T06:03:38+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUrl= socket=
102-
```
103-
104-
- Add new Datasource to Grafana using `Configuration` -> `Data Sources`
105-
106-
![Datasource](https://raw.githubusercontent.com/RedisGrafana/grafana-redis-datasource/master/src/img/datasource.png)
107-
108-
If you have questions, enhancement ideas or running into issues, please just open an issue on the repository: https://github.com/RedisGrafana/grafana-redis-datasource
3+
You can find detailed instructions in the [Documentation](https://redisgrafana.github.io/development/redis-datasource/).

README.md

Lines changed: 12 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
![Dashboard](https://raw.githubusercontent.com/RedisGrafana/grafana-redis-datasource/master/src/img/redis-dashboard.png)
44

55
[![Grafana 7](https://img.shields.io/badge/Grafana-7-orange)](https://www.grafana.com)
6-
[![Radix](https://img.shields.io/badge/Radix-powered-darkblue)](https://github.com/mediocregopher/radix)
76
[![Redis Enterprise](https://img.shields.io/badge/Redis%20Enterprise-supported-darkgreen)](https://redislabs.com/redis-enterprise/)
87
[![Redis Data Source](https://img.shields.io/badge/dynamic/json?color=blue&label=Redis%20Data%20Source&query=%24.version&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins%2Fredis-datasource)](https://grafana.com/grafana/plugins/redis-datasource)
98
[![Redis Application plug-in](https://img.shields.io/badge/dynamic/json?color=blue&label=Redis%20Application%20plug-in&query=%24.version&url=https%3A%2F%2Fgrafana.com%2Fapi%2Fplugins%2Fredis-app)](https://grafana.com/grafana/plugins/redis-app)
@@ -16,133 +15,51 @@
1615
- [**Introduction**](#introduction)
1716
- [**Getting Started**](#getting-started)
1817
- [**Supported commands**](#supported-commands)
19-
- [**Template variables**](#template-variables)
2018
- [**Learn more**](#learn-more)
2119
- [**Feedback**](#feedback)
2220
- [**Contributing**](#contributing)
2321
- [**License**](#license)
2422

2523
## Introduction
2624

27-
### What is the Redis Data Source for Grafana?
25+
The Redis Data Source for Grafana is a plug-in that allows users to connect to any Redis database On-Premises or in the Cloud. It provides an out-of-the-box predefined dashboards, but also lets you build customized dashboards to easily monitor Redis and application data.
2826

29-
The Redis Data Source for Grafana is a plug-in that allows users to connect to the Redis database and build dashboards in Grafana to easily monitor Redis and application data. It provides an out-of-the-box predefined dashboard, but also lets you build customized dashboards tuned to your specific needs.
27+
### Requirements
3028

31-
### What Grafana version is supported?
29+
Only **Grafana 7.1+** with a new Backend plug-in platform supports Redis plug-ins.
3230

33-
Grafana 7.1 and later with a new plug-in platform supported.
31+
### Redis Application plug-in
3432

35-
### Does this Data Source require anything special configured on the Redis databases?
36-
37-
Data Source can connect to any Redis database. No special configuration is required.
38-
39-
### Does this Data Source support [Redis Cluster](https://redis.io/topics/cluster-tutorial) and [Sentinel](https://redis.io/topics/sentinel)?
40-
41-
Redis Cluster and Sentinel supported since version 1.2.
42-
43-
### Does this Data Source support Redis modules?
44-
45-
Data Source supports:
46-
47-
- [RedisTimeSeries](https://oss.redislabs.com/redistimeseries/): TS.GET, TS.INFO, TS.MRANGE, TS.QUERYINDEX, TS.RANGE
48-
- [RedisGears](https://oss.redislabs.com/redisgears/): RG.DUMPREGISTRATIONS, RG.PYEXECUTE, RG.PYSTATS
49-
- [RedisSearch](https://oss.redislabs.com/redisearch/): FT.INFO
50-
- [RedisGraph](https://oss.redislabs.com/redisgraph/): GRAPH.QUERY, GRAPH.SLOWLOG
51-
52-
### How to connect to Redis logical database
53-
54-
Please use `/db-number` or `?db=db-number` in the Data Source URL to specify the database number as defined in the [Schema](https://www.iana.org/assignments/uri-schemes/prov/redis).
55-
56-
```
57-
redis://redis-server:6379/0
58-
```
59-
60-
### How to build Data Source
61-
62-
To learn how to build Redis Data Source from scratch and register in new or existing Grafana please take a look at [BUILD](https://github.com/RedisGrafana/grafana-redis-datasource/blob/master/BUILD.md) instructions.
33+
You can add as many data sources as you want to support multiple Redis databases. [Redis Application plug-in](https://grafana.com/grafana/plugins/redis-app) helps to manage multiple Redis Data Sources and provides Custom panels.
6334

6435
## Getting Started
6536

66-
### Install using `grafana-cli`
67-
6837
Use the `grafana-cli` tool to install from the commandline:
6938

7039
```bash
7140
grafana-cli plugins install redis-datasource
7241
```
7342

74-
### Run using `docker`
75-
76-
```bash
77-
docker run -d -p 3000:3000 --name=grafana -e "GF_INSTALL_PLUGINS=redis-datasource" grafana/grafana
78-
```
43+
For Docker instructions and installation without Internet access follow [Quickstart](https://redisgrafana.github.io/quickstart/) page.
7944

80-
### Run using `docker-compose`
45+
### Configuration
8146

82-
Project provides `docker-compose.yml` to start Redis with all Redis Labs modules and Grafana.
83-
84-
```bash
85-
docker-compose up
86-
```
87-
88-
Open Grafana in your browser and configure Redis Data Source. You can add as many data sources as you want to support multiple Redis databases.
47+
Data Source allows to connect to Redis using TCP port, Unix socket, Cluster, Sentinel and supports SSL/TLS authentication. For detailed information take a look at [Configuration](https://redisgrafana.github.io/redis-datasource/configuration/) page.
8948

9049
![Datasource](https://raw.githubusercontent.com/RedisGrafana/grafana-redis-datasource/master/src/img/datasource.png)
9150

92-
There are certain settings that can be configured based on your own setup:
93-
94-
- Grafana port
95-
- Data Source URL
96-
97-
#### Configure Grafana port in `docker-compose.yml`
51+
### Development
9852

99-
If standard port 3000 is occupied by another application update the port to bind Grafana to
53+
[Developing Redis Data Source](https://redisgrafana.github.io/development/redis-datasource/) page provides instructions on how to build data source.
10054

101-
```
102-
ports:
103-
- '3000:3000'
104-
```
105-
106-
#### Configure Data Source URL in `provisioning/datasources/redis.yaml`
107-
108-
If Redis is running and listening on localhost:6379 no changes are required
109-
110-
```
111-
url: redis://localhost:6379
112-
```
113-
114-
If Redis is running as Docker container on MacOS, please update host to `host.docker.internal`
115-
116-
```
117-
url: redis://host.docker.internal:6379
118-
```
119-
120-
If Redis is running as Docker container on Linux, please update host to `redis`
121-
122-
```
123-
url: redis://redis:6379
124-
```
125-
126-
### Run using `docker-compose` for development
127-
128-
Data Source have to be built following [BUILD](https://github.com/RedisGrafana/grafana-redis-datasource/blob/master/BUILD.md) instructions before starting using `docker-compose/dev.yml` file.
129-
130-
```bash
131-
docker-compose -f docker-compose/dev.yml up
132-
```
55+
Interested in the latest features and updates? Start nightly built [Docker image for Redis Application plug-in](https://redisgrafana.github.io/development/images/), which includes Redis Data Source.
13356

13457
## Supported commands
13558

136-
Data Source supports various Redis commands using custom components and provides a unified interface to query any command.
59+
List of all supported commands and how to use them with examples you can find in the [Commands](https://redisgrafana.github.io/redis-datasource/commands/) section.
13760

13861
![Query](https://raw.githubusercontent.com/RedisGrafana/grafana-redis-datasource/master/src/img/query.png)
13962

140-
## Template variables
141-
142-
Template variables can query any command and use other variables as parameters.
143-
144-
![Variables](https://raw.githubusercontent.com/RedisGrafana/grafana-redis-datasource/master/src/img/variables.png)
145-
14663
## Learn more
14764

14865
- [Introducing the Redis Data Source Plug-in for Grafana](https://redislabs.com/blog/introducing-the-redis-data-source-plug-in-for-grafana/)

0 commit comments

Comments
 (0)