首页 > 数据库 >redis基础系列~监控模板

redis基础系列~监控模板

时间:2022-09-21 16:23:08浏览次数:70  
标签:false name service type redis 监控 true 模板

{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Redis Dashboard",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 763,
  "graphTooltip": 1,
  "id": 70,
  "iteration": 1663747204528,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "1": {
                  "index": 0,
                  "text": "Health"
                }
              },
              "type": "value"
            }
          ],
          "max": 2,
          "min": -4,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 30
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 0,
        "y": 0
      },
      "id": 26,
      "maxDataPoints": 7,
      "maxPerRow": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^redis_version$/",
          "limit": 12,
          "values": false
        },
        "text": {},
        "textMode": "value"
      },
      "pluginVersion": "8.3.10",
      "repeatDirection": "h",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PA58DA793C7250F1B"
          },
          "exemplar": false,
          "expr": "redis_instance_info{service_name=~\"$service_name\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "intervalFactor": 5,
          "legendFormat": "{{redis_instance_info}}",
          "refId": "A"
        }
      ],
      "title": "版本信息",
      "transformations": [],
      "type": "stat"
    },
    {
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "1": {
                  "index": 0,
                  "text": "Health"
                }
              },
              "type": "value"
            }
          ],
          "max": 2,
          "min": -4,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 30
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 6,
        "y": 0
      },
      "id": 24,
      "maxDataPoints": 7,
      "maxPerRow": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^role$/",
          "limit": 12,
          "values": false
        },
        "text": {
          "titleSize": 1
        },
        "textMode": "value"
      },
      "pluginVersion": "8.3.10",
      "repeatDirection": "h",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PA58DA793C7250F1B"
          },
          "exemplar": false,
          "expr": "redis_instance_info{service_name=~\"$service_name\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "intervalFactor": 5,
          "legendFormat": "{{redis_instance_info}}",
          "refId": "A"
        }
      ],
      "title": "角色状态",
      "transformations": [],
      "type": "stat"
    },
    {
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "1": {
                  "index": 0,
                  "text": "Health"
                }
              },
              "type": "value"
            }
          ],
          "max": 2,
          "min": -4,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 30
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 5,
        "x": 12,
        "y": 0
      },
      "id": 25,
      "maxDataPoints": 7,
      "maxPerRow": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "limit": 12,
          "values": false
        },
        "text": {
          "titleSize": 1
        },
        "textMode": "value"
      },
      "pluginVersion": "8.3.10",
      "repeatDirection": "h",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PA58DA793C7250F1B"
          },
          "exemplar": false,
          "expr": "redis_cluster_state{service_name=~\"$service_name\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "intervalFactor": 5,
          "legendFormat": "{{redis_cluster_state}}",
          "refId": "A"
        }
      ],
      "title": "集群状态",
      "transformations": [],
      "type": "stat"
    },
    {
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "1": {
                  "index": 0,
                  "text": "Health"
                }
              },
              "type": "value"
            }
          ],
          "max": 2,
          "min": -4,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 30
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 5,
        "x": 17,
        "y": 0
      },
      "id": 27,
      "maxDataPoints": 7,
      "maxPerRow": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^cluster$/",
          "limit": 12,
          "values": false
        },
        "text": {
          "titleSize": 5
        },
        "textMode": "value"
      },
      "pluginVersion": "8.3.10",
      "repeatDirection": "h",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PA58DA793C7250F1B"
          },
          "exemplar": false,
          "expr": "redis_instance_info{service_name=~\"$service_name\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "intervalFactor": 5,
          "legendFormat": "{{redis_instance_info}}",
          "refId": "A"
        }
      ],
      "title": "集群环境",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "PA58DA793C7250F1B"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "rgb(31, 120, 193)",
            "mode": "fixed"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 3,
        "x": 0,
        "y": 7
      },
      "id": 9,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "none",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.3.10",
      "targets": [
        {
          "expr": "max(max_over_time(redis_uptime_in_seconds{service_name=~\"$service_name\"}[$__interval]))",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "metric": "",
          "refId": "A",
          "step": 1800
        }
      ],
      "title": "Max Uptime",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "PA58DA793C7250F1B"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "rgb(31, 120, 193)",
            "mode": "fixed"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 2,
        "x": 3,
        "y": 7
      },
      "hideTimeOverride": true,
      "id": 12,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "none",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.3.10",
      "targets": [
        {
          "expr": "sum(redis_connected_clients{service_name=~\"$service_name\"})",
          "format": "time_series",
          "intervalFactor": 2,
          "legendFormat": "",
          "metric": "",
          "refId": "A",
          "step": 2
        }
      ],
      "timeFrom": "1m",
      "title": "Clients",
      "type": "stat"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "rgba(50, 172, 45, 0.97)",
                "value": null
              },
              {
                "color": "rgba(237, 129, 40, 0.89)",
                "value": 80
              },
              {
                "color": "rgba(245, 54, 54, 0.9)",
                "value": 95
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 3,
        "x": 5,
        "y": 7
      },
      "hideTimeOverride": true,
      "id": 11,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "8.3.10",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PA58DA793C7250F1B"
          },
          "exemplar": true,
          "expr": "sum(100 * (redis_memory_used_bytes{service_name=~\"$service_name\"}  / redis_memory_max_bytes{service_name=~\"$service_name\"}))",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "",
          "metric": "",
          "refId": "A",
          "step": 2
        }
      ],
      "timeFrom": "1m",
      "title": "Memory Usage",
      "type": "gauge"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "editable": true,
      "error": false,
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 8,
      "fillGradient": 0,
      "grid": {},
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 8,
        "y": 7
      },
      "hiddenSeries": false,
      "id": 18,
      "isNew": true,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": false,
        "hideZero": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.3.10",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PA58DA793C7250F1B"
          },
          "exemplar": true,
          "expr": "sum(rate(redis_commands_total{service_name=~\"$service_name\"} [1m])) by (cmd)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "{{ cmd }}",
          "metric": "redis_command_calls_total",
          "refId": "A",
          "step": 240
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Total Commands / sec",
      "tooltip": {
        "msResolution": true,
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "logBase": 1,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "PA58DA793C7250F1B"
      },
      "decimals": 2,
      "editable": true,
      "error": false,
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "grid": {},
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 16,
        "y": 7
      },
      "hiddenSeries": false,
      "id": 1,
      "isNew": true,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": true,
      "pluginVersion": "8.3.10",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "irate(redis_keyspace_hits_total{service_name=~\"$service_name\"}[5m])",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "hits, {{ service_name }}",
          "metric": "",
          "refId": "A",
          "step": 240,
          "target": ""
        },
        {
          "expr": "irate(redis_keyspace_misses_total{service_name=~\"$service_name\"}[5m])",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "misses, {{ service_name }}",
          "metric": "",
          "refId": "B",
          "step": 240,
          "target": ""
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Hits / Misses per Sec",
      "tooltip": {
        "msResolution": false,
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "",
          "logBase": 1,
          "min": 0,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {
        "max": "#BF1B00"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "editable": true,
      "error": false,
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "grid": {},
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 14
      },
      "hiddenSeries": false,
      "id": 7,
      "isNew": true,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": false,
        "hideZero": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null as zero",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.3.10",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PA58DA793C7250F1B"
          },
          "exemplar": true,
          "expr": "redis_memory_used_bytes{service_name=~\"$service_name\"}",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "used, {{ service_name }}",
          "metric": "",
          "refId": "A",
          "step": 240,
          "target": ""
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PA58DA793C7250F1B"
          },
          "expr": "redis_memory_max_bytes{service_name=~\"$service_name\"}",
          "format": "time_series",
          "hide": false,
          "intervalFactor": 2,
          "legendFormat": "max, {{ service_name }}",
          "refId": "B",
          "step": 240
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Total Memory Usage",
      "tooltip": {
        "msResolution": false,
        "shared": true,
        "sort": 0,
        "value_type": "cumulative"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bytes",
          "logBase": 1,
          "min": 0,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "PA58DA793C7250F1B"
      },
      "editable": true,
      "error": false,
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "grid": {},
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 14
      },
      "hiddenSeries": false,
      "id": 10,
      "isNew": true,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.3.10",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(rate(redis_net_input_bytes_total{service_name=~\"$service_name\"}[5m]))",
          "format": "time_series",
          "intervalFactor": 2,
          "legendFormat": "{{ input }}",
          "refId": "A",
          "step": 240
        },
        {
          "expr": "sum(rate(redis_net_output_bytes_total{service_name=~\"$service_name\"}[5m]))",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "{{ output }}",
          "refId": "B",
          "step": 240
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Network I/O",
      "tooltip": {
        "msResolution": true,
        "shared": true,
        "sort": 0,
        "value_type": "cumulative"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bytes",
          "logBase": 1,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "PA58DA793C7250F1B"
      },
      "editable": true,
      "error": false,
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 7,
      "fillGradient": 0,
      "grid": {},
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 21
      },
      "hiddenSeries": false,
      "id": 5,
      "isNew": true,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": true,
        "hideEmpty": false,
        "hideZero": true,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.3.10",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum (redis_db_keys{service_name=~\"$service_name\"}) by (db, service_name)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "{{ db }}, {{ service_name }}",
          "refId": "A",
          "step": 240,
          "target": ""
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Total Items per DB",
      "tooltip": {
        "msResolution": false,
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "none",
          "logBase": 1,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "PA58DA793C7250F1B"
      },
      "editable": true,
      "error": false,
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 7,
      "fillGradient": 0,
      "grid": {},
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 21
      },
      "hiddenSeries": false,
      "id": 13,
      "isNew": true,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.3.10",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum (redis_db_keys{service_name=~\"$service_name\"}) by (service_name) - sum (redis_db_keys_expiring{service_name=~\"$service_name\"}) by (service_name)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "not expiring, {{ service_name }}",
          "refId": "A",
          "step": 240,
          "target": ""
        },
        {
          "expr": "sum (redis_db_keys_expiring{service_name=~\"$service_name\"}) by (service_name)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "expiring, {{ service_name }}",
          "metric": "",
          "refId": "B",
          "step": 240
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Expiring vs Not-Expiring Keys",
      "tooltip": {
        "msResolution": false,
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "logBase": 1,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {
        "evicts": "#890F02",
        "memcached_items_evicted_total{service_name=\"172.17.0.1:9150\",job=\"prometheus\"}": "#890F02",
        "reclaims": "#3F6833"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "PA58DA793C7250F1B"
      },
      "editable": true,
      "error": false,
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "grid": {},
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 28
      },
      "hiddenSeries": false,
      "id": 8,
      "isNew": true,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.3.10",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "reclaims",
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(rate(redis_expired_keys_total{service_name=~\"$service_name\"}[5m])) by (service_name)",
          "format": "time_series",
          "hide": false,
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "expired, {{ service_name }}",
          "metric": "",
          "refId": "A",
          "step": 240,
          "target": ""
        },
        {
          "expr": "sum(rate(redis_evicted_keys_total{service_name=~\"$service_name\"}[5m])) by (service_name)",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "evicted, {{ service_name }}",
          "refId": "B",
          "step": 240
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Expired/Evicted Keys",
      "tooltip": {
        "msResolution": false,
        "shared": true,
        "sort": 0,
        "value_type": "cumulative"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "logBase": 1,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "PA58DA793C7250F1B"
      },
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 28
      },
      "hiddenSeries": false,
      "id": 16,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.3.10",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(redis_connected_clients{service_name=~\"$service_name\"})",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "connected",
          "refId": "A"
        },
        {
          "expr": "sum(redis_blocked_clients{service_name=~\"$service_name\"})",
          "format": "time_series",
          "intervalFactor": 1,
          "legendFormat": "blocked",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Connected/Blocked Clients",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "logBase": 1,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "PA58DA793C7250F1B"
      },
      "editable": true,
      "error": false,
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 2,
      "fillGradient": 0,
      "grid": {},
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 35
      },
      "hiddenSeries": false,
      "id": 20,
      "isNew": true,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": false,
        "hideZero": true,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.3.10",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(irate(redis_commands_duration_seconds_total{service_name =~ \"$service_name\"}[1m])) by (cmd)\n  /\nsum(irate(redis_commands_total{service_name =~ \"$service_name\"}[1m])) by (cmd)\n",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "{{ cmd }}",
          "metric": "redis_command_calls_total",
          "refId": "A",
          "step": 240
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Average Time Spent by Command / sec",
      "tooltip": {
        "msResolution": true,
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "s",
          "logBase": 1,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": {
        "type": "prometheus",
        "uid": "PA58DA793C7250F1B"
      },
      "editable": true,
      "error": false,
      "fieldConfig": {
        "defaults": {
          "links": []
        },
        "overrides": []
      },
      "fill": 8,
      "fillGradient": 0,
      "grid": {},
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 35
      },
      "hiddenSeries": false,
      "id": 14,
      "isNew": true,
      "legend": {
        "avg": false,
        "current": false,
        "hideEmpty": false,
        "hideZero": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.3.10",
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(irate(redis_commands_duration_seconds_total{service_name=~\"$service_name\"}[1m])) by (cmd) != 0",
          "format": "time_series",
          "interval": "",
          "intervalFactor": 2,
          "legendFormat": "{{ cmd }}",
          "metric": "redis_command_calls_total",
          "refId": "A",
          "step": 240
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "Total Time Spent by Command / sec",
      "tooltip": {
        "msResolution": true,
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "s",
          "logBase": 1,
          "show": true
        },
        {
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    }
  ],
  "refresh": false,
  "schemaVersion": 34,
  "style": "dark",
  "tags": [
    "prometheus",
    "redis"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "redis_01_37000",
          "value": "redis_01_37000"
        },
        "definition": "label_values(redis_up, service_name)",
        "description": "NONE",
        "hide": 0,
        "includeAll": false,
        "label": "service_name",
        "multi": false,
        "name": "service_name",
        "options": [],
        "query": {
          "query": "label_values(redis_up, service_name)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {
          "selected": false,
          "text": "None",
          "value": ""
        },
        "definition": "label_values(redis_instance_info)",
        "hide": 2,
        "includeAll": false,
        "multi": false,
        "name": "redis_instance_info",
        "options": [],
        "query": {
          "query": "label_values(redis_instance_info)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "browser",
  "title": "Redis Dashboard",
  "uid": "N9uWYT74z",
  "version": 8,
  "weekStart": ""
}

  

标签:false,name,service,type,redis,监控,true,模板
From: https://www.cnblogs.com/danhuangpai/p/16715999.html

相关文章

  • UEC++ 资源加载(四)模板资源拾取类
    TSoftObjectPtr和TSoftClassPtr模板类帮助我们在进行资源操作时增加了类型安全检查,我们可以在细节面板中根据给定的模版类型拾取对应的资源,以获得更加高效的操作!同样的,TS......
  • Redis集群搭建
    Redis集群本章是基于CentOS7下的Redis集群教程,包括:单机安装RedisRedis主从Redis分片集群 1.单机安装RedisLinux版安装首先需要安装Redis所需要的依赖:yu......
  • 2022年vue3 10大开源后台管理系统模板
    当你写项目的时候,如何快速的完成一个项目的搭建,这个时候就需要借助到一些模板了,前端开发的一个好处就是,各类UI模板都是相当的齐全的,直接拿来用就可以了,脱离了一行又一行垒......
  • 管道监控
    管道监控你好机器学习工程世界!如果您一直在关注这些系列文章,您可能会认为部署一切在理论上看起来都很容易,但实际上您的机器学习系统实际上比这更复杂。在许多情况下,您不......
  • LiveNVR监控流媒体Onvif/RTSP功能-RTSP/RTMP/HLS/HTTP-FLV视频文件流转成GB28181级联
    @目录1、背景说明2、通道配置2.1、直播流地址配置2.2、RTSP类型流地址配置示例2.3、Onvif接入示例3、GB28181级联配置3.1、接入第三方国标平台3.2、接入LiveGBS示例3.2、配......
  • LiveNVR监控流媒体Onvif/RTSP功能-如何配置播放回调鉴权集成业务自身的权限系统视频流
    @目录1、准备回调鉴权接口2、配置回调鉴权地址3、调试说明3.1、调试环境3.2、调用示例3.2.1、视频流地址3.2.2、附加鉴权参数3.2.3、播放器播放3.2.4、回调请求鉴权3.2.4.1......
  • 使用easypoi导出word模板
    官方文档: http://easypoi.mydoc.io/pom.xml<dependency><groupId>cn.afterturn</groupId><artifactId>easypoi-spring-boot-starter</artifactId><versio......
  • JAVA线段树模板
    publicclassLineTree{int[]tree,nums;intn;publicLineTree(int[]nums){this.nums=nums;n=nums.length;tree=newi......
  • Java【Mybatis】——创建Mybatis Mapper模板
    目的在编码过程中,我们常常需要写一些配置文件。而这些配置文件的格式都是固定的——关键是我通常记不住,也是找地方复制。这种方法可以,但没有必要。因为一种方式,更简便—......
  • C++05_模板元编程
    模板函数为什么需要模板函数(template)避免重复写代码inttwice(inti){returni*2;}floattwice(floatf){returnf*2;}doubletwice(doubled)......