├── .idea
├── .gitignore
├── dashboard.iml
├── modules.xml
├── php.xml
└── vcs.xml
├── LICENSE
├── README.md
├── docker-compose.yaml
├── grafana
└── provisioning
│ ├── dashboards
│ ├── dashboard.yml
│ ├── roadrunner-grpc.json
│ └── roadrunner-jobs.json
│ └── datasources
│ └── datasource.yml
├── prometheus
└── prometheus.yml
└── runtime
├── grafana
└── .gitignore
└── prometheus
└── .gitignore
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/.idea/dashboard.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/php.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Metrix IO
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Metrics dashboard
2 |
3 | Dashboard is a collection of pre-made Grafana dashboards that let you track and analyze data from Twitter, GitHub, Docker, and Packagist.
4 |
5 | It's super handy for developers and other professionals who need to keep an eye on certain metrics, but don't want to spend time building their own dashboards from scratch.
6 |
7 | All you have to do is clone the repository and choose the metrics collectors you want to use, and you'll be able to see your data in real-time. Plus, with Grafana, you can create dashboards that show live data and set up alerts to let you know if anything changes or seems off.
8 |
9 | [
](https://youtu.be/DtZELp2sok4)
10 | > View full video on [youtube](https://youtu.be/DtZELp2sok4)
11 |
12 | ## Requirements
13 |
14 | - [Docker](https://docs.docker.com/install/)
15 | - [Docker Compose](https://docs.docker.com/compose/install/)
16 |
17 | ## Installation
18 |
19 | Clone the repository:
20 |
21 | ```bash
22 | git clone https://github.com/metrixio/dashboard.git
23 |
24 | cd ./dashboard
25 |
26 | chmod 0777 runtime/ -R
27 | ```
28 |
29 | ## Configuration
30 |
31 | To configure the metrics collectors you want to use, you will need to edit the `docker-compose.yaml` file and add the appropriate service definitions for the collectors you want to use.
32 |
33 | ### Twitter
34 |
35 | 
36 |
37 | To use the twitter collector, you will need to have a Twitter developer account and create
38 | a [Twitter API credentials](https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens.html).
39 | Once you have obtained your API key, you can start collecting data. Then you just need to specify the list of
40 | account IDS to follow in `TWITTER_ACCOUNTS` environment variable.
41 |
42 | > **Note**:
43 | > You can find out the account ID via some of the services like - [tweeterid.com](https://tweeterid.com/).
44 |
45 | ```yaml
46 | services:
47 | twitter-metrics:
48 | image: ghcr.io/metrixio/twitter:latest
49 | environment:
50 | TWITTER_CONSUMER_KEY: xxx
51 | TWITTER_CONSUMER_SECRET: xxx
52 | TWITTER_ACCESS_TOKEN: xxx
53 | TWITTER_ACCESS_TOKEN_SECRET: xxx
54 | TWITTER_ACCOUNTS: 17227608,25073877,783214
55 | restart: on-failure
56 |
57 | ...
58 | ```
59 |
60 | Configure the Prometheus server to scrape metrics from the Twitter metrics collector in `prometheus/prometheus.yml`
61 | file:
62 |
63 | ```yaml
64 | scrape_configs:
65 | - job_name: 'twitter'
66 | scrape_interval: 60s
67 | static_configs:
68 | - targets: [ 'twitter-metrics:2112' ]
69 | ...
70 | ```
71 |
72 | Put dashboards you want to use in `grafana/provisioning/dashboards` directory from
73 | the [dashboards repository](https://github.com/metrixio/twitter/tree/master/grafana)
74 |
75 | ### Docker
76 |
77 | 
78 |
79 | To use the docker collector, you just need to specify the list of repositories to follow in `DOCKER_REPOSITORIES`
80 | environment variable:
81 |
82 | ```yaml
83 | services:
84 | docker-metrics:
85 | image: ghcr.io/metrixio/docker:latest
86 | environment:
87 | DOCKER_REPOSITORIES: spiralscout/roadrunner,butschster/buggregator
88 | restart: on-failure
89 |
90 | ...
91 | ```
92 |
93 | Configure the Prometheus server to scrape metrics from the Twitter metrics collector in `prometheus/prometheus.yml`
94 | file:
95 |
96 | ```yaml
97 | scrape_configs:
98 | - job_name: 'docker'
99 | scrape_interval: 60s
100 | static_configs:
101 | - targets: [ 'docker-metrics:2112' ]
102 | ...
103 | ```
104 |
105 | Put dashboards you want to use in `grafana/provisioning/dashboards` directory from
106 | the [dashboards repository](https://github.com/metrixio/docker/tree/master/grafana)
107 |
108 | ### Gituhb public
109 |
110 | 
111 |
112 | To use the package, you just need to create a Github API token. Once you have
113 | obtained your API token, you can use the package's functions to authenticate and start collecting data.
114 |
115 | Then you need to specify the list of repositories to follow in `GITHUB_REPOSITORIES` environment variable:
116 |
117 | ```yaml
118 | services:
119 | github-public-metrics:
120 | image: ghcr.io/metrixio/github-public:latest
121 | environment:
122 | GITHUB_TOKEN: xxx
123 | GITHUB_REPOSITORIES: spiral/framework,spiral/roadrunner
124 | restart: on-failure
125 |
126 | ...
127 | ```
128 |
129 | Configure the Prometheus server to scrape metrics from the Twitter metrics collector in `prometheus/prometheus.yml`
130 | file:
131 |
132 | ```yaml
133 | scrape_configs:
134 | - job_name: 'github-public'
135 | scrape_interval: 60s
136 | static_configs:
137 | - targets: [ 'github-public-metrics:2112' ]
138 | ...
139 | ```
140 |
141 | Put dashboards you want to use in `grafana/provisioning/dashboards` directory from
142 | the [dashboards repository](https://github.com/metrixio/github-public/tree/master/grafana)
143 |
144 | ### Packagist
145 |
146 | 
147 |
148 | To use the packagist collector, you just need to specify the list of repositories to follow in `PACKAGIST_REPOSITORIES`
149 | environment variable:
150 |
151 | ```yaml
152 | services:
153 | packagist-metrics:
154 | image: ghcr.io/metrixio/packagist:latest
155 | environment:
156 | PACKAGIST_REPOSITORIES: spiral/framework
157 | restart: on-failure
158 |
159 | ...
160 | ```
161 |
162 | Configure the Prometheus server to scrape metrics from the packagist metrics collector in `prometheus/prometheus.yml`
163 | file:
164 |
165 | ```yaml
166 | scrape_configs:
167 | - job_name: 'docker'
168 | scrape_interval: 60s
169 | static_configs:
170 | - targets: [ 'packagist-metrics:2112' ]
171 | ...
172 | ```
173 |
174 | Put dashboards you want to use in `grafana/provisioning/dashboards` directory from
175 | the [dashboards repository](https://github.com/metrixio/packagist/tree/master/grafana)
176 |
177 |
178 | ## Usage
179 |
180 | ```bash
181 | docker compose up
182 | ```
183 |
184 | Metrics will be available on http://127.0.0.1:3000
185 |
186 | Default username: **admin**
187 | Default password: **secret**
188 |
189 |
190 | # Enjoy!
191 |
--------------------------------------------------------------------------------
/docker-compose.yaml:
--------------------------------------------------------------------------------
1 | version: "3.7"
2 |
3 | services:
4 | twitter-metrics:
5 | image: ghcr.io/metrixio/twitter:latest
6 | environment:
7 | TWITTER_CONSUMER_KEY: xxx
8 | TWITTER_CONSUMER_SECRET: xxx
9 | TWITTER_ACCESS_TOKEN: xxx
10 | TWITTER_ACCESS_TOKEN_SECRET: xxx
11 | TWITTER_ACCOUNTS: 17227608
12 | restart: on-failure
13 |
14 | # docker-metrics:
15 | # image: ghcr.io/metrixio/docker:latest
16 | # environment:
17 | # DOCKER_REPOSITORIES: spiralscout/roadrunner
18 | # restart: on-failure
19 |
20 |
21 | # github-public-metrics:
22 | # image: ghcr.io/metrixio/github-public:latest
23 | # environment:
24 | # GITHUB_REPOSITORIES: spiral/framework
25 | # GITHUB_TOKEN: xxx
26 | # restart: on-failure
27 |
28 | prometheus:
29 | image: prom/prometheus
30 | command:
31 | - '--config.file=/etc/prometheus/prometheus.yml'
32 | - '--storage.tsdb.path=/prometheus'
33 | - '--web.console.libraries=/etc/prometheus/console_libraries'
34 | - '--web.console.templates=/etc/prometheus/consoles'
35 | - '--storage.tsdb.retention.time=5y'
36 | - '--web.enable-lifecycle'
37 | volumes:
38 | - ./prometheus/:/etc/prometheus/
39 | - ./runtime/prometheus:/prometheus
40 | restart: always
41 |
42 | grafana:
43 | image: grafana/grafana
44 | depends_on:
45 | - prometheus
46 | ports:
47 | - 3000:3000
48 | volumes:
49 | - ./runtime/grafana:/var/lib/grafana
50 | - ./grafana/provisioning/:/etc/grafana/provisioning/
51 | environment:
52 | GF_SECURITY_ADMIN_PASSWORD: secret
53 | GF_USERS_ALLOW_SIGN_UP: false
54 | restart: always
55 |
--------------------------------------------------------------------------------
/grafana/provisioning/dashboards/dashboard.yml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 |
3 | providers:
4 | - name: 'Prometheus'
5 | orgId: 1
6 | folder: ''
7 | type: file
8 | disableDeletion: false
9 | editable: true
10 | options:
11 | path: /etc/grafana/provisioning/dashboards
12 |
--------------------------------------------------------------------------------
/grafana/provisioning/dashboards/roadrunner-grpc.json:
--------------------------------------------------------------------------------
1 | {
2 | "annotations": {
3 | "list": [
4 | {
5 | "builtIn": 1,
6 | "datasource": {
7 | "type": "datasource",
8 | "uid": "grafana"
9 | },
10 | "enable": true,
11 | "hide": true,
12 | "iconColor": "rgba(0, 211, 255, 1)",
13 | "name": "Annotations & Alerts",
14 | "target": {
15 | "limit": 100,
16 | "matchAny": false,
17 | "tags": [],
18 | "type": "dashboard"
19 | },
20 | "type": "dashboard"
21 | }
22 | ]
23 | },
24 | "editable": true,
25 | "fiscalYearStartMonth": 0,
26 | "graphTooltip": 0,
27 | "id": 6,
28 | "links": [
29 | {
30 | "asDropdown": false,
31 | "icon": "external link",
32 | "includeVars": false,
33 | "keepTime": false,
34 | "tags": [],
35 | "targetBlank": false,
36 | "title": "New link",
37 | "tooltip": "",
38 | "type": "dashboards",
39 | "url": ""
40 | }
41 | ],
42 | "liveNow": false,
43 | "panels": [
44 | {
45 | "datasource": {
46 | "type": "prometheus",
47 | "uid": "PBFA97CFB590B2093"
48 | },
49 | "fieldConfig": {
50 | "defaults": {
51 | "color": {
52 | "mode": "thresholds"
53 | },
54 | "mappings": [],
55 | "thresholds": {
56 | "mode": "absolute",
57 | "steps": [
58 | {
59 | "color": "green",
60 | "value": null
61 | }
62 | ]
63 | },
64 | "unit": "s"
65 | },
66 | "overrides": []
67 | },
68 | "gridPos": {
69 | "h": 9,
70 | "w": 3,
71 | "x": 0,
72 | "y": 0
73 | },
74 | "id": 20,
75 | "options": {
76 | "colorMode": "value",
77 | "graphMode": "area",
78 | "justifyMode": "auto",
79 | "orientation": "auto",
80 | "reduceOptions": {
81 | "calcs": [
82 | "last"
83 | ],
84 | "fields": "",
85 | "values": false
86 | },
87 | "textMode": "auto"
88 | },
89 | "pluginVersion": "9.3.1",
90 | "targets": [
91 | {
92 | "datasource": {
93 | "type": "prometheus",
94 | "uid": "PBFA97CFB590B2093"
95 | },
96 | "editorMode": "code",
97 | "exemplar": false,
98 | "expr": "rr_http_uptime_seconds{instance=\"$server\"}",
99 | "instant": true,
100 | "interval": "",
101 | "legendFormat": "Uptime",
102 | "refId": "A"
103 | }
104 | ],
105 | "title": "RR uptime",
106 | "type": "stat"
107 | },
108 | {
109 | "datasource": {
110 | "type": "prometheus",
111 | "uid": "PBFA97CFB590B2093"
112 | },
113 | "fieldConfig": {
114 | "defaults": {
115 | "color": {
116 | "mode": "palette-classic"
117 | },
118 | "custom": {
119 | "axisCenteredZero": false,
120 | "axisColorMode": "text",
121 | "axisLabel": "",
122 | "axisPlacement": "auto",
123 | "barAlignment": 0,
124 | "drawStyle": "line",
125 | "fillOpacity": 4,
126 | "gradientMode": "none",
127 | "hideFrom": {
128 | "legend": false,
129 | "tooltip": false,
130 | "viz": false
131 | },
132 | "lineInterpolation": "linear",
133 | "lineWidth": 1,
134 | "pointSize": 5,
135 | "scaleDistribution": {
136 | "type": "linear"
137 | },
138 | "showPoints": "auto",
139 | "spanNulls": 3600000,
140 | "stacking": {
141 | "group": "A",
142 | "mode": "none"
143 | },
144 | "thresholdsStyle": {
145 | "mode": "off"
146 | }
147 | },
148 | "mappings": [],
149 | "thresholds": {
150 | "mode": "absolute",
151 | "steps": [
152 | {
153 | "color": "yellow",
154 | "value": null
155 | }
156 | ]
157 | },
158 | "unit": "decbytes"
159 | },
160 | "overrides": [
161 | {
162 | "matcher": {
163 | "id": "byName",
164 | "options": "RR memory"
165 | },
166 | "properties": [
167 | {
168 | "id": "color",
169 | "value": {
170 | "fixedColor": "blue",
171 | "mode": "fixed"
172 | }
173 | }
174 | ]
175 | }
176 | ]
177 | },
178 | "gridPos": {
179 | "h": 9,
180 | "w": 10,
181 | "x": 3,
182 | "y": 0
183 | },
184 | "id": 14,
185 | "options": {
186 | "legend": {
187 | "calcs": [],
188 | "displayMode": "list",
189 | "placement": "bottom",
190 | "showLegend": true
191 | },
192 | "tooltip": {
193 | "mode": "single",
194 | "sort": "none"
195 | }
196 | },
197 | "targets": [
198 | {
199 | "datasource": {
200 | "type": "prometheus",
201 | "uid": "PBFA97CFB590B2093"
202 | },
203 | "editorMode": "code",
204 | "exemplar": true,
205 | "expr": "go_memstats_heap_inuse_bytes{instance=\"$server\"}",
206 | "interval": "",
207 | "legendFormat": "RR memory",
208 | "range": true,
209 | "refId": "A"
210 | }
211 | ],
212 | "title": "RR in-use memory",
213 | "type": "timeseries"
214 | },
215 | {
216 | "datasource": {
217 | "type": "prometheus",
218 | "uid": "PBFA97CFB590B2093"
219 | },
220 | "fieldConfig": {
221 | "defaults": {
222 | "color": {
223 | "mode": "palette-classic"
224 | },
225 | "custom": {
226 | "axisCenteredZero": false,
227 | "axisColorMode": "text",
228 | "axisLabel": "",
229 | "axisPlacement": "auto",
230 | "barAlignment": 0,
231 | "drawStyle": "line",
232 | "fillOpacity": 11,
233 | "gradientMode": "hue",
234 | "hideFrom": {
235 | "legend": false,
236 | "tooltip": false,
237 | "viz": false
238 | },
239 | "lineInterpolation": "linear",
240 | "lineStyle": {
241 | "fill": "solid"
242 | },
243 | "lineWidth": 1,
244 | "pointSize": 5,
245 | "scaleDistribution": {
246 | "type": "linear"
247 | },
248 | "showPoints": "auto",
249 | "spanNulls": 3600000,
250 | "stacking": {
251 | "group": "A",
252 | "mode": "none"
253 | },
254 | "thresholdsStyle": {
255 | "mode": "off"
256 | }
257 | },
258 | "mappings": [],
259 | "thresholds": {
260 | "mode": "absolute",
261 | "steps": [
262 | {
263 | "color": "green",
264 | "value": null
265 | },
266 | {
267 | "color": "red",
268 | "value": 80
269 | }
270 | ]
271 | }
272 | },
273 | "overrides": [
274 | {
275 | "matcher": {
276 | "id": "byName",
277 | "options": "Green threads count"
278 | },
279 | "properties": [
280 | {
281 | "id": "color",
282 | "value": {
283 | "fixedColor": "purple",
284 | "mode": "fixed"
285 | }
286 | }
287 | ]
288 | }
289 | ]
290 | },
291 | "gridPos": {
292 | "h": 9,
293 | "w": 11,
294 | "x": 13,
295 | "y": 0
296 | },
297 | "id": 12,
298 | "options": {
299 | "legend": {
300 | "calcs": [],
301 | "displayMode": "list",
302 | "placement": "bottom",
303 | "showLegend": true
304 | },
305 | "tooltip": {
306 | "mode": "single",
307 | "sort": "none"
308 | }
309 | },
310 | "targets": [
311 | {
312 | "datasource": {
313 | "type": "prometheus",
314 | "uid": "PBFA97CFB590B2093"
315 | },
316 | "editorMode": "code",
317 | "exemplar": true,
318 | "expr": "go_goroutines{instance=\"$server\"}",
319 | "instant": false,
320 | "interval": "",
321 | "legendFormat": "Green threads count",
322 | "refId": "A"
323 | }
324 | ],
325 | "title": "Goroutines",
326 | "type": "timeseries"
327 | },
328 | {
329 | "datasource": {
330 | "type": "prometheus",
331 | "uid": "PBFA97CFB590B2093"
332 | },
333 | "fieldConfig": {
334 | "defaults": {
335 | "color": {
336 | "mode": "thresholds"
337 | },
338 | "mappings": [
339 | {
340 | "options": {
341 | "pattern": "TOTAL",
342 | "result": {
343 | "color": "red",
344 | "index": 0
345 | }
346 | },
347 | "type": "regex"
348 | }
349 | ],
350 | "thresholds": {
351 | "mode": "absolute",
352 | "steps": [
353 | {
354 | "color": "blue",
355 | "value": null
356 | }
357 | ]
358 | }
359 | },
360 | "overrides": [
361 | {
362 | "matcher": {
363 | "id": "byName",
364 | "options": "TOTAL"
365 | },
366 | "properties": [
367 | {
368 | "id": "color",
369 | "value": {
370 | "mode": "continuous-RdYlGr"
371 | }
372 | }
373 | ]
374 | },
375 | {
376 | "matcher": {
377 | "id": "byName",
378 | "options": "WORKING"
379 | },
380 | "properties": [
381 | {
382 | "id": "color",
383 | "value": {
384 | "mode": "continuous-GrYlRd"
385 | }
386 | }
387 | ]
388 | },
389 | {
390 | "matcher": {
391 | "id": "byName",
392 | "options": "INVALID"
393 | },
394 | "properties": [
395 | {
396 | "id": "color",
397 | "value": {
398 | "fixedColor": "dark-red",
399 | "mode": "fixed"
400 | }
401 | }
402 | ]
403 | }
404 | ]
405 | },
406 | "gridPos": {
407 | "h": 9,
408 | "w": 12,
409 | "x": 0,
410 | "y": 9
411 | },
412 | "id": 16,
413 | "options": {
414 | "displayMode": "lcd",
415 | "minVizHeight": 10,
416 | "minVizWidth": 0,
417 | "orientation": "horizontal",
418 | "reduceOptions": {
419 | "calcs": [
420 | "lastNotNull"
421 | ],
422 | "fields": "",
423 | "values": false
424 | },
425 | "showUnfilled": true
426 | },
427 | "pluginVersion": "9.3.1",
428 | "targets": [
429 | {
430 | "datasource": {
431 | "type": "prometheus",
432 | "uid": "PBFA97CFB590B2093"
433 | },
434 | "editorMode": "code",
435 | "exemplar": false,
436 | "expr": "rr_grpc_total_workers{instance=\"$server\"}",
437 | "hide": false,
438 | "instant": true,
439 | "interval": "",
440 | "legendFormat": "TOTAL",
441 | "refId": "C"
442 | },
443 | {
444 | "datasource": {
445 | "type": "prometheus",
446 | "uid": "PBFA97CFB590B2093"
447 | },
448 | "editorMode": "code",
449 | "exemplar": false,
450 | "expr": "rr_grpc_workers_ready{instance=\"$server\"}",
451 | "instant": true,
452 | "interval": "",
453 | "legendFormat": "READY",
454 | "refId": "A"
455 | },
456 | {
457 | "datasource": {
458 | "type": "prometheus",
459 | "uid": "PBFA97CFB590B2093"
460 | },
461 | "editorMode": "code",
462 | "exemplar": false,
463 | "expr": "rr_grpc_workers_working{instance=\"$server\"}",
464 | "hide": false,
465 | "instant": true,
466 | "interval": "",
467 | "legendFormat": "WORKING",
468 | "refId": "D"
469 | },
470 | {
471 | "datasource": {
472 | "type": "prometheus",
473 | "uid": "PBFA97CFB590B2093"
474 | },
475 | "editorMode": "code",
476 | "exemplar": false,
477 | "expr": "rr_grpc_workers_invalid{instance=\"$server\"}",
478 | "hide": false,
479 | "instant": true,
480 | "interval": "",
481 | "legendFormat": "INVALID",
482 | "refId": "B"
483 | }
484 | ],
485 | "title": "gRPC workers state",
486 | "type": "bargauge"
487 | },
488 | {
489 | "datasource": {
490 | "type": "prometheus",
491 | "uid": "PBFA97CFB590B2093"
492 | },
493 | "fieldConfig": {
494 | "defaults": {
495 | "color": {
496 | "mode": "continuous-GrYlRd"
497 | },
498 | "custom": {
499 | "axisCenteredZero": false,
500 | "axisColorMode": "text",
501 | "axisLabel": "",
502 | "axisPlacement": "auto",
503 | "barAlignment": 0,
504 | "drawStyle": "line",
505 | "fillOpacity": 5,
506 | "gradientMode": "none",
507 | "hideFrom": {
508 | "legend": false,
509 | "tooltip": false,
510 | "viz": false
511 | },
512 | "lineInterpolation": "smooth",
513 | "lineWidth": 2,
514 | "pointSize": 5,
515 | "scaleDistribution": {
516 | "type": "linear"
517 | },
518 | "showPoints": "auto",
519 | "spanNulls": 3600000,
520 | "stacking": {
521 | "group": "A",
522 | "mode": "none"
523 | },
524 | "thresholdsStyle": {
525 | "mode": "off"
526 | }
527 | },
528 | "mappings": [],
529 | "thresholds": {
530 | "mode": "absolute",
531 | "steps": [
532 | {
533 | "color": "green",
534 | "value": null
535 | },
536 | {
537 | "color": "red",
538 | "value": 80
539 | }
540 | ]
541 | },
542 | "unit": "decmbytes"
543 | },
544 | "overrides": [
545 | {
546 | "matcher": {
547 | "id": "byName",
548 | "options": "Workers total memory used"
549 | },
550 | "properties": [
551 | {
552 | "id": "color",
553 | "value": {
554 | "fixedColor": "green",
555 | "mode": "fixed"
556 | }
557 | }
558 | ]
559 | }
560 | ]
561 | },
562 | "gridPos": {
563 | "h": 9,
564 | "w": 12,
565 | "x": 12,
566 | "y": 9
567 | },
568 | "id": 6,
569 | "options": {
570 | "legend": {
571 | "calcs": [],
572 | "displayMode": "list",
573 | "placement": "bottom",
574 | "showLegend": true
575 | },
576 | "tooltip": {
577 | "mode": "single",
578 | "sort": "none"
579 | }
580 | },
581 | "targets": [
582 | {
583 | "datasource": {
584 | "type": "prometheus",
585 | "uid": "PBFA97CFB590B2093"
586 | },
587 | "editorMode": "code",
588 | "exemplar": true,
589 | "expr": "(rr_grpc_workers_memory_bytes{instance=\"$server\"}/1024000)",
590 | "instant": false,
591 | "interval": "",
592 | "legendFormat": "Workers total memory used",
593 | "refId": "A"
594 | }
595 | ],
596 | "title": "Workers total memory [gRPC]",
597 | "type": "timeseries"
598 | },
599 | {
600 | "datasource": {
601 | "type": "prometheus",
602 | "uid": "PBFA97CFB590B2093"
603 | },
604 | "fieldConfig": {
605 | "defaults": {
606 | "color": {
607 | "mode": "thresholds"
608 | },
609 | "mappings": [],
610 | "thresholds": {
611 | "mode": "absolute",
612 | "steps": [
613 | {
614 | "color": "green",
615 | "value": null
616 | }
617 | ]
618 | },
619 | "unit": "bytes"
620 | },
621 | "overrides": []
622 | },
623 | "gridPos": {
624 | "h": 12,
625 | "w": 24,
626 | "x": 0,
627 | "y": 18
628 | },
629 | "id": 10,
630 | "options": {
631 | "displayMode": "lcd",
632 | "minVizHeight": 10,
633 | "minVizWidth": 0,
634 | "orientation": "horizontal",
635 | "reduceOptions": {
636 | "calcs": [
637 | "lastNotNull"
638 | ],
639 | "fields": "",
640 | "values": false
641 | },
642 | "showUnfilled": true
643 | },
644 | "pluginVersion": "9.3.1",
645 | "targets": [
646 | {
647 | "datasource": {
648 | "type": "prometheus",
649 | "uid": "PBFA97CFB590B2093"
650 | },
651 | "editorMode": "code",
652 | "exemplar": false,
653 | "expr": "rr_grpc_worker_memory_bytes{instance=\"$server\"}",
654 | "instant": true,
655 | "interval": "",
656 | "legendFormat": "PID: {{pid}}",
657 | "refId": "A"
658 | }
659 | ],
660 | "title": "Memory by worker [gRPC]",
661 | "type": "bargauge"
662 | },
663 | {
664 | "datasource": {
665 | "type": "prometheus",
666 | "uid": "PBFA97CFB590B2093"
667 | },
668 | "fieldConfig": {
669 | "defaults": {
670 | "color": {
671 | "mode": "palette-classic"
672 | },
673 | "custom": {
674 | "axisCenteredZero": false,
675 | "axisColorMode": "text",
676 | "axisLabel": "",
677 | "axisPlacement": "auto",
678 | "barAlignment": 0,
679 | "drawStyle": "line",
680 | "fillOpacity": 7,
681 | "gradientMode": "hue",
682 | "hideFrom": {
683 | "legend": false,
684 | "tooltip": false,
685 | "viz": false
686 | },
687 | "lineInterpolation": "smooth",
688 | "lineWidth": 1,
689 | "pointSize": 5,
690 | "scaleDistribution": {
691 | "type": "linear"
692 | },
693 | "showPoints": "auto",
694 | "spanNulls": false,
695 | "stacking": {
696 | "group": "A",
697 | "mode": "none"
698 | },
699 | "thresholdsStyle": {
700 | "mode": "off"
701 | }
702 | },
703 | "mappings": [],
704 | "thresholds": {
705 | "mode": "absolute",
706 | "steps": [
707 | {
708 | "color": "green",
709 | "value": null
710 | },
711 | {
712 | "color": "red",
713 | "value": 80
714 | }
715 | ]
716 | },
717 | "unit": "s"
718 | },
719 | "overrides": [
720 | {
721 | "__systemRef": "hideSeriesFrom",
722 | "matcher": {
723 | "id": "byNames",
724 | "options": {
725 | "mode": "exclude",
726 | "names": [
727 | "histogram_quantile(0.95, sum(rate(rr_http_request_duration_seconds_bucket[5m])) by (le))"
728 | ],
729 | "prefix": "All except:",
730 | "readOnly": true
731 | }
732 | },
733 | "properties": [
734 | {
735 | "id": "custom.hideFrom",
736 | "value": {
737 | "legend": false,
738 | "tooltip": false,
739 | "viz": true
740 | }
741 | }
742 | ]
743 | }
744 | ]
745 | },
746 | "gridPos": {
747 | "h": 8,
748 | "w": 24,
749 | "x": 0,
750 | "y": 30
751 | },
752 | "id": 2,
753 | "options": {
754 | "legend": {
755 | "calcs": [],
756 | "displayMode": "list",
757 | "placement": "bottom",
758 | "showLegend": true
759 | },
760 | "tooltip": {
761 | "mode": "single",
762 | "sort": "none"
763 | }
764 | },
765 | "targets": [
766 | {
767 | "datasource": {
768 | "type": "prometheus",
769 | "uid": "PBFA97CFB590B2093"
770 | },
771 | "editorMode": "code",
772 | "exemplar": true,
773 | "expr": "histogram_quantile(0.95, sum(rate(rr_grpc_request_duration_seconds_bucket{instance=\"$server\"}[5m])) by (le))",
774 | "interval": "",
775 | "legendFormat": "",
776 | "range": true,
777 | "refId": "A"
778 | }
779 | ],
780 | "title": "gRPC latency (ms)",
781 | "type": "timeseries"
782 | },
783 | {
784 | "datasource": {
785 | "type": "prometheus",
786 | "uid": "PBFA97CFB590B2093"
787 | },
788 | "fieldConfig": {
789 | "defaults": {
790 | "color": {
791 | "mode": "palette-classic"
792 | },
793 | "custom": {
794 | "axisCenteredZero": false,
795 | "axisColorMode": "text",
796 | "axisLabel": "Queue size (requests)",
797 | "axisPlacement": "auto",
798 | "barAlignment": 0,
799 | "drawStyle": "line",
800 | "fillOpacity": 6,
801 | "gradientMode": "none",
802 | "hideFrom": {
803 | "legend": false,
804 | "tooltip": false,
805 | "viz": false
806 | },
807 | "lineInterpolation": "smooth",
808 | "lineWidth": 2,
809 | "pointSize": 5,
810 | "scaleDistribution": {
811 | "type": "linear"
812 | },
813 | "showPoints": "auto",
814 | "spanNulls": 3600000,
815 | "stacking": {
816 | "group": "A",
817 | "mode": "none"
818 | },
819 | "thresholdsStyle": {
820 | "mode": "off"
821 | }
822 | },
823 | "mappings": [],
824 | "thresholds": {
825 | "mode": "absolute",
826 | "steps": [
827 | {
828 | "color": "green",
829 | "value": null
830 | },
831 | {
832 | "color": "red",
833 | "value": 80
834 | }
835 | ]
836 | }
837 | },
838 | "overrides": []
839 | },
840 | "gridPos": {
841 | "h": 9,
842 | "w": 12,
843 | "x": 0,
844 | "y": 38
845 | },
846 | "id": 8,
847 | "options": {
848 | "legend": {
849 | "calcs": [],
850 | "displayMode": "list",
851 | "placement": "bottom",
852 | "showLegend": true
853 | },
854 | "tooltip": {
855 | "mode": "single",
856 | "sort": "none"
857 | }
858 | },
859 | "targets": [
860 | {
861 | "datasource": {
862 | "type": "prometheus",
863 | "uid": "PBFA97CFB590B2093"
864 | },
865 | "editorMode": "code",
866 | "exemplar": true,
867 | "expr": "rr_grpc_requests_queue{instance=\"$server\"}",
868 | "interval": "",
869 | "legendFormat": "",
870 | "range": true,
871 | "refId": "A"
872 | }
873 | ],
874 | "title": "gRPC requests queue size",
875 | "type": "timeseries"
876 | },
877 | {
878 | "datasource": {
879 | "type": "prometheus",
880 | "uid": "PBFA97CFB590B2093"
881 | },
882 | "fieldConfig": {
883 | "defaults": {
884 | "color": {
885 | "mode": "palette-classic"
886 | },
887 | "custom": {
888 | "axisCenteredZero": false,
889 | "axisColorMode": "text",
890 | "axisLabel": "",
891 | "axisPlacement": "auto",
892 | "barAlignment": 0,
893 | "drawStyle": "line",
894 | "fillOpacity": 5,
895 | "gradientMode": "none",
896 | "hideFrom": {
897 | "legend": false,
898 | "tooltip": false,
899 | "viz": false
900 | },
901 | "lineInterpolation": "linear",
902 | "lineWidth": 1,
903 | "pointSize": 5,
904 | "scaleDistribution": {
905 | "type": "linear"
906 | },
907 | "showPoints": "auto",
908 | "spanNulls": 3600000,
909 | "stacking": {
910 | "group": "A",
911 | "mode": "none"
912 | },
913 | "thresholdsStyle": {
914 | "mode": "off"
915 | }
916 | },
917 | "mappings": [],
918 | "thresholds": {
919 | "mode": "absolute",
920 | "steps": [
921 | {
922 | "color": "green",
923 | "value": null
924 | },
925 | {
926 | "color": "red",
927 | "value": 80
928 | }
929 | ]
930 | }
931 | },
932 | "overrides": []
933 | },
934 | "gridPos": {
935 | "h": 9,
936 | "w": 12,
937 | "x": 12,
938 | "y": 38
939 | },
940 | "id": 18,
941 | "options": {
942 | "legend": {
943 | "calcs": [],
944 | "displayMode": "list",
945 | "placement": "bottom",
946 | "showLegend": true
947 | },
948 | "tooltip": {
949 | "mode": "single",
950 | "sort": "none"
951 | }
952 | },
953 | "targets": [
954 | {
955 | "datasource": {
956 | "type": "prometheus",
957 | "uid": "PBFA97CFB590B2093"
958 | },
959 | "editorMode": "code",
960 | "exemplar": true,
961 | "expr": "rate(rr_grpc_request_total{instance=\"$server\"}[1m])",
962 | "interval": "",
963 | "legendFormat": "RPM",
964 | "range": true,
965 | "refId": "A"
966 | }
967 | ],
968 | "title": "RPM [gRPC]",
969 | "type": "timeseries"
970 | }
971 | ],
972 | "refresh": "",
973 | "schemaVersion": 37,
974 | "style": "dark",
975 | "tags": [],
976 | "templating": {
977 | "list": [
978 | {
979 | "current": {
980 | "selected": true,
981 | "text": "docker-metrics:2112",
982 | "value": "docker-metrics:2112"
983 | },
984 | "definition": "go_info",
985 | "hide": 0,
986 | "includeAll": false,
987 | "multi": false,
988 | "name": "server",
989 | "options": [],
990 | "query": {
991 | "query": "go_info",
992 | "refId": "StandardVariableQuery"
993 | },
994 | "refresh": 1,
995 | "regex": "/instance=\\\"(?[\\w\\_\\-\\:0-9]+)\\\"/",
996 | "skipUrlSync": false,
997 | "sort": 0,
998 | "type": "query"
999 | }
1000 | ]
1001 | },
1002 | "title": "RoadRunner gRPC dashboard"
1003 | }
--------------------------------------------------------------------------------
/grafana/provisioning/dashboards/roadrunner-jobs.json:
--------------------------------------------------------------------------------
1 | {
2 | "annotations": {
3 | "list": [
4 | {
5 | "builtIn": 1,
6 | "datasource": {
7 | "type": "datasource",
8 | "uid": "grafana"
9 | },
10 | "enable": true,
11 | "hide": true,
12 | "iconColor": "rgba(0, 211, 255, 1)",
13 | "name": "Annotations & Alerts",
14 | "target": {
15 | "limit": 100,
16 | "matchAny": false,
17 | "tags": [],
18 | "type": "dashboard"
19 | },
20 | "type": "dashboard"
21 | }
22 | ]
23 | },
24 | "editable": true,
25 | "fiscalYearStartMonth": 0,
26 | "graphTooltip": 0,
27 | "id": 5,
28 | "links": [
29 | {
30 | "asDropdown": false,
31 | "icon": "external link",
32 | "includeVars": false,
33 | "keepTime": false,
34 | "tags": [],
35 | "targetBlank": false,
36 | "title": "New link",
37 | "tooltip": "",
38 | "type": "dashboards",
39 | "url": ""
40 | }
41 | ],
42 | "liveNow": false,
43 | "panels": [
44 | {
45 | "datasource": {
46 | "type": "prometheus",
47 | "uid": "PBFA97CFB590B2093"
48 | },
49 | "fieldConfig": {
50 | "defaults": {
51 | "color": {
52 | "mode": "thresholds"
53 | },
54 | "mappings": [],
55 | "thresholds": {
56 | "mode": "absolute",
57 | "steps": [
58 | {
59 | "color": "green",
60 | "value": null
61 | }
62 | ]
63 | },
64 | "unit": "s"
65 | },
66 | "overrides": []
67 | },
68 | "gridPos": {
69 | "h": 9,
70 | "w": 3,
71 | "x": 0,
72 | "y": 0
73 | },
74 | "id": 20,
75 | "options": {
76 | "colorMode": "value",
77 | "graphMode": "area",
78 | "justifyMode": "auto",
79 | "orientation": "auto",
80 | "reduceOptions": {
81 | "calcs": [
82 | "last"
83 | ],
84 | "fields": "",
85 | "values": false
86 | },
87 | "textMode": "auto"
88 | },
89 | "pluginVersion": "9.3.1",
90 | "targets": [
91 | {
92 | "datasource": {
93 | "type": "prometheus",
94 | "uid": "PBFA97CFB590B2093"
95 | },
96 | "editorMode": "code",
97 | "exemplar": false,
98 | "expr": "rr_http_uptime_seconds{instance=\"$server\"}",
99 | "instant": true,
100 | "interval": "",
101 | "legendFormat": "Uptime",
102 | "refId": "A"
103 | }
104 | ],
105 | "title": "RR uptime",
106 | "type": "stat"
107 | },
108 | {
109 | "datasource": {
110 | "type": "prometheus",
111 | "uid": "PBFA97CFB590B2093"
112 | },
113 | "fieldConfig": {
114 | "defaults": {
115 | "color": {
116 | "mode": "palette-classic"
117 | },
118 | "custom": {
119 | "axisCenteredZero": false,
120 | "axisColorMode": "text",
121 | "axisLabel": "",
122 | "axisPlacement": "auto",
123 | "barAlignment": 0,
124 | "drawStyle": "line",
125 | "fillOpacity": 4,
126 | "gradientMode": "none",
127 | "hideFrom": {
128 | "legend": false,
129 | "tooltip": false,
130 | "viz": false
131 | },
132 | "lineInterpolation": "linear",
133 | "lineWidth": 1,
134 | "pointSize": 5,
135 | "scaleDistribution": {
136 | "type": "linear"
137 | },
138 | "showPoints": "auto",
139 | "spanNulls": 3600000,
140 | "stacking": {
141 | "group": "A",
142 | "mode": "none"
143 | },
144 | "thresholdsStyle": {
145 | "mode": "off"
146 | }
147 | },
148 | "mappings": [],
149 | "thresholds": {
150 | "mode": "absolute",
151 | "steps": [
152 | {
153 | "color": "yellow",
154 | "value": null
155 | }
156 | ]
157 | },
158 | "unit": "decbytes"
159 | },
160 | "overrides": [
161 | {
162 | "matcher": {
163 | "id": "byName",
164 | "options": "RR memory"
165 | },
166 | "properties": [
167 | {
168 | "id": "color",
169 | "value": {
170 | "fixedColor": "blue",
171 | "mode": "fixed"
172 | }
173 | }
174 | ]
175 | }
176 | ]
177 | },
178 | "gridPos": {
179 | "h": 9,
180 | "w": 10,
181 | "x": 3,
182 | "y": 0
183 | },
184 | "id": 14,
185 | "options": {
186 | "legend": {
187 | "calcs": [],
188 | "displayMode": "list",
189 | "placement": "bottom",
190 | "showLegend": true
191 | },
192 | "tooltip": {
193 | "mode": "single",
194 | "sort": "none"
195 | }
196 | },
197 | "targets": [
198 | {
199 | "datasource": {
200 | "type": "prometheus",
201 | "uid": "PBFA97CFB590B2093"
202 | },
203 | "editorMode": "builder",
204 | "exemplar": true,
205 | "expr": "go_memstats_heap_inuse_bytes{instance=\"$server\"}",
206 | "interval": "",
207 | "legendFormat": "RR memory",
208 | "range": true,
209 | "refId": "A"
210 | }
211 | ],
212 | "title": "RR in-use memory",
213 | "type": "timeseries"
214 | },
215 | {
216 | "datasource": {
217 | "type": "prometheus",
218 | "uid": "PBFA97CFB590B2093"
219 | },
220 | "fieldConfig": {
221 | "defaults": {
222 | "color": {
223 | "mode": "palette-classic"
224 | },
225 | "custom": {
226 | "axisCenteredZero": false,
227 | "axisColorMode": "text",
228 | "axisLabel": "",
229 | "axisPlacement": "auto",
230 | "barAlignment": 0,
231 | "drawStyle": "line",
232 | "fillOpacity": 11,
233 | "gradientMode": "hue",
234 | "hideFrom": {
235 | "legend": false,
236 | "tooltip": false,
237 | "viz": false
238 | },
239 | "lineInterpolation": "linear",
240 | "lineStyle": {
241 | "fill": "solid"
242 | },
243 | "lineWidth": 1,
244 | "pointSize": 5,
245 | "scaleDistribution": {
246 | "type": "linear"
247 | },
248 | "showPoints": "auto",
249 | "spanNulls": 3600000,
250 | "stacking": {
251 | "group": "A",
252 | "mode": "none"
253 | },
254 | "thresholdsStyle": {
255 | "mode": "off"
256 | }
257 | },
258 | "mappings": [],
259 | "thresholds": {
260 | "mode": "absolute",
261 | "steps": [
262 | {
263 | "color": "green",
264 | "value": null
265 | },
266 | {
267 | "color": "red",
268 | "value": 80
269 | }
270 | ]
271 | }
272 | },
273 | "overrides": [
274 | {
275 | "matcher": {
276 | "id": "byName",
277 | "options": "Green threads count"
278 | },
279 | "properties": [
280 | {
281 | "id": "color",
282 | "value": {
283 | "fixedColor": "purple",
284 | "mode": "fixed"
285 | }
286 | }
287 | ]
288 | }
289 | ]
290 | },
291 | "gridPos": {
292 | "h": 9,
293 | "w": 11,
294 | "x": 13,
295 | "y": 0
296 | },
297 | "id": 12,
298 | "options": {
299 | "legend": {
300 | "calcs": [],
301 | "displayMode": "list",
302 | "placement": "bottom",
303 | "showLegend": true
304 | },
305 | "tooltip": {
306 | "mode": "single",
307 | "sort": "none"
308 | }
309 | },
310 | "targets": [
311 | {
312 | "datasource": {
313 | "type": "prometheus",
314 | "uid": "PBFA97CFB590B2093"
315 | },
316 | "editorMode": "builder",
317 | "exemplar": true,
318 | "expr": "go_goroutines{instance=\"$server\"}",
319 | "instant": false,
320 | "interval": "",
321 | "legendFormat": "Green threads count",
322 | "refId": "A"
323 | }
324 | ],
325 | "title": "Goroutines",
326 | "type": "timeseries"
327 | },
328 | {
329 | "datasource": {
330 | "type": "prometheus",
331 | "uid": "PBFA97CFB590B2093"
332 | },
333 | "fieldConfig": {
334 | "defaults": {
335 | "color": {
336 | "mode": "thresholds"
337 | },
338 | "mappings": [
339 | {
340 | "options": {
341 | "pattern": "TOTAL",
342 | "result": {
343 | "color": "red",
344 | "index": 0
345 | }
346 | },
347 | "type": "regex"
348 | }
349 | ],
350 | "thresholds": {
351 | "mode": "absolute",
352 | "steps": [
353 | {
354 | "color": "blue",
355 | "value": null
356 | }
357 | ]
358 | }
359 | },
360 | "overrides": [
361 | {
362 | "matcher": {
363 | "id": "byName",
364 | "options": "TOTAL"
365 | },
366 | "properties": [
367 | {
368 | "id": "color",
369 | "value": {
370 | "mode": "continuous-RdYlGr"
371 | }
372 | }
373 | ]
374 | },
375 | {
376 | "matcher": {
377 | "id": "byName",
378 | "options": "WORKING"
379 | },
380 | "properties": [
381 | {
382 | "id": "color",
383 | "value": {
384 | "mode": "continuous-GrYlRd"
385 | }
386 | }
387 | ]
388 | },
389 | {
390 | "matcher": {
391 | "id": "byName",
392 | "options": "INVALID"
393 | },
394 | "properties": [
395 | {
396 | "id": "color",
397 | "value": {
398 | "fixedColor": "dark-red",
399 | "mode": "fixed"
400 | }
401 | }
402 | ]
403 | }
404 | ]
405 | },
406 | "gridPos": {
407 | "h": 9,
408 | "w": 12,
409 | "x": 0,
410 | "y": 9
411 | },
412 | "id": 16,
413 | "options": {
414 | "displayMode": "lcd",
415 | "minVizHeight": 10,
416 | "minVizWidth": 0,
417 | "orientation": "horizontal",
418 | "reduceOptions": {
419 | "calcs": [
420 | "lastNotNull"
421 | ],
422 | "fields": "",
423 | "values": false
424 | },
425 | "showUnfilled": true
426 | },
427 | "pluginVersion": "9.3.1",
428 | "targets": [
429 | {
430 | "datasource": {
431 | "type": "prometheus",
432 | "uid": "PBFA97CFB590B2093"
433 | },
434 | "exemplar": false,
435 | "expr": "rr_jobs_total_workers",
436 | "hide": false,
437 | "instant": true,
438 | "interval": "",
439 | "legendFormat": "TOTAL",
440 | "refId": "C"
441 | },
442 | {
443 | "datasource": {
444 | "type": "prometheus",
445 | "uid": "PBFA97CFB590B2093"
446 | },
447 | "editorMode": "builder",
448 | "exemplar": false,
449 | "expr": "rr_jobs_workers_ready{instance=\"$server\"}",
450 | "instant": true,
451 | "interval": "",
452 | "legendFormat": "READY",
453 | "refId": "A"
454 | },
455 | {
456 | "datasource": {
457 | "type": "prometheus",
458 | "uid": "PBFA97CFB590B2093"
459 | },
460 | "editorMode": "builder",
461 | "exemplar": false,
462 | "expr": "rr_jobs_workers_working{instance=\"$server\"}",
463 | "hide": false,
464 | "instant": true,
465 | "interval": "",
466 | "legendFormat": "WORKING",
467 | "refId": "D"
468 | },
469 | {
470 | "datasource": {
471 | "type": "prometheus",
472 | "uid": "PBFA97CFB590B2093"
473 | },
474 | "editorMode": "builder",
475 | "exemplar": false,
476 | "expr": "rr_jobs_workers_invalid{instance=\"$server\"}",
477 | "hide": false,
478 | "instant": true,
479 | "interval": "",
480 | "legendFormat": "INVALID",
481 | "refId": "B"
482 | }
483 | ],
484 | "title": "Jobs workers state",
485 | "type": "bargauge"
486 | },
487 | {
488 | "datasource": {
489 | "type": "prometheus",
490 | "uid": "PBFA97CFB590B2093"
491 | },
492 | "fieldConfig": {
493 | "defaults": {
494 | "color": {
495 | "mode": "continuous-GrYlRd"
496 | },
497 | "custom": {
498 | "axisCenteredZero": false,
499 | "axisColorMode": "text",
500 | "axisLabel": "",
501 | "axisPlacement": "auto",
502 | "barAlignment": 0,
503 | "drawStyle": "line",
504 | "fillOpacity": 5,
505 | "gradientMode": "none",
506 | "hideFrom": {
507 | "legend": false,
508 | "tooltip": false,
509 | "viz": false
510 | },
511 | "lineInterpolation": "smooth",
512 | "lineWidth": 2,
513 | "pointSize": 5,
514 | "scaleDistribution": {
515 | "type": "linear"
516 | },
517 | "showPoints": "auto",
518 | "spanNulls": 3600000,
519 | "stacking": {
520 | "group": "A",
521 | "mode": "none"
522 | },
523 | "thresholdsStyle": {
524 | "mode": "off"
525 | }
526 | },
527 | "mappings": [],
528 | "thresholds": {
529 | "mode": "absolute",
530 | "steps": [
531 | {
532 | "color": "green",
533 | "value": null
534 | },
535 | {
536 | "color": "red",
537 | "value": 80
538 | }
539 | ]
540 | },
541 | "unit": "decmbytes"
542 | },
543 | "overrides": [
544 | {
545 | "matcher": {
546 | "id": "byName",
547 | "options": "Workers total memory used"
548 | },
549 | "properties": [
550 | {
551 | "id": "color",
552 | "value": {
553 | "fixedColor": "green",
554 | "mode": "fixed"
555 | }
556 | }
557 | ]
558 | }
559 | ]
560 | },
561 | "gridPos": {
562 | "h": 9,
563 | "w": 12,
564 | "x": 12,
565 | "y": 9
566 | },
567 | "id": 6,
568 | "options": {
569 | "legend": {
570 | "calcs": [],
571 | "displayMode": "list",
572 | "placement": "bottom",
573 | "showLegend": true
574 | },
575 | "tooltip": {
576 | "mode": "single",
577 | "sort": "none"
578 | }
579 | },
580 | "targets": [
581 | {
582 | "datasource": {
583 | "type": "prometheus",
584 | "uid": "PBFA97CFB590B2093"
585 | },
586 | "editorMode": "code",
587 | "exemplar": true,
588 | "expr": "(rr_jobs_workers_memory_bytes{instance=\"$server\"}/1024000)",
589 | "instant": false,
590 | "interval": "",
591 | "legendFormat": "Workers total memory used",
592 | "refId": "A"
593 | }
594 | ],
595 | "title": "Workers total memory [JOBS]",
596 | "type": "timeseries"
597 | },
598 | {
599 | "datasource": {
600 | "type": "prometheus",
601 | "uid": "PBFA97CFB590B2093"
602 | },
603 | "fieldConfig": {
604 | "defaults": {
605 | "color": {
606 | "mode": "thresholds"
607 | },
608 | "mappings": [],
609 | "thresholds": {
610 | "mode": "absolute",
611 | "steps": [
612 | {
613 | "color": "green",
614 | "value": null
615 | }
616 | ]
617 | },
618 | "unit": "bytes"
619 | },
620 | "overrides": []
621 | },
622 | "gridPos": {
623 | "h": 12,
624 | "w": 24,
625 | "x": 0,
626 | "y": 18
627 | },
628 | "id": 10,
629 | "options": {
630 | "displayMode": "lcd",
631 | "minVizHeight": 10,
632 | "minVizWidth": 0,
633 | "orientation": "horizontal",
634 | "reduceOptions": {
635 | "calcs": [
636 | "lastNotNull"
637 | ],
638 | "fields": "",
639 | "values": false
640 | },
641 | "showUnfilled": true
642 | },
643 | "pluginVersion": "9.3.1",
644 | "targets": [
645 | {
646 | "datasource": {
647 | "type": "prometheus",
648 | "uid": "PBFA97CFB590B2093"
649 | },
650 | "editorMode": "code",
651 | "exemplar": false,
652 | "expr": "rr_jobs_worker_memory_bytes{instance=\"$server\"}",
653 | "instant": true,
654 | "interval": "",
655 | "legendFormat": "PID: {{pid}}",
656 | "refId": "A"
657 | }
658 | ],
659 | "title": "Memory by worker [JOBS]",
660 | "type": "bargauge"
661 | },
662 | {
663 | "datasource": {
664 | "type": "prometheus",
665 | "uid": "PBFA97CFB590B2093"
666 | },
667 | "fieldConfig": {
668 | "defaults": {
669 | "color": {
670 | "mode": "palette-classic"
671 | },
672 | "custom": {
673 | "axisCenteredZero": false,
674 | "axisColorMode": "text",
675 | "axisLabel": "",
676 | "axisPlacement": "auto",
677 | "barAlignment": 0,
678 | "drawStyle": "line",
679 | "fillOpacity": 0,
680 | "gradientMode": "none",
681 | "hideFrom": {
682 | "legend": false,
683 | "tooltip": false,
684 | "viz": false
685 | },
686 | "lineInterpolation": "linear",
687 | "lineWidth": 1,
688 | "pointSize": 5,
689 | "scaleDistribution": {
690 | "type": "linear"
691 | },
692 | "showPoints": "auto",
693 | "spanNulls": false,
694 | "stacking": {
695 | "group": "A",
696 | "mode": "none"
697 | },
698 | "thresholdsStyle": {
699 | "mode": "off"
700 | }
701 | },
702 | "mappings": [],
703 | "thresholds": {
704 | "mode": "absolute",
705 | "steps": [
706 | {
707 | "color": "green",
708 | "value": null
709 | },
710 | {
711 | "color": "red",
712 | "value": 80
713 | }
714 | ]
715 | }
716 | },
717 | "overrides": []
718 | },
719 | "gridPos": {
720 | "h": 8,
721 | "w": 12,
722 | "x": 0,
723 | "y": 30
724 | },
725 | "id": 22,
726 | "options": {
727 | "legend": {
728 | "calcs": [],
729 | "displayMode": "list",
730 | "placement": "bottom",
731 | "showLegend": true
732 | },
733 | "tooltip": {
734 | "mode": "single",
735 | "sort": "none"
736 | }
737 | },
738 | "targets": [
739 | {
740 | "datasource": {
741 | "type": "prometheus",
742 | "uid": "PBFA97CFB590B2093"
743 | },
744 | "editorMode": "code",
745 | "exemplar": true,
746 | "expr": "rate(rr_jobs_jobs_ok{instance=\"$server\"}[5m])",
747 | "interval": "",
748 | "legendFormat": "",
749 | "range": true,
750 | "refId": "A"
751 | }
752 | ],
753 | "title": "JOBS Ok rate [5m]",
754 | "type": "timeseries"
755 | },
756 | {
757 | "datasource": {
758 | "type": "prometheus",
759 | "uid": "PBFA97CFB590B2093"
760 | },
761 | "fieldConfig": {
762 | "defaults": {
763 | "color": {
764 | "mode": "palette-classic"
765 | },
766 | "custom": {
767 | "axisCenteredZero": false,
768 | "axisColorMode": "text",
769 | "axisLabel": "",
770 | "axisPlacement": "auto",
771 | "barAlignment": 0,
772 | "drawStyle": "line",
773 | "fillOpacity": 9,
774 | "gradientMode": "none",
775 | "hideFrom": {
776 | "legend": false,
777 | "tooltip": false,
778 | "viz": false
779 | },
780 | "lineInterpolation": "linear",
781 | "lineWidth": 1,
782 | "pointSize": 5,
783 | "scaleDistribution": {
784 | "type": "linear"
785 | },
786 | "showPoints": "auto",
787 | "spanNulls": 3600000,
788 | "stacking": {
789 | "group": "A",
790 | "mode": "none"
791 | },
792 | "thresholdsStyle": {
793 | "mode": "off"
794 | }
795 | },
796 | "mappings": [],
797 | "thresholds": {
798 | "mode": "absolute",
799 | "steps": [
800 | {
801 | "color": "green",
802 | "value": null
803 | }
804 | ]
805 | }
806 | },
807 | "overrides": [
808 | {
809 | "matcher": {
810 | "id": "byName",
811 | "options": "{instance=\"localhost:2112\", job=\"prometheus\"}"
812 | },
813 | "properties": [
814 | {
815 | "id": "color",
816 | "value": {
817 | "fixedColor": "dark-red",
818 | "mode": "fixed"
819 | }
820 | }
821 | ]
822 | }
823 | ]
824 | },
825 | "gridPos": {
826 | "h": 8,
827 | "w": 12,
828 | "x": 12,
829 | "y": 30
830 | },
831 | "id": 26,
832 | "options": {
833 | "legend": {
834 | "calcs": [],
835 | "displayMode": "list",
836 | "placement": "bottom",
837 | "showLegend": true
838 | },
839 | "tooltip": {
840 | "mode": "single",
841 | "sort": "none"
842 | }
843 | },
844 | "targets": [
845 | {
846 | "datasource": {
847 | "type": "prometheus",
848 | "uid": "PBFA97CFB590B2093"
849 | },
850 | "editorMode": "code",
851 | "exemplar": true,
852 | "expr": "rate(rr_jobs_jobs_err{instance=\"$server\"}[5m])",
853 | "interval": "",
854 | "legendFormat": "",
855 | "range": true,
856 | "refId": "A"
857 | }
858 | ],
859 | "title": "JOBS errors rate [5m]",
860 | "type": "timeseries"
861 | }
862 | ],
863 | "refresh": "5s",
864 | "schemaVersion": 37,
865 | "style": "dark",
866 | "tags": [],
867 | "templating": {
868 | "list": [
869 | {
870 | "current": {
871 | "selected": true,
872 | "text": "twitter-metrics:2112",
873 | "value": "twitter-metrics:2112"
874 | },
875 | "definition": "go_info",
876 | "hide": 0,
877 | "includeAll": false,
878 | "label": "",
879 | "multi": false,
880 | "name": "server",
881 | "options": [],
882 | "query": {
883 | "query": "go_info",
884 | "refId": "StandardVariableQuery"
885 | },
886 | "refresh": 1,
887 | "regex": "/instance=\\\"(?[\\w\\_\\-\\:0-9]+)\\\"/",
888 | "skipUrlSync": false,
889 | "sort": 0,
890 | "type": "query"
891 | }
892 | ]
893 | },
894 | "title": "RoadRunner JOBS dashboard"
895 | }
--------------------------------------------------------------------------------
/grafana/provisioning/datasources/datasource.yml:
--------------------------------------------------------------------------------
1 | apiVersion: 1
2 |
3 | deleteDatasources:
4 | - name: Prometheus
5 | orgId: 1
6 |
7 | datasources:
8 | - name: Prometheus
9 | type: prometheus
10 | access: proxy
11 | orgId: 1
12 | url: http://prometheus:9090
13 | isDefault: true
14 | editable: false
15 |
--------------------------------------------------------------------------------
/prometheus/prometheus.yml:
--------------------------------------------------------------------------------
1 | global:
2 | scrape_interval: 60s
3 | evaluation_interval: 60s
4 | external_labels:
5 | monitor: 'Metrics'
6 |
7 | scrape_configs:
8 | - job_name: 'twitter'
9 | scrape_interval: 60s
10 | static_configs:
11 | - targets: [ 'twitter-metrics:2112' ]
12 | # - job_name: 'docker'
13 | # scrape_interval: 60s
14 | # static_configs:
15 | # - targets: [ 'docker-metrics:2112' ]
16 | # - job_name: 'github'
17 | # scrape_interval: 60s
18 | # static_configs:
19 | # - targets: [ 'github-metrics:2112' ]
20 | # - job_name: 'packagist'
21 | # scrape_interval: 60s
22 | # static_configs:
23 | # - targets: [ 'packagist-metrics:2112' ]
24 |
--------------------------------------------------------------------------------
/runtime/grafana/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------
/runtime/prometheus/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
--------------------------------------------------------------------------------