Grafana

Montplex Cache Monitoring Data Supports Grafana Charts: A Guide to Creating a Grafana Dashboard

Deploy Grafana

  1. If you don't have a Grafana environment, you can quickly deploy a test environment using Docker:
docker run -d -p 3000:3000 --name grafana grafana/grafana
  1. Access your deployed Grafana at http://ip:3000/.
  2. The default username and password are admin/admin.

Create a Data Source

  1. Visit your Grafana address and open the Grafana control panel.
  2. In the navigation pane, select the Connections tab under Data Sources.
  3. Select Add data source to open the data source addition page.
  4. Choose Prometheus under Time series databases to enter the Setting page.
  5. For Name, you can set it to the name of your Montplex Cache running environment, such as ap-southeast-1-vpc123.
  6. In the Connections settings section, for Prometheus server URL*, set it to the Prometheus interface exposed by your Montplex Cache running environment, such as:
http://k8s-ingressn-ingressn-7ef7e01112-5459e41a95330be8.elb.us-east-1.amazonaws.com:80/prometheus
  1. In the Authentication section, choose Basic authentication under Authentication methods and fill in the User/password.
  2. Keep the other configurations as default.
  3. Finally, select Save & test to complete the creation of the Prometheus data source.

Import Official Dashboard

Grafana Dashboard supports one-click import of monitoring Dashboard ID or JSON files for Redis.

  1. Visit your Grafana address and open the Grafana control panel.
  2. In the navigation pane, select the Dashboards tab, click the New dropdown button in the top right corner, and choose import to go to the Import dashboard page.
  3. Choose a public Grafana Dashboard ID, such as: 11835

Note: For a list of Grafana Dashboard IDs, you can refer to Grafana dashboards | Grafana Labs

  1. On the Import dashboard page, enter 11835 in the text box and select Load to go to the data source selection page.
  2. You may rename the Dashboard or use the default name.
  3. Select the previously created data source, such as ap-southeast-1-vpc123.
  4. Select Import.
  5. Upon completion of import, you will automatically be redirected to the Dashboard page.

Import Custom Dashboard

To match the organization and project logic within Montplex Cache, we provide a set of custom dashboards.

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  "description": "Redis Dashboard for Prometheus Redis Exporter 1.x, it works with MontCache",
25  "editable": true,
26  "fiscalYearStartMonth": 0,
27  "gnetId": 11835,
28  "graphTooltip": 0,
29  "id": 7,
30  "links": [],
31  "panels": [
32    {
33      "datasource": {
34        "type": "prometheus",
35        "uid": "ddn8x3poqpo1sc"
36      },
37      "fieldConfig": {
38        "defaults": {
39          "color": {
40            "mode": "palette-classic"
41          },
42          "custom": {
43            "axisBorderShow": false,
44            "axisCenteredZero": false,
45            "axisColorMode": "text",
46            "axisLabel": "",
47            "axisPlacement": "auto",
48            "barAlignment": 0,
49            "drawStyle": "line",
50            "fillOpacity": 0,
51            "gradientMode": "none",
52            "hideFrom": {
53              "legend": false,
54              "tooltip": false,
55              "viz": false
56            },
57            "insertNulls": false,
58            "lineInterpolation": "linear",
59            "lineWidth": 1,
60            "pointSize": 5,
61            "scaleDistribution": {
62              "type": "linear"
63            },
64            "showPoints": "auto",
65            "spanNulls": false,
66            "stacking": {
67              "group": "A",
68              "mode": "none"
69            },
70            "thresholdsStyle": {
71              "mode": "off"
72            }
73          },
74          "mappings": [],
75          "thresholds": {
76            "mode": "absolute",
77            "steps": [
78              {
79                "color": "green"
80              },
81              {
82                "color": "red",
83                "value": 80
84              }
85            ]
86          }
87        },
88        "overrides": []
89      },
90      "gridPos": {
91        "h": 7,
92        "w": 8,
93        "x": 0,
94        "y": 0
95      },
96      "id": 17,
97      "options": {
98        "legend": {
99          "calcs": [],
100          "displayMode": "list",
101          "placement": "bottom",
102          "showLegend": false
103        },
104        "tooltip": {
105          "maxHeight": 600,
106          "mode": "multi",
107          "sort": "none"
108        }
109      },
110      "targets": [
111        {
112          "datasource": {
113            "type": "prometheus",
114            "uid": "ddn8x3poqpo1sc"
115          },
116          "editorMode": "code",
117          "expr": "100 * (redis_memory_used_bytes{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}  / redis_memory_max_bytes{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"} )",
118          "instant": false,
119          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}",
120          "range": true,
121          "refId": "A"
122        }
123      ],
124      "title": "Memory Usage",
125      "type": "timeseries"
126    },
127    {
128      "datasource": {
129        "type": "prometheus",
130        "uid": "ddn8x3poqpo1sc"
131      },
132      "fieldConfig": {
133        "defaults": {
134          "color": {
135            "mode": "palette-classic"
136          },
137          "custom": {
138            "axisBorderShow": false,
139            "axisCenteredZero": false,
140            "axisColorMode": "text",
141            "axisLabel": "",
142            "axisPlacement": "auto",
143            "barAlignment": 0,
144            "drawStyle": "line",
145            "fillOpacity": 10,
146            "gradientMode": "none",
147            "hideFrom": {
148              "legend": false,
149              "tooltip": false,
150              "viz": false
151            },
152            "insertNulls": false,
153            "lineInterpolation": "linear",
154            "lineWidth": 2,
155            "pointSize": 5,
156            "scaleDistribution": {
157              "type": "linear"
158            },
159            "showPoints": "never",
160            "spanNulls": false,
161            "stacking": {
162              "group": "A",
163              "mode": "none"
164            },
165            "thresholdsStyle": {
166              "mode": "off"
167            }
168          },
169          "mappings": [],
170          "min": 0,
171          "thresholds": {
172            "mode": "absolute",
173            "steps": [
174              {
175                "color": "green"
176              },
177              {
178                "color": "red",
179                "value": 80
180              }
181            ]
182          },
183          "unit": "bytes"
184        },
185        "overrides": [
186          {
187            "matcher": {
188              "id": "byName",
189              "options": "max"
190            },
191            "properties": [
192              {
193                "id": "color",
194                "value": {
195                  "fixedColor": "#BF1B00",
196                  "mode": "fixed"
197                }
198              }
199            ]
200          }
201        ]
202      },
203      "gridPos": {
204        "h": 7,
205        "w": 8,
206        "x": 8,
207        "y": 0
208      },
209      "id": 7,
210      "options": {
211        "legend": {
212          "calcs": [],
213          "displayMode": "list",
214          "placement": "bottom",
215          "showLegend": false
216        },
217        "tooltip": {
218          "maxHeight": 600,
219          "mode": "multi",
220          "sort": "asc"
221        }
222      },
223      "targets": [
224        {
225          "datasource": {
226            "type": "prometheus",
227            "uid": "ddn8x3poqpo1sc"
228          },
229          "editorMode": "code",
230          "expr": "redis_memory_used_bytes{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"} ",
231          "format": "time_series",
232          "intervalFactor": 2,
233          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}-usedMem",
234          "metric": "",
235          "range": true,
236          "refId": "A",
237          "step": 240,
238          "target": ""
239        },
240        {
241          "datasource": {
242            "type": "prometheus",
243            "uid": "ddn8x3poqpo1sc"
244          },
245          "editorMode": "code",
246          "expr": "redis_memory_max_bytes{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"} ",
247          "format": "time_series",
248          "hide": false,
249          "intervalFactor": 2,
250          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}-maxMem",
251          "range": true,
252          "refId": "B",
253          "step": 240
254        }
255      ],
256      "title": "Total Memory Used",
257      "type": "timeseries"
258    },
259    {
260      "datasource": {
261        "type": "prometheus",
262        "uid": "ddn8x3poqpo1sc"
263      },
264      "fieldConfig": {
265        "defaults": {
266          "color": {
267            "mode": "palette-classic"
268          },
269          "custom": {
270            "axisBorderShow": false,
271            "axisCenteredZero": false,
272            "axisColorMode": "text",
273            "axisLabel": "",
274            "axisPlacement": "auto",
275            "barAlignment": 0,
276            "drawStyle": "line",
277            "fillOpacity": 10,
278            "gradientMode": "none",
279            "hideFrom": {
280              "legend": false,
281              "tooltip": false,
282              "viz": false
283            },
284            "insertNulls": false,
285            "lineInterpolation": "linear",
286            "lineWidth": 2,
287            "pointSize": 5,
288            "scaleDistribution": {
289              "type": "linear"
290            },
291            "showPoints": "never",
292            "spanNulls": true,
293            "stacking": {
294              "group": "A",
295              "mode": "none"
296            },
297            "thresholdsStyle": {
298              "mode": "off"
299            }
300          },
301          "mappings": [],
302          "min": 0,
303          "thresholds": {
304            "mode": "absolute",
305            "steps": [
306              {
307                "color": "green"
308              },
309              {
310                "color": "red",
311                "value": 80
312              }
313            ]
314          },
315          "unit": "short"
316        },
317        "overrides": []
318      },
319      "gridPos": {
320        "h": 7,
321        "w": 8,
322        "x": 16,
323        "y": 0
324      },
325      "id": 1,
326      "options": {
327        "legend": {
328          "calcs": [],
329          "displayMode": "list",
330          "placement": "bottom",
331          "showLegend": false
332        },
333        "tooltip": {
334          "maxHeight": 600,
335          "mode": "multi",
336          "sort": "none"
337        }
338      },
339      "targets": [
340        {
341          "datasource": {
342            "type": "prometheus",
343            "uid": "ddn8x3poqpo1sc"
344          },
345          "editorMode": "code",
346          "expr": "irate(redis_keyspace_hits_total{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}[5m])",
347          "format": "time_series",
348          "hide": false,
349          "interval": "",
350          "intervalFactor": 2,
351          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}-hits",
352          "metric": "",
353          "range": true,
354          "refId": "A",
355          "step": 240,
356          "target": ""
357        },
358        {
359          "datasource": {
360            "type": "prometheus",
361            "uid": "ddn8x3poqpo1sc"
362          },
363          "editorMode": "code",
364          "expr": "irate(redis_keyspace_misses_total{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}[5m])",
365          "format": "time_series",
366          "hide": false,
367          "interval": "",
368          "intervalFactor": 2,
369          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}-misses",
370          "metric": "",
371          "range": true,
372          "refId": "B",
373          "step": 240,
374          "target": ""
375        }
376      ],
377      "title": "Hits / Misses per Sec",
378      "type": "timeseries"
379    },
380    {
381      "datasource": {
382        "type": "prometheus",
383        "uid": "ddn8x3poqpo1sc"
384      },
385      "fieldConfig": {
386        "defaults": {
387          "color": {
388            "mode": "palette-classic"
389          },
390          "custom": {
391            "axisBorderShow": false,
392            "axisCenteredZero": false,
393            "axisColorMode": "text",
394            "axisLabel": "",
395            "axisPlacement": "auto",
396            "barAlignment": 0,
397            "drawStyle": "line",
398            "fillOpacity": 10,
399            "gradientMode": "none",
400            "hideFrom": {
401              "legend": false,
402              "tooltip": false,
403              "viz": false
404            },
405            "insertNulls": false,
406            "lineInterpolation": "linear",
407            "lineWidth": 2,
408            "pointSize": 5,
409            "scaleDistribution": {
410              "type": "linear"
411            },
412            "showPoints": "never",
413            "spanNulls": true,
414            "stacking": {
415              "group": "A",
416              "mode": "none"
417            },
418            "thresholdsStyle": {
419              "mode": "off"
420            }
421          },
422          "mappings": [],
423          "thresholds": {
424            "mode": "absolute",
425            "steps": [
426              {
427                "color": "green"
428              },
429              {
430                "color": "red",
431                "value": 80
432              }
433            ]
434          },
435          "unit": "short"
436        },
437        "overrides": []
438      },
439      "gridPos": {
440        "h": 7,
441        "w": 12,
442        "x": 0,
443        "y": 7
444      },
445      "id": 2,
446      "options": {
447        "legend": {
448          "calcs": [],
449          "displayMode": "list",
450          "placement": "bottom",
451          "showLegend": false
452        },
453        "tooltip": {
454          "maxHeight": 600,
455          "mode": "multi",
456          "sort": "none"
457        }
458      },
459      "targets": [
460        {
461          "datasource": {
462            "type": "prometheus",
463            "uid": "ddn8x3poqpo1sc"
464          },
465          "editorMode": "code",
466          "expr": "rate(redis_commands_processed_total{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}[1m])",
467          "format": "time_series",
468          "interval": "",
469          "intervalFactor": 2,
470          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}",
471          "metric": "A",
472          "range": true,
473          "refId": "A",
474          "step": 240,
475          "target": ""
476        }
477      ],
478      "title": "Commands Executed / sec",
479      "type": "timeseries"
480    },
481    {
482      "datasource": {
483        "type": "prometheus",
484        "uid": "ddn8x3poqpo1sc"
485      },
486      "fieldConfig": {
487        "defaults": {
488          "color": {
489            "mode": "palette-classic"
490          },
491          "custom": {
492            "axisBorderShow": false,
493            "axisCenteredZero": false,
494            "axisColorMode": "text",
495            "axisLabel": "",
496            "axisPlacement": "auto",
497            "barAlignment": 0,
498            "drawStyle": "line",
499            "fillOpacity": 80,
500            "gradientMode": "none",
501            "hideFrom": {
502              "legend": false,
503              "tooltip": false,
504              "viz": false
505            },
506            "insertNulls": false,
507            "lineInterpolation": "linear",
508            "lineWidth": 1,
509            "pointSize": 5,
510            "scaleDistribution": {
511              "type": "linear"
512            },
513            "showPoints": "never",
514            "spanNulls": true,
515            "stacking": {
516              "group": "A",
517              "mode": "normal"
518            },
519            "thresholdsStyle": {
520              "mode": "off"
521            }
522          },
523          "mappings": [],
524          "thresholds": {
525            "mode": "absolute",
526            "steps": [
527              {
528                "color": "green"
529              },
530              {
531                "color": "red",
532                "value": 80
533              }
534            ]
535          },
536          "unit": "short"
537        },
538        "overrides": []
539      },
540      "gridPos": {
541        "h": 7,
542        "w": 12,
543        "x": 12,
544        "y": 7
545      },
546      "id": 14,
547      "options": {
548        "legend": {
549          "calcs": [],
550          "displayMode": "list",
551          "placement": "right",
552          "showLegend": true
553        },
554        "tooltip": {
555          "maxHeight": 600,
556          "mode": "multi",
557          "sort": "none"
558        }
559      },
560      "targets": [
561        {
562          "datasource": {
563            "type": "prometheus",
564            "uid": "ddn8x3poqpo1sc"
565          },
566          "editorMode": "code",
567          "expr": "topk(5, irate(redis_commands_total{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"} [1m]))",
568          "format": "time_series",
569          "interval": "",
570          "intervalFactor": 2,
571          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}-{{ cmd }}",
572          "metric": "redis_command_calls_total",
573          "range": true,
574          "refId": "A",
575          "step": 240
576        }
577      ],
578      "title": "Command Calls / sec",
579      "type": "timeseries"
580    },
581    {
582      "datasource": {
583        "type": "prometheus",
584        "uid": "ddn8x3poqpo1sc"
585      },
586      "fieldConfig": {
587        "defaults": {
588          "color": {
589            "mode": "palette-classic"
590          },
591          "custom": {
592            "axisBorderShow": false,
593            "axisCenteredZero": false,
594            "axisColorMode": "text",
595            "axisLabel": "",
596            "axisPlacement": "auto",
597            "barAlignment": 0,
598            "drawStyle": "line",
599            "fillOpacity": 10,
600            "gradientMode": "none",
601            "hideFrom": {
602              "legend": false,
603              "tooltip": false,
604              "viz": false
605            },
606            "insertNulls": false,
607            "lineInterpolation": "linear",
608            "lineWidth": 1,
609            "pointSize": 5,
610            "scaleDistribution": {
611              "type": "linear"
612            },
613            "showPoints": "never",
614            "spanNulls": false,
615            "stacking": {
616              "group": "A",
617              "mode": "none"
618            },
619            "thresholdsStyle": {
620              "mode": "off"
621            }
622          },
623          "mappings": [],
624          "thresholds": {
625            "mode": "absolute",
626            "steps": [
627              {
628                "color": "green"
629              },
630              {
631                "color": "red",
632                "value": 80
633              }
634            ]
635          },
636          "unit": "short"
637        },
638        "overrides": []
639      },
640      "gridPos": {
641        "h": 7,
642        "w": 12,
643        "x": 0,
644        "y": 14
645      },
646      "id": 16,
647      "options": {
648        "legend": {
649          "calcs": [],
650          "displayMode": "list",
651          "placement": "right",
652          "showLegend": true
653        },
654        "tooltip": {
655          "maxHeight": 600,
656          "mode": "multi",
657          "sort": "none"
658        }
659      },
660      "targets": [
661        {
662          "datasource": {
663            "type": "prometheus",
664            "uid": "ddn8x3poqpo1sc"
665          },
666          "editorMode": "code",
667          "expr": "redis_connected_clients{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}",
668          "format": "time_series",
669          "intervalFactor": 1,
670          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}",
671          "range": true,
672          "refId": "A"
673        }
674      ],
675      "title": "Redis connected clients",
676      "type": "timeseries"
677    },
678    {
679      "datasource": {
680        "type": "prometheus",
681        "uid": "ddn8x3poqpo1sc"
682      },
683      "fieldConfig": {
684        "defaults": {
685          "color": {
686            "mode": "palette-classic"
687          },
688          "custom": {
689            "axisBorderShow": false,
690            "axisCenteredZero": false,
691            "axisColorMode": "text",
692            "axisLabel": "",
693            "axisPlacement": "auto",
694            "barAlignment": 0,
695            "drawStyle": "line",
696            "fillOpacity": 70,
697            "gradientMode": "none",
698            "hideFrom": {
699              "legend": false,
700              "tooltip": false,
701              "viz": false
702            },
703            "insertNulls": false,
704            "lineInterpolation": "linear",
705            "lineWidth": 2,
706            "pointSize": 5,
707            "scaleDistribution": {
708              "type": "linear"
709            },
710            "showPoints": "never",
711            "spanNulls": true,
712            "stacking": {
713              "group": "A",
714              "mode": "normal"
715            },
716            "thresholdsStyle": {
717              "mode": "off"
718            }
719          },
720          "mappings": [],
721          "thresholds": {
722            "mode": "absolute",
723            "steps": [
724              {
725                "color": "green"
726              },
727              {
728                "color": "red",
729                "value": 80
730              }
731            ]
732          },
733          "unit": "none"
734        },
735        "overrides": []
736      },
737      "gridPos": {
738        "h": 7,
739        "w": 12,
740        "x": 12,
741        "y": 14
742      },
743      "id": 5,
744      "options": {
745        "legend": {
746          "calcs": [],
747          "displayMode": "table",
748          "placement": "bottom",
749          "showLegend": false
750        },
751        "tooltip": {
752          "maxHeight": 600,
753          "mode": "multi",
754          "sort": "none"
755        }
756      },
757      "targets": [
758        {
759          "datasource": {
760            "type": "prometheus",
761            "uid": "ddn8x3poqpo1sc"
762          },
763          "editorMode": "code",
764          "expr": "sum(redis_db_keys{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}) by (cache_name,byoc_cache_shard)",
765          "format": "time_series",
766          "interval": "",
767          "intervalFactor": 2,
768          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}",
769          "range": true,
770          "refId": "A",
771          "step": 240,
772          "target": ""
773        }
774      ],
775      "title": "DB Keys",
776      "type": "timeseries"
777    },
778    {
779      "datasource": {
780        "type": "prometheus",
781        "uid": "ddn8x3poqpo1sc"
782      },
783      "fieldConfig": {
784        "defaults": {
785          "color": {
786            "mode": "palette-classic"
787          },
788          "custom": {
789            "axisBorderShow": false,
790            "axisCenteredZero": false,
791            "axisColorMode": "text",
792            "axisLabel": "",
793            "axisPlacement": "auto",
794            "barAlignment": 0,
795            "drawStyle": "line",
796            "fillOpacity": 10,
797            "gradientMode": "none",
798            "hideFrom": {
799              "legend": false,
800              "tooltip": false,
801              "viz": false
802            },
803            "insertNulls": false,
804            "lineInterpolation": "linear",
805            "lineWidth": 2,
806            "pointSize": 5,
807            "scaleDistribution": {
808              "type": "linear"
809            },
810            "showPoints": "never",
811            "spanNulls": true,
812            "stacking": {
813              "group": "A",
814              "mode": "none"
815            },
816            "thresholdsStyle": {
817              "mode": "off"
818            }
819          },
820          "mappings": [],
821          "thresholds": {
822            "mode": "absolute",
823            "steps": [
824              {
825                "color": "green"
826              },
827              {
828                "color": "red",
829                "value": 80
830              }
831            ]
832          },
833          "unit": "short"
834        },
835        "overrides": [
836          {
837            "matcher": {
838              "id": "byName",
839              "options": "evicts"
840            },
841            "properties": [
842              {
843                "id": "color",
844                "value": {
845                  "fixedColor": "#890F02",
846                  "mode": "fixed"
847                }
848              }
849            ]
850          },
851          {
852            "matcher": {
853              "id": "byName",
854              "options": "memcached_items_evicted_total{instance=\"172.17.0.1:9150\",job=\"prometheus\"}"
855            },
856            "properties": [
857              {
858                "id": "color",
859                "value": {
860                  "fixedColor": "#890F02",
861                  "mode": "fixed"
862                }
863              }
864            ]
865          },
866          {
867            "matcher": {
868              "id": "byName",
869              "options": "reclaims"
870            },
871            "properties": [
872              {
873                "id": "color",
874                "value": {
875                  "fixedColor": "#3F6833",
876                  "mode": "fixed"
877                }
878              }
879            ]
880          },
881          {
882            "matcher": {
883              "id": "byName",
884              "options": "reclaims"
885            },
886            "properties": [
887              {
888                "id": "custom.axisPlacement",
889                "value": "right"
890              }
891            ]
892          }
893        ]
894      },
895      "gridPos": {
896        "h": 7,
897        "w": 12,
898        "x": 0,
899        "y": 21
900      },
901      "id": 8,
902      "options": {
903        "legend": {
904          "calcs": [],
905          "displayMode": "list",
906          "placement": "right",
907          "showLegend": true
908        },
909        "tooltip": {
910          "maxHeight": 600,
911          "mode": "multi",
912          "sort": "none"
913        }
914      },
915      "targets": [
916        {
917          "datasource": {
918            "type": "prometheus",
919            "uid": "ddn8x3poqpo1sc"
920          },
921          "editorMode": "code",
922          "expr": "sum(rate(redis_expired_keys_total{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}[5m])) by (cache_name,byoc_cache_shard)",
923          "format": "time_series",
924          "hide": false,
925          "interval": "",
926          "intervalFactor": 2,
927          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}} - expired",
928          "metric": "",
929          "range": true,
930          "refId": "A",
931          "step": 240,
932          "target": ""
933        },
934        {
935          "datasource": {
936            "type": "prometheus",
937            "uid": "ddn8x3poqpo1sc"
938          },
939          "editorMode": "code",
940          "expr": "sum(rate(redis_evicted_keys_total{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}[5m])) by (cache_name,byoc_cache_shard)",
941          "format": "time_series",
942          "interval": "",
943          "intervalFactor": 2,
944          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}} - evicted",
945          "range": true,
946          "refId": "B",
947          "step": 240
948        }
949      ],
950      "title": "Expired / Evicted",
951      "type": "timeseries"
952    },
953    {
954      "datasource": {
955        "type": "prometheus",
956        "uid": "ddn8x3poqpo1sc"
957      },
958      "fieldConfig": {
959        "defaults": {
960          "color": {
961            "mode": "palette-classic"
962          },
963          "custom": {
964            "axisBorderShow": false,
965            "axisCenteredZero": false,
966            "axisColorMode": "text",
967            "axisLabel": "",
968            "axisPlacement": "auto",
969            "barAlignment": 0,
970            "drawStyle": "line",
971            "fillOpacity": 70,
972            "gradientMode": "none",
973            "hideFrom": {
974              "legend": false,
975              "tooltip": false,
976              "viz": false
977            },
978            "insertNulls": false,
979            "lineInterpolation": "linear",
980            "lineWidth": 2,
981            "pointSize": 5,
982            "scaleDistribution": {
983              "type": "linear"
984            },
985            "showPoints": "never",
986            "spanNulls": true,
987            "stacking": {
988              "group": "A",
989              "mode": "normal"
990            },
991            "thresholdsStyle": {
992              "mode": "off"
993            }
994          },
995          "mappings": [],
996          "thresholds": {
997            "mode": "absolute",
998            "steps": [
999              {
1000                "color": "green"
1001              },
1002              {
1003                "color": "red",
1004                "value": 80
1005              }
1006            ]
1007          },
1008          "unit": "short"
1009        },
1010        "overrides": []
1011      },
1012      "gridPos": {
1013        "h": 7,
1014        "w": 12,
1015        "x": 12,
1016        "y": 21
1017      },
1018      "id": 13,
1019      "options": {
1020        "legend": {
1021          "calcs": [],
1022          "displayMode": "list",
1023          "placement": "right",
1024          "showLegend": true
1025        },
1026        "tooltip": {
1027          "maxHeight": 600,
1028          "mode": "multi",
1029          "sort": "none"
1030        }
1031      },
1032      "targets": [
1033        {
1034          "datasource": {
1035            "type": "prometheus",
1036            "uid": "ddn8x3poqpo1sc"
1037          },
1038          "editorMode": "code",
1039          "expr": "sum (redis_db_keys{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}) by(cache_name,byoc_cache_shard) - sum (redis_db_keys_expiring{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}) by(cache_name,byoc_cache_shard)",
1040          "format": "time_series",
1041          "interval": "",
1042          "intervalFactor": 2,
1043          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}} - not expiring",
1044          "range": true,
1045          "refId": "A",
1046          "step": 240,
1047          "target": ""
1048        },
1049        {
1050          "datasource": {
1051            "type": "prometheus",
1052            "uid": "ddn8x3poqpo1sc"
1053          },
1054          "editorMode": "code",
1055          "expr": "sum (redis_db_keys_expiring{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}) by(cache_name,byoc_cache_shard)",
1056          "format": "time_series",
1057          "interval": "",
1058          "intervalFactor": 2,
1059          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}} - expiring",
1060          "metric": "",
1061          "range": true,
1062          "refId": "B",
1063          "step": 240
1064        }
1065      ],
1066      "title": "Expiring vs Not-Expiring Keys",
1067      "type": "timeseries"
1068    },
1069    {
1070      "datasource": {
1071        "type": "prometheus",
1072        "uid": "ddn8x3poqpo1sc"
1073      },
1074      "fieldConfig": {
1075        "defaults": {
1076          "color": {
1077            "mode": "palette-classic"
1078          },
1079          "custom": {
1080            "axisBorderShow": false,
1081            "axisCenteredZero": false,
1082            "axisColorMode": "text",
1083            "axisLabel": "",
1084            "axisPlacement": "auto",
1085            "barAlignment": 0,
1086            "drawStyle": "line",
1087            "fillOpacity": 10,
1088            "gradientMode": "none",
1089            "hideFrom": {
1090              "legend": false,
1091              "tooltip": false,
1092              "viz": false
1093            },
1094            "insertNulls": false,
1095            "lineInterpolation": "linear",
1096            "lineWidth": 2,
1097            "pointSize": 5,
1098            "scaleDistribution": {
1099              "type": "linear"
1100            },
1101            "showPoints": "never",
1102            "spanNulls": true,
1103            "stacking": {
1104              "group": "A",
1105              "mode": "none"
1106            },
1107            "thresholdsStyle": {
1108              "mode": "off"
1109            }
1110          },
1111          "mappings": [],
1112          "thresholds": {
1113            "mode": "absolute",
1114            "steps": [
1115              {
1116                "color": "green"
1117              },
1118              {
1119                "color": "red",
1120                "value": 80
1121              }
1122            ]
1123          },
1124          "unit": "bytes"
1125        },
1126        "overrides": []
1127      },
1128      "gridPos": {
1129        "h": 6,
1130        "w": 24,
1131        "x": 0,
1132        "y": 28
1133      },
1134      "id": 10,
1135      "options": {
1136        "legend": {
1137          "calcs": [],
1138          "displayMode": "list",
1139          "placement": "right",
1140          "showLegend": true
1141        },
1142        "tooltip": {
1143          "maxHeight": 600,
1144          "mode": "multi",
1145          "sort": "none"
1146        }
1147      },
1148      "targets": [
1149        {
1150          "datasource": {
1151            "type": "prometheus",
1152            "uid": "ddn8x3poqpo1sc"
1153          },
1154          "editorMode": "code",
1155          "expr": "rate(redis_net_input_bytes_total{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}[5m])",
1156          "format": "time_series",
1157          "intervalFactor": 2,
1158          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}-input",
1159          "range": true,
1160          "refId": "A",
1161          "step": 240
1162        },
1163        {
1164          "datasource": {
1165            "type": "prometheus",
1166            "uid": "ddn8x3poqpo1sc"
1167          },
1168          "editorMode": "code",
1169          "expr": "rate(redis_net_output_bytes_total{busi_group_id=~\"$busi_group_id\",cache_name=~\"$CacheCluster\"}[5m])",
1170          "format": "time_series",
1171          "interval": "",
1172          "intervalFactor": 2,
1173          "legendFormat": "{{cache_name}}-{{byoc_cache_shard}}-output",
1174          "range": true,
1175          "refId": "B",
1176          "step": 240
1177        }
1178      ],
1179      "title": "Network I/O",
1180      "type": "timeseries"
1181    }
1182  ],
1183  "refresh": "30s",
1184  "schemaVersion": 39,
1185  "tags": [],
1186  "templating": {
1187    "list": [
1188      {
1189        "current": {
1190          "selected": false,
1191          "text": "ap-southeast-1-vpc123",
1192          "value": "ddn8x3poqpo1sc"
1193        },
1194        "hide": 0,
1195        "includeAll": false,
1196        "label": "Prometheus",
1197        "multi": false,
1198        "name": "DS_PROMETHEUS",
1199        "options": [],
1200        "query": "prometheus",
1201        "queryValue": "",
1202        "refresh": 1,
1203        "regex": "",
1204        "skipUrlSync": false,
1205        "type": "datasource"
1206      },
1207      {
1208        "current": {
1209          "selected": false,
1210          "text": "ns-org-1",
1211          "value": "ns-org-1"
1212        },
1213        "datasource": {
1214          "uid": "$DS_PROMETHEUS"
1215        },
1216        "definition": "label_values(redis_up, namespace)",
1217        "hide": 0,
1218        "includeAll": false,
1219        "label": "Namespace",
1220        "multi": false,
1221        "name": "namespace",
1222        "options": [],
1223        "query": "label_values(redis_up, namespace)",
1224        "refresh": 2,
1225        "regex": "",
1226        "skipUrlSync": false,
1227        "sort": 0,
1228        "tagValuesQuery": "",
1229        "tagsQuery": "",
1230        "type": "query",
1231        "useTags": false
1232      },
1233      {
1234        "current": {
1235          "selected": false,
1236          "text": "default",
1237          "value": "default"
1238        },
1239        "datasource": {
1240          "uid": "$DS_PROMETHEUS"
1241        },
1242        "definition": "label_values(redis_up{namespace=\"$namespace\"},busi_group_name)",
1243        "hide": 0,
1244        "includeAll": false,
1245        "label": "project",
1246        "multi": false,
1247        "name": "project",
1248        "options": [],
1249        "query": {
1250          "qryType": 1,
1251          "query": "label_values(redis_up{namespace=\"$namespace\"},busi_group_name)",
1252          "refId": "PrometheusVariableQueryEditor-VariableQuery"
1253        },
1254        "refresh": 2,
1255        "regex": "",
1256        "skipUrlSync": false,
1257        "sort": 1,
1258        "tagValuesQuery": "",
1259        "tagsQuery": "",
1260        "type": "query",
1261        "useTags": false
1262      },
1263      {
1264        "allValue": "",
1265        "current": {
1266          "selected": false,
1267          "text": "All",
1268          "value": "$__all"
1269        },
1270        "datasource": {
1271          "uid": "$DS_PROMETHEUS"
1272        },
1273        "definition": "label_values(redis_up{namespace=\"$namespace\", busi_group_name=\"$project\"},busi_group_id)",
1274        "hide": 2,
1275        "includeAll": true,
1276        "label": "busi_group_id",
1277        "multi": false,
1278        "name": "busi_group_id",
1279        "options": [],
1280        "query": {
1281          "qryType": 1,
1282          "query": "label_values(redis_up{namespace=\"$namespace\", busi_group_name=\"$project\"},busi_group_id)",
1283          "refId": "PrometheusVariableQueryEditor-VariableQuery"
1284        },
1285        "refresh": 2,
1286        "regex": "",
1287        "skipUrlSync": false,
1288        "sort": 1,
1289        "tagValuesQuery": "",
1290        "tagsQuery": "",
1291        "type": "query",
1292        "useTags": false
1293      },
1294      {
1295        "current": {
1296          "selected": false,
1297          "text": "All",
1298          "value": "$__all"
1299        },
1300        "datasource": {
1301          "uid": "$DS_PROMETHEUS"
1302        },
1303        "definition": "label_values(redis_up{namespace=\"$namespace\", busi_group_id=~\"$busi_group_id\"},cache_name)",
1304        "hide": 0,
1305        "includeAll": true,
1306        "multi": false,
1307        "name": "CacheCluster",
1308        "options": [],
1309        "query": {
1310          "qryType": 1,
1311          "query": "label_values(redis_up{namespace=\"$namespace\", busi_group_id=~\"$busi_group_id\"},cache_name)",
1312          "refId": "PrometheusVariableQueryEditor-VariableQuery"
1313        },
1314        "refresh": 2,
1315        "regex": "",
1316        "skipUrlSync": false,
1317        "sort": 1,
1318        "tagValuesQuery": "",
1319        "tagsQuery": "",
1320        "type": "query",
1321        "useTags": false
1322      }
1323    ]
1324  },
1325  "time": {
1326    "from": "now-15m",
1327    "to": "now"
1328  },
1329  "timeRangeUpdatedDuringEditOrView": false,
1330  "timepicker": {
1331    "refresh_intervals": [
1332      "5s",
1333      "10s",
1334      "30s",
1335      "1m",
1336      "5m",
1337      "15m",
1338      "30m",
1339      "1h",
1340      "2h",
1341      "1d"
1342    ],
1343    "time_options": [
1344      "5m",
1345      "15m",
1346      "1h",
1347      "6h",
1348      "12h",
1349      "24h",
1350      "2d",
1351      "7d",
1352      "30d"
1353    ]
1354  },
1355  "timezone": "browser",
1356  "title": "Dashboard for MontCache",
1357  "uid": "bdn9c9je1cache",
1358  "version": 3,
1359  "weekStart": ""
1360}

Key Features

  • Monitor all Montplex Cache clusters' metrics based on projects.
  • View metrics for all shards within a cluster based on the cluster.

Import Steps

  1. Visit your Grafana address and open the Grafana control panel.
  2. In the navigation pane, select the Dashboards tab, click the New dropdown button in the top right corner, and choose import to go to the Import dashboard page.
  3. If importing from a JSON file, select Upload dashboard JSON file and upload the JSON file you downloaded.

If you have directly copied the JSON code, paste it into the JSON text box.

  1. After selecting the JSON file, set the dashboard's Name, Folder, and UID, then choose Import.

  1. The import of the custom dashboard is now complete.