Grafana----Redis监控看板

一、 看板展示

 

二、 json记录

复制代码
{"editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": 26,
  "iteration": 1659086173878,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 8,
      "panels": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "s"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 0,
            "y": 1
          },
          "id": 10,
          "options": {
            "colorMode": "background",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "8.4.5",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "redis_uptime{application=\"$application\",ident=\"$ident\"}",
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "运行时间",
          "type": "stat"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 6,
            "y": 1
          },
          "id": 11,
          "options": {
            "colorMode": "background",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "8.4.5",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "redis_clients{application=\"$application\",ident=\"$ident\"}",
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "客户端",
          "type": "stat"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "bytes"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 12,
            "y": 1
          },
          "id": 13,
          "options": {
            "colorMode": "background",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "8.4.5",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "redis_used_memory{application=\"$application\",ident=\"$ident\"}",
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "内存使用",
          "type": "stat"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "thresholds"
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 18,
            "y": 1
          },
          "id": 12,
          "options": {
            "colorMode": "background",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "8.4.5",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "redis_maxmemory{application=\"$application\",ident=\"$ident\"}",
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "最大内存",
          "type": "stat"
        }
      ],
      "title": "概览",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "id": 6,
      "panels": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 8,
            "x": 0,
            "y": 2
          },
          "id": 15,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "rate(redis_total_commands_processed{application=\"$application\",ident=\"$ident\"}[5m])",
              "interval": "",
              "legendFormat": "commands",
              "refId": "A"
            }
          ],
          "title": "Commands Executed / sec",
          "type": "timeseries"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 8,
            "x": 8,
            "y": 2
          },
          "id": 16,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "rate(redis_keyspace_hits{application=\"$application\",ident=\"$ident\"}[5m])",
              "interval": "",
              "legendFormat": "hits",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "rate(redis_keyspace_misses{application=\"$application\",ident=\"$ident\"}[5m])",
              "hide": false,
              "interval": "",
              "legendFormat": "misses",
              "refId": "B"
            }
          ],
          "title": "Hits / Misses per Sec",
          "type": "timeseries"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 8,
            "x": 16,
            "y": 2
          },
          "id": 17,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "pluginVersion": "8.4.5",
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "topk(5, irate(redis_cmdstat_calls{application=\"$application\",ident=\"$ident\"}[1m]))",
              "instant": false,
              "interval": "",
              "legendFormat": "{{command}}",
              "refId": "A"
            }
          ],
          "title": "Commands Executed / sec",
          "type": "timeseries"
        }
      ],
      "title": "指令",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 2
      },
      "id": 4,
      "panels": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 8,
            "x": 0,
            "y": 3
          },
          "id": 19,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "sum(redis_keyspace_keys{application=\"$application\",ident=\"$ident\"}) by (database)",
              "interval": "",
              "legendFormat": "{{database}}",
              "refId": "A"
            }
          ],
          "title": "Total Items per DB",
          "type": "timeseries"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 8,
            "x": 8,
            "y": 3
          },
          "id": 20,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "sum(rate(redis_expired_keys{application=\"$application\",ident=\"$ident\"}[5m]))",
              "interval": "",
              "legendFormat": "expired",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "sum(rate(redis_evicted_keys{application=\"$application\",ident=\"$ident\"}[5m]))",
              "hide": false,
              "interval": "",
              "legendFormat": "evicted",
              "refId": "B"
            }
          ],
          "title": "Expired / Evicted",
          "type": "timeseries"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              }
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 8,
            "x": 16,
            "y": 3
          },
          "id": 21,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "sum(redis_keyspace_keys{application=\"$application\",ident=\"$ident\"}) - sum(redis_keyspace_expires{application=\"$application\",ident=\"$ident\"})",
              "interval": "",
              "legendFormat": "not expiring",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "sum(redis_keyspace_expires{application=\"$application\",ident=\"$ident\"})",
              "hide": false,
              "interval": "",
              "legendFormat": "expiring",
              "refId": "B"
            }
          ],
          "title": "Expiring vs Not-Expiring Keys",
          "type": "timeseries"
        }
      ],
      "title": "",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 3
      },
      "id": 2,
      "panels": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "7pfyIeX7k"
          },
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 0,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineInterpolation": "linear",
                "lineWidth": 1,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "auto",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "bytes"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 24,
            "x": 0,
            "y": 4
          },
          "id": 23,
          "options": {
            "legend": {
              "calcs": [],
              "displayMode": "list",
              "placement": "bottom"
            },
            "tooltip": {
              "mode": "single",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "sum(rate(redis_total_net_input_bytes{application=\"$application\",ident=\"$ident\"}[5m]))",
              "interval": "",
              "legendFormat": "in",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "7pfyIeX7k"
              },
              "exemplar": true,
              "expr": "sum(rate(redis_total_net_output_bytes{application=\"$application\",ident=\"$ident\"}[5m]))",
              "hide": false,
              "interval": "",
              "legendFormat": "out",
              "refId": "B"
            }
          ],
          "title": "Network I/O",
          "type": "timeseries"
        }
      ],
      "title": "网络",
      "type": "row"
    }
  ],
  "schemaVersion": 35,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "fxcrm",
          "value": "fxcrm"
        },
        "datasource": {
          "type": "prometheus",
          "uid": "7pfyIeX7k"
        },
        "definition": "system_uptime",
        "hide": 0,
        "includeAll": false,
        "label": "Application",
        "multi": false,
        "name": "application",
        "options": [],
        "query": {
          "query": "system_uptime",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": ".*application=\"(.*?)\".*",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {
          "selected": false,
          "text": "fxcrm-afg",
          "value": "fxcrm-afg"
        },
        "datasource": {
          "type": "prometheus",
          "uid": "7pfyIeX7k"
        },
        "definition": "system_uptime",
        "hide": 0,
        "includeAll": false,
        "label": "Ident",
        "multi": false,
        "name": "ident",
        "options": [],
        "query": {
          "query": "system_uptime",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": ".*ident=\"(.*?)\".*",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Redis",
  "uid": "vrH_yGkVz",
  "version": 8,
  "weekStart": ""
}
复制代码

 

posted @   ヾ(o◕∀◕)ノヾ  阅读(587)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
点击右上角即可分享
微信分享提示