Skip to content

Commit f3110f3

Browse files
authored
Merge pull request #3 from IBMProjectEventStore/lj/desktop
Update to Grafana for the IBM Db2 Event Store Desktop
2 parents edbcad8 + 6da5514 commit f3110f3

File tree

4 files changed

+41
-11
lines changed

4 files changed

+41
-11
lines changed

dist/README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ The IBM Db2 Event Store backend implements 2 urls:
1414

1515
* An [IBM Db2 Event Store Enterprise Edition cluster](https://www.ibm.com/us-en/marketplace/db2-event-store)
1616

17-
## Installation of Graphana within an IBM Db2 Event Cluster
17+
## Installation of Grafana within an IBM Db2 Event Cluster
1818

19+
In an enterprise configuration, the IBM Db2 Event Store is installed on 3 nodes. One of those node is going to be arbitrary referenced as MASTER1_IP.
20+
21+
* SSH to the Master 1 node
22+
```bash
23+
ssh root@${MASTER1_IP}
24+
```
25+
26+
* Install Grafana on that node
1927
```bash
2028
sudo yum install -y wget
2129
sudo wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.0-1.x86_64.rpm
@@ -24,11 +32,15 @@ sudo rpm -Uvh grafana-5.0.0-1.x86_64.rpm
2432
sudo service grafana-server start
2533
```
2634

27-
## Install the Grafana Plugin within an IBM Db2 Event Cluster
28-
mkdir -p /usr/local/var/lib/grafana/plugins/db2-event-store
29-
cd /usr/local/var/lib/grafana/plugins/db2-event-store
30-
wget ...
31-
cp /usr/local/var/lib/grafana/plugins/db2-event-store/db2-event-store-grafana.tar .
35+
* Validate that Grafana correctly comes up in a Web Browser
36+
http://${MASTER1_IP}:3000/login [admin/admin]
37+
38+
* Download the archive from the GIT repo, unzip it, and place it in your home directory on {MASTER1_IP}
39+
```bash
40+
wget https://github.com/IBMProjectEventStore/db2eventstore-grafana/files/2019003/db2-event-store-grafana.tar.zip
41+
```
42+
43+
## Install the IBM Db2 Event Store plugin for Grafana
3244

3345
```bash
3446
GRAFANA=/var/lib/grafana
@@ -40,6 +52,6 @@ sudo tar -zxvf db2-event-store-grafana.tar
4052
sudo service grafana-server restart
4153
```
4254

43-
## Bring up the Graphana console
55+
## Add the IBM Db2 Event Store Data Source in the Grafana console
4456

45-
## Establish a dashboard
57+
## Create a dashboard

dist/config_ctrl.js

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/config_ctrl.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/config_ctrl.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ export class EventStoreConfigCtrl {
6262
});
6363
}
6464

65+
/**
66+
* If the address is http, add a sample token to remain compatible
67+
*/
68+
_assignBearerToken() {
69+
var outerScope = this;
70+
outerScope.current.jsonData.securityToken = 'bearer token'
71+
outerScope.current.jsonData.headerConfig.headers['Authorization'] = outerScope.current.jsonData.securityToken
72+
outerScope._getDatabasesList()
73+
}
74+
6575
/**
6676
* Get and populate the database list
6777
*/
@@ -102,7 +112,7 @@ export class EventStoreConfigCtrl {
102112
this._retrieveBearerToken();
103113
}
104114
else {
105-
this._getDatabasesList();
115+
this._assignBearerToken();
106116
}
107117
}
108118
}

0 commit comments

Comments
 (0)