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": "" }
本文来自博客园,作者:ヾ(o◕∀◕)ノヾ,转载请注明原文链接:https://www.cnblogs.com/Jupiter-blog/p/16532970.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本