perforce-sdp-infrastructure.json #1

  • //
  • guest/
  • russell_jackson/
  • ansible-sdp/
  • grafana/
  • perforce-sdp-infrastructure.json
  • View
  • Commits
  • Open Download .zip Download (22 KB)
{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": { "type": "grafana", "uid": "-- Grafana --" },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 1,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
      "id": 200,
      "title": "Disk Space",
      "type": "row"
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "min": 0,
          "max": 100,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "green", "value": null },
              { "color": "yellow", "value": 80 },
              { "color": "red", "value": 90 }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": { "h": 6, "w": 12, "x": 0, "y": 1 },
      "id": 1,
      "options": {
        "orientation": "horizontal",
        "displayMode": "gradient",
        "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
        "showUnfilled": true,
        "minVizWidth": 8,
        "minVizHeight": 16
      },
      "title": "Disk Usage by Volume",
      "type": "bargauge",
      "targets": [
        {
          "expr": "p4_disk_used_percent{instance=~\"$instance\"}",
          "legendFormat": "{{volume}}",
          "refId": "A"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "mappings": [
            { "options": { "0": { "color": "green", "text": "OK" }, "1": { "color": "yellow", "text": "WARNING" }, "2": { "color": "red", "text": "CRITICAL" } }, "type": "value" }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "green", "value": null },
              { "color": "yellow", "value": 1 },
              { "color": "red", "value": 2 }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": { "h": 6, "w": 12, "x": 12, "y": 1 },
      "id": 2,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
        "textMode": "auto"
      },
      "title": "Disk Alert Status",
      "type": "stat",
      "targets": [
        {
          "expr": "p4_disk_alert{instance=~\"$instance\"}",
          "legendFormat": "{{volume}}",
          "refId": "A"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "fillOpacity": 20,
            "gradientMode": "scheme",
            "stacking": { "mode": "none" },
            "axisPlacement": "auto",
            "spanNulls": false,
            "thresholdsStyle": { "mode": "dashed" }
          },
          "unit": "percent",
          "min": 0,
          "max": 100,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "green", "value": null },
              { "color": "yellow", "value": 80 },
              { "color": "red", "value": 90 }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": { "h": 8, "w": 12, "x": 0, "y": 7 },
      "id": 3,
      "options": {
        "legend": { "calcs": ["lastNotNull", "max"], "displayMode": "table", "placement": "bottom" },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "title": "Disk Usage % Over Time",
      "type": "timeseries",
      "targets": [
        {
          "expr": "p4_disk_used_percent{instance=~\"$instance\"}",
          "legendFormat": "{{volume}}",
          "refId": "A"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "fillOpacity": 10,
            "stacking": { "mode": "none" },
            "axisPlacement": "auto",
            "spanNulls": false
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": { "h": 8, "w": 12, "x": 12, "y": 7 },
      "id": 4,
      "options": {
        "legend": { "calcs": ["lastNotNull"], "displayMode": "table", "placement": "bottom" },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "title": "Available Disk Space Over Time",
      "type": "timeseries",
      "targets": [
        {
          "expr": "p4_disk_avail_bytes{instance=~\"$instance\"}",
          "legendFormat": "{{volume}} available",
          "refId": "A"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "unit": "bytes",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "red", "value": null },
              { "color": "yellow", "value": 10737418240 },
              { "color": "green", "value": 53687091200 }
            ]
          },
          "custom": {
            "align": "auto",
            "cellOptions": { "type": "auto" },
            "inspect": false
          }
        },
        "overrides": [
          {
            "matcher": { "id": "byName", "options": "Volume" },
            "properties": [{ "id": "custom.width", "value": 150 }]
          },
          {
            "matcher": { "id": "byName", "options": "Used %" },
            "properties": [
              { "id": "unit", "value": "percent" },
              { "id": "custom.cellOptions", "value": { "mode": "gradient", "type": "gauge" } },
              { "id": "min", "value": 0 },
              { "id": "max", "value": 100 },
              { "id": "thresholds", "value": { "mode": "absolute", "steps": [{ "color": "green", "value": null }, { "color": "yellow", "value": 80 }, { "color": "red", "value": 90 }] } }
            ]
          }
        ]
      },
      "gridPos": { "h": 8, "w": 24, "x": 0, "y": 15 },
      "id": 5,
      "options": {
        "showHeader": true,
        "sortBy": [{ "desc": true, "displayName": "Used %" }]
      },
      "title": "Disk Space Summary",
      "type": "table",
      "targets": [
        {
          "expr": "p4_disk_total_bytes{instance=~\"$instance\"}",
          "legendFormat": "",
          "refId": "A",
          "format": "table",
          "instant": true
        },
        {
          "expr": "p4_disk_used_bytes{instance=~\"$instance\"}",
          "legendFormat": "",
          "refId": "B",
          "format": "table",
          "instant": true
        },
        {
          "expr": "p4_disk_avail_bytes{instance=~\"$instance\"}",
          "legendFormat": "",
          "refId": "C",
          "format": "table",
          "instant": true
        },
        {
          "expr": "p4_disk_used_percent{instance=~\"$instance\"}",
          "legendFormat": "",
          "refId": "D",
          "format": "table",
          "instant": true
        }
      ],
      "transformations": [
        {
          "id": "merge",
          "options": {}
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": { "Time": true, "__name__": true, "job": true },
            "renameByName": {
              "instance": "Instance",
              "volume": "Volume",
              "Value #A": "Total",
              "Value #B": "Used",
              "Value #C": "Available",
              "Value #D": "Used %"
            }
          }
        }
      ]
    },
    {
      "collapsed": false,
      "gridPos": { "h": 1, "w": 24, "x": 0, "y": 23 },
      "id": 201,
      "title": "Network Latency",
      "type": "row"
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "mappings": [
            { "options": { "0": { "color": "red", "text": "UNREACHABLE" }, "1": { "color": "green", "text": "REACHABLE" } }, "type": "value" }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "red", "value": null },
              { "color": "green", "value": 1 }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": { "h": 4, "w": 6, "x": 0, "y": 24 },
      "id": 6,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
        "textMode": "auto"
      },
      "title": "Commit Server Reachability",
      "type": "stat",
      "targets": [
        {
          "expr": "p4_network_target_reachable",
          "legendFormat": "{{target}}",
          "refId": "A"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "unit": "ms",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "green", "value": null },
              { "color": "yellow", "value": 50 },
              { "color": "red", "value": 200 }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": { "h": 4, "w": 6, "x": 6, "y": 24 },
      "id": 7,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
        "textMode": "auto"
      },
      "title": "Current Latency to Commit",
      "type": "stat",
      "targets": [
        {
          "expr": "p4_network_latency_ms",
          "legendFormat": "{{target}}",
          "refId": "A"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "unit": "percent",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "green", "value": null },
              { "color": "yellow", "value": 1 },
              { "color": "red", "value": 10 }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": { "h": 4, "w": 6, "x": 12, "y": 24 },
      "id": 8,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
        "textMode": "auto"
      },
      "title": "Packet Loss",
      "type": "stat",
      "targets": [
        {
          "expr": "p4_network_packet_loss_percent",
          "legendFormat": "{{target}}",
          "refId": "A"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "fillOpacity": 10,
            "gradientMode": "none",
            "stacking": { "mode": "none" },
            "axisPlacement": "auto",
            "spanNulls": false
          },
          "unit": "ms"
        },
        "overrides": []
      },
      "gridPos": { "h": 8, "w": 12, "x": 0, "y": 28 },
      "id": 9,
      "options": {
        "legend": { "calcs": ["mean", "max", "min"], "displayMode": "table", "placement": "bottom" },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "title": "Network Latency to Commit Server",
      "type": "timeseries",
      "targets": [
        {
          "expr": "p4_network_latency_ms",
          "legendFormat": "{{target}}",
          "refId": "A"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "fillOpacity": 20,
            "gradientMode": "none",
            "stacking": { "mode": "none" },
            "axisPlacement": "auto",
            "spanNulls": false
          },
          "unit": "percent",
          "min": 0,
          "max": 100
        },
        "overrides": []
      },
      "gridPos": { "h": 8, "w": 12, "x": 12, "y": 28 },
      "id": 10,
      "options": {
        "legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "bottom" },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "title": "Packet Loss Over Time",
      "type": "timeseries",
      "targets": [
        {
          "expr": "p4_network_packet_loss_percent",
          "legendFormat": "{{target}}",
          "refId": "A"
        }
      ]
    },
    {
      "collapsed": false,
      "gridPos": { "h": 1, "w": 24, "x": 0, "y": 36 },
      "id": 202,
      "title": "System Resources (Node Exporter)",
      "type": "row"
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "fillOpacity": 30,
            "gradientMode": "scheme",
            "stacking": { "mode": "none" },
            "axisPlacement": "auto",
            "spanNulls": false
          },
          "unit": "percentunit",
          "min": 0,
          "max": 1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "green", "value": null },
              { "color": "yellow", "value": 0.7 },
              { "color": "red", "value": 0.9 }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": { "h": 8, "w": 12, "x": 0, "y": 37 },
      "id": 11,
      "options": {
        "legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "bottom" },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "title": "CPU Usage",
      "type": "timeseries",
      "targets": [
        {
          "expr": "1 - avg by(instance) (rate(node_cpu_seconds_total{mode=\"idle\",job=~\"$job\"}[5m]))",
          "legendFormat": "{{instance}}",
          "refId": "A"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "fillOpacity": 30,
            "gradientMode": "scheme",
            "stacking": { "mode": "none" },
            "axisPlacement": "auto",
            "spanNulls": false
          },
          "unit": "percentunit",
          "min": 0,
          "max": 1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "green", "value": null },
              { "color": "yellow", "value": 0.7 },
              { "color": "red", "value": 0.9 }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": { "h": 8, "w": 12, "x": 12, "y": 37 },
      "id": 12,
      "options": {
        "legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "bottom" },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "title": "Memory Usage",
      "type": "timeseries",
      "targets": [
        {
          "expr": "1 - (node_memory_MemAvailable_bytes{job=~\"$job\"} / node_memory_MemTotal_bytes{job=~\"$job\"})",
          "legendFormat": "{{instance}}",
          "refId": "A"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "fillOpacity": 10,
            "stacking": { "mode": "none" },
            "axisPlacement": "auto",
            "spanNulls": false
          },
          "unit": "Bps"
        },
        "overrides": []
      },
      "gridPos": { "h": 8, "w": 12, "x": 0, "y": 45 },
      "id": 13,
      "options": {
        "legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "bottom" },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "title": "Disk I/O Throughput",
      "type": "timeseries",
      "targets": [
        {
          "expr": "rate(node_disk_read_bytes_total{job=~\"$job\"}[5m])",
          "legendFormat": "{{device}} read",
          "refId": "A"
        },
        {
          "expr": "rate(node_disk_written_bytes_total{job=~\"$job\"}[5m])",
          "legendFormat": "{{device}} write",
          "refId": "B"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "fillOpacity": 10,
            "stacking": { "mode": "none" },
            "axisPlacement": "auto",
            "spanNulls": false
          },
          "unit": "Bps"
        },
        "overrides": []
      },
      "gridPos": { "h": 8, "w": 12, "x": 12, "y": 45 },
      "id": 14,
      "options": {
        "legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "bottom" },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "title": "Network Traffic",
      "type": "timeseries",
      "targets": [
        {
          "expr": "rate(node_network_receive_bytes_total{job=~\"$job\",device!=\"lo\"}[5m])",
          "legendFormat": "{{device}} rx",
          "refId": "A"
        },
        {
          "expr": "rate(node_network_transmit_bytes_total{job=~\"$job\",device!=\"lo\"}[5m])",
          "legendFormat": "{{device}} tx",
          "refId": "B"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "drawStyle": "line",
            "lineInterpolation": "smooth",
            "lineWidth": 2,
            "fillOpacity": 10,
            "stacking": { "mode": "none" },
            "axisPlacement": "auto",
            "spanNulls": false
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": { "h": 8, "w": 12, "x": 0, "y": 53 },
      "id": 15,
      "options": {
        "legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "bottom" },
        "tooltip": { "mode": "multi", "sort": "desc" }
      },
      "title": "System Load Average",
      "type": "timeseries",
      "targets": [
        {
          "expr": "node_load1{job=~\"$job\"}",
          "legendFormat": "1m {{instance}}",
          "refId": "A"
        },
        {
          "expr": "node_load5{job=~\"$job\"}",
          "legendFormat": "5m {{instance}}",
          "refId": "B"
        },
        {
          "expr": "node_load15{job=~\"$job\"}",
          "legendFormat": "15m {{instance}}",
          "refId": "C"
        }
      ]
    },
    {
      "datasource": { "type": "prometheus", "uid": "${datasource}" },
      "fieldConfig": {
        "defaults": {
          "mappings": [
            { "options": { "1": { "color": "green", "text": "Active" }, "0": { "color": "red", "text": "Inactive" } }, "type": "value" }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              { "color": "red", "value": null },
              { "color": "green", "value": 1 }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": { "h": 8, "w": 12, "x": 12, "y": 53 },
      "id": 16,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
        "textMode": "auto"
      },
      "title": "Perforce Service Status",
      "type": "stat",
      "targets": [
        {
          "expr": "node_systemd_unit_state{name=~\"p4.*\",state=\"active\",job=~\"$job\"}",
          "legendFormat": "{{name}}",
          "refId": "A"
        }
      ]
    }
  ],
  "refresh": "1m",
  "schemaVersion": 39,
  "tags": ["perforce", "sdp", "infrastructure"],
  "templating": {
    "list": [
      {
        "current": {},
        "hide": 0,
        "includeAll": false,
        "label": "Data Source",
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "prometheus",
        "refresh": 1,
        "type": "datasource"
      },
      {
        "current": {},
        "datasource": { "type": "prometheus", "uid": "${datasource}" },
        "definition": "label_values(p4_disk_used_percent, instance)",
        "hide": 0,
        "includeAll": true,
        "label": "Instance",
        "multi": true,
        "name": "instance",
        "query": "label_values(p4_disk_used_percent, instance)",
        "refresh": 2,
        "sort": 1,
        "type": "query"
      },
      {
        "current": {},
        "datasource": { "type": "prometheus", "uid": "${datasource}" },
        "definition": "label_values(node_cpu_seconds_total, job)",
        "hide": 0,
        "includeAll": true,
        "label": "Job",
        "multi": true,
        "name": "job",
        "query": "label_values(node_cpu_seconds_total, job)",
        "refresh": 2,
        "sort": 1,
        "type": "query"
      }
    ]
  },
  "time": { "from": "now-24h", "to": "now" },
  "timepicker": {},
  "timezone": "",
  "title": "Perforce SDP - Infrastructure",
  "uid": "perforce-sdp-infra",
  "version": 1
}
# Change User Description Committed
#1 32511 Russell C. Jackson (Rusty) Add Grafana dashboards for Perforce SDP monitoring

Three dashboards covering p4prometheus, custom health/disk/network
metrics, node_exporter system metrics, and server geolocation.