Skip to content
This repository was archived by the owner on Jul 7, 2022. It is now read-only.

Commit fb6c29c

Browse files
author
Bogdan Novikov
committed
add grafana image
1 parent 8ab231d commit fb6c29c

File tree

4 files changed

+183
-0
lines changed

4 files changed

+183
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ docker-compose up
449449
```
450450
- http://localhost:9090 - prometheus UI
451451
- http://localhost:8090 - ping/pong service
452+
- http://localhost:3000/d/WdZVAykGk/ping-service?orgId=1 - grafana dashboard (admin:admin)
452453

453454
### References:
454455
- https://prometheus.io/docs/

docker-compose.yml

+13
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,16 @@ services:
2525
- 8090:8090
2626
networks:
2727
- p-network
28+
29+
# visualize metrics with grafana
30+
grafana:
31+
image: grafana/grafana
32+
depends_on:
33+
- prometheus
34+
ports:
35+
- 3000:3000
36+
volumes:
37+
- ./grafana/:/etc/grafana/provisioning/
38+
networks:
39+
- p-network
40+
restart: always

grafana/dashboards/ping-service.json

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{
2+
"annotations": {
3+
"list": [
4+
{
5+
"builtIn": 1,
6+
"datasource": "-- Grafana --",
7+
"enable": true,
8+
"hide": true,
9+
"iconColor": "rgba(0, 211, 255, 1)",
10+
"name": "Annotations & Alerts",
11+
"type": "dashboard"
12+
}
13+
]
14+
},
15+
"description": "",
16+
"editable": true,
17+
"gnetId": null,
18+
"graphTooltip": 0,
19+
"id": 1,
20+
"links": [],
21+
"panels": [
22+
{
23+
"aliasColors": {},
24+
"bars": false,
25+
"dashLength": 10,
26+
"dashes": false,
27+
"datasource": null,
28+
"fieldConfig": {
29+
"defaults": {
30+
"custom": {}
31+
},
32+
"overrides": []
33+
},
34+
"fill": 1,
35+
"fillGradient": 0,
36+
"gridPos": {
37+
"h": 14,
38+
"w": 24,
39+
"x": 0,
40+
"y": 0
41+
},
42+
"hiddenSeries": false,
43+
"id": 2,
44+
"legend": {
45+
"avg": false,
46+
"current": false,
47+
"max": false,
48+
"min": false,
49+
"show": true,
50+
"total": false,
51+
"values": false
52+
},
53+
"lines": true,
54+
"linewidth": 1,
55+
"nullPointMode": "null",
56+
"options": {
57+
"dataLinks": []
58+
},
59+
"percentage": false,
60+
"pointradius": 2,
61+
"points": false,
62+
"renderer": "flot",
63+
"seriesOverrides": [],
64+
"spaceLength": 10,
65+
"stack": false,
66+
"steppedLine": false,
67+
"targets": [
68+
{
69+
"expr": "ping_request_count",
70+
"interval": "",
71+
"legendFormat": "",
72+
"refId": "A"
73+
}
74+
],
75+
"thresholds": [],
76+
"timeFrom": null,
77+
"timeRegions": [],
78+
"timeShift": null,
79+
"title": "Ping requests",
80+
"tooltip": {
81+
"shared": true,
82+
"sort": 0,
83+
"value_type": "individual"
84+
},
85+
"type": "graph",
86+
"xaxis": {
87+
"buckets": null,
88+
"mode": "time",
89+
"name": null,
90+
"show": true,
91+
"values": []
92+
},
93+
"yaxes": [
94+
{
95+
"format": "short",
96+
"label": null,
97+
"logBase": 1,
98+
"max": null,
99+
"min": null,
100+
"show": true
101+
},
102+
{
103+
"format": "short",
104+
"label": null,
105+
"logBase": 1,
106+
"max": null,
107+
"min": null,
108+
"show": true
109+
}
110+
],
111+
"yaxis": {
112+
"align": false,
113+
"alignLevel": null
114+
}
115+
}
116+
],
117+
"schemaVersion": 25,
118+
"style": "dark",
119+
"tags": [],
120+
"templating": {
121+
"list": []
122+
},
123+
"time": {
124+
"from": "now-6h",
125+
"to": "now"
126+
},
127+
"timepicker": {
128+
"refresh_intervals": [
129+
"10s",
130+
"30s",
131+
"1m",
132+
"5m",
133+
"15m",
134+
"30m",
135+
"1h",
136+
"2h",
137+
"1d"
138+
]
139+
},
140+
"timezone": "",
141+
"title": "Ping service",
142+
"uid": "WdZVAykGk",
143+
"version": 1
144+
}

grafana/datasources/prometheus.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: 1
2+
datasources:
3+
- name: Prometheus
4+
type: prometheus
5+
access: proxy
6+
orgId: 1
7+
url: http://prometheus:9090
8+
password:
9+
user:
10+
database:
11+
basicAuth: false
12+
basicAuthUser:
13+
basicAuthPassword:
14+
withCredentials:
15+
isDefault: true
16+
jsonData:
17+
graphiteVersion: "1.1"
18+
tlsAuth: false
19+
tlsAuthWithCACert: false
20+
secureJsonData:
21+
tlsCACert: "..."
22+
tlsClientCert: "..."
23+
tlsClientKey: "..."
24+
version: 1
25+
editable: true

0 commit comments

Comments
 (0)