当前位置:   article > 正文

grafana模板_redis集群监控grafana模板分享(数据源promethues)

grafana 8.5.3模板

在grafana官方没有找到好用的redis集群监控,自建一个,欢迎使用。

效果图:

d21be32790290895b29e20b63f0d4dba.png

43d09ec4564632db754cc1f308d6fb83.png

66ca490dea8cc5fdc4186d75123eda5d.png

b7cbdc35f27246c2a7bac86bd182b90e.png

说明:

1、支持查看整体和每个集群的慢日志、QPS、内存使用率、客户端连接数、不通操作QPS、集群整体健康状况、网络IO、总key,未设置失效时间key、内存碎片、缓存命中/未命中数等。

2、promethues里面每一个job_name代表一个redis culuster集群

3、使用方法:先在grafana里配置promethues源,然后import如下json model

JSON Model 如下

  1. {
  2. "annotations": {
  3. "list": [ {
  4. "builtIn": 1, "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true, "gnetId": null, "graphTooltip": 0, "id": 12, "iteration": 1597660467403, "links": [], "panels": [ {
  5. "cacheTimeout": null, "colorBackground": false, "colorValue": true, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": null, "description": "redis集群节点数", "fieldConfig": {
  6. "defaults": {
  7. "custom": {} }, "overrides": [] }, "format": "none", "gauge": {
  8. "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": {
  9. "h": 2, "w": 2, "x": 0, "y": 0 }, "id": 36, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ {
  10. "name": "value to text", "value": 1 }, {
  11. "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ {
  12. "from": "null", "text": "N/A", "to": "null" } ], "sparkline": {
  13. "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false, "ymax": null, "ymin": null }, "tableColumn": "", "targets": [ {
  14. "expr": "count(redis_instance_info{job=~\"$rediscluster\"})", "interval": "", "legendFormat": "", "refId": "A" } ], "thresholds": "", "timeFrom": null, "timeShift": null, "title": "redis集群节点数", "type": "singlestat", "valueFontSize": "100%", "valueMaps": [ {
  15. "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, {
  16. "cacheTimeout": null, "colorBackground": false, "colorValue": true, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": null, "description": "集群活跃节点数量", "fieldConfig": {
  17. "defaults": {
  18. "custom": {} }, "overrides": [] }, "format": "none", "gauge": {
  19. "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": {
  20. "h": 2, "w": 2, "x": 2, "y": 0 }, "id": 37, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ {
  21. "name": "value to text", "value": 1 }, {
  22. "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ {
  23. "from": "null", "text": "N/A", "to": "null" } ], "sparkline": {
  24. "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false, "ymax": null, "ymin": null }, "tableColumn": "", "targets": [ {
  25. "expr": "count(redis_up{job=~\"$rediscluster\"}>0)", "interval": "", "legendFormat": "", "refId": "A" } ], "thresholds": "", "timeFrom": null, "timeShift": null, "title": "集群活跃节点数", "type": "singlestat", "valueFontSize": "100%", "valueMaps": [ {
  26. "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, {
  27. "cacheTimeout": null, "colorBackground": false, "colorValue": true, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": null, "description": "从节点数量", "fieldConfig": {
  28. "defaults": {
  29. "custom": {} }, "overrides": [] }, "format": "none", "gauge": {
  30. "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": {
  31. "h": 2, "w": 2, "x": 4, "y": 0 }, "id": 12, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ {
  32. "name": "value to text", "value": 1 }, {
  33. "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ {
  34. "from": "null", "text": "N/A", "to": "null" } ], "sparkline": {
  35. "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false, "ymax": null, "ymin": null }, "tableColumn": "", "targets": [ {
  36. "expr": "count(redis_instance_info{job=~\"$rediscluster\", role=\"slave\"})", "interval": "", "legendFormat": "", "refId": "A" } ], "thresholds": "", "timeFrom": null, "timeShift": null, "title": "从节点个数", "type": "singlestat", "valueFontSize": "100%", "valueMaps": [ {
  37. "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, {
  38. "cacheTimeout": null, "colorBackground": false, "colorPrefix": false, "colorValue": true, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": null, "description": "主节点数量", "fieldConfig": {
  39. "defaults": {
  40. "custom": {} }, "overrides": [] }, "format": "none", "gauge": {
  41. "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": {
  42. "h": 2, "w": 2, "x": 6, "y": 0 }, "id": 10, "interval": null, "links": [], "mappingType": 1, "mappingTypes": [ {
  43. "name": "value to text", "value": 1 }, {
  44. "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "nullText": null, "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ {
  45. "from": "null", "text": "N/A", "to": "null" } ], "sparkline": {
  46. "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false, "ymax": null, "ymin": null }, "tableColumn": "", "targets": [ {
  47. "expr": "count(redis_instance_info{job=~\"$rediscluster\", role=\"master\"})", "interval": "", "legendFormat": "", "refId": "A" } ], "thresholds": "", "timeFrom": null, "timeShift": null, "title": "主节点个数", "type": "singlestat", "valueFontSize": "100%", "valueMaps": [
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/307445
推荐阅读
相关标签
  

闽ICP备14008679号