Skip to content

Commit

Permalink
docs(grafana): add details about setting up grafana
Browse files Browse the repository at this point in the history
  • Loading branch information
Eomm authored and Shadowbeetle committed Apr 25, 2018
1 parent 42b7e22 commit c042e0c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,28 @@ Username: admin
Password: admin
```

### Setting datasource

Create a Grafana datasource with this settings:
+ name: DS_PROMETHEUS
+ type: prometheus
+ url: http://localhost:9090
+ access: direct

Or use this curl request:
```sh
curl 'http://admin:admin@localhost:3000/api/datasources' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' --data-binary '{"name":"DS_PROMETHEUS","type":"prometheus","url":"http://localhost:9090","access":"direct","jsonData":{"keepCookies":[]},"secureJsonFields":{}}' --compressed
```

### Setting dashboard

Grafana Dashboard to import: [/grafana-dashboard.json](/grafana-dashboard.json)

Or use this curl request:
```sh
curl 'http://admin:admin@localhost:3000/api/dashboards/import' -H 'Accept-Encoding: gzip, deflate' -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept: application/json, text/plain, */*' --data-binary '%{copy and paste grafana-dashboard.json}' --compressed
```

### Grafana Dashboard

![Grafana - Response Time](/images/grafana-response-time.png)
Expand Down

0 comments on commit c042e0c

Please sign in to comment.