apiVersion: v1
data:
  openstack-deployment-capacity.json: |-
    {
      "id": null,
      "uid": "openstack-deployment-capacity",
      "title": "OpenStack Deployment Capacity",
      "tags": [
        "openstack",
        "allocation",
        "capacity"
      ],
      "timezone": "browser",
      "schemaVersion": 39,
      "version": 0,
      "refresh": "5m",
      "time": {
        "from": "now-24h",
        "to": "now"
      },
      "annotations": {
        "list": [
          {
            "builtIn": 1,
            "datasource": {
              "type": "grafana",
              "uid": "-- Grafana --"
            },
            "enable": true,
            "hide": true,
            "iconColor": "rgba(0, 211, 255, 1)",
            "name": "Annotations & Alerts",
            "type": "dashboard"
          }
        ]
      },
      "templating": {
        "list": []
      },
      "panels": [
        {
          "id": 1,
          "type": "gauge",
          "title": "vCPU Allocated",
          "description": "Placement VCPU usage divided by schedulable Placement VCPU capacity.",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 8,
            "w": 6,
            "x": 0,
            "y": 0
          },
          "fieldConfig": {
            "defaults": {
              "unit": "percent",
              "min": 0,
              "max": 100,
              "color": {
                "mode": "thresholds"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "yellow",
                    "value": 70
                  },
                  {
                    "color": "red",
                    "value": 90
                  }
                ]
              },
              "mappings": []
            },
            "overrides": []
          },
          "options": {
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showThresholdLabels": true,
            "showThresholdMarkers": true,
            "sizing": "auto"
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum(openstack_placement_resource_usage{resourcetype=\"VCPU\"}) / sum((openstack_placement_resource_total{resourcetype=\"VCPU\"} - openstack_placement_resource_reserved{resourcetype=\"VCPU\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"VCPU\"}) * 100",
              "refId": "A"
            }
          ]
        },
        {
          "id": 2,
          "type": "gauge",
          "title": "RAM Allocated",
          "description": "Placement MEMORY_MB usage divided by schedulable Placement memory capacity.",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 8,
            "w": 6,
            "x": 6,
            "y": 0
          },
          "fieldConfig": {
            "defaults": {
              "unit": "percent",
              "min": 0,
              "max": 100,
              "color": {
                "mode": "thresholds"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "yellow",
                    "value": 70
                  },
                  {
                    "color": "red",
                    "value": 90
                  }
                ]
              },
              "mappings": []
            },
            "overrides": []
          },
          "options": {
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showThresholdLabels": true,
            "showThresholdMarkers": true,
            "sizing": "auto"
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum(openstack_placement_resource_usage{resourcetype=\"MEMORY_MB\"}) / sum((openstack_placement_resource_total{resourcetype=\"MEMORY_MB\"} - openstack_placement_resource_reserved{resourcetype=\"MEMORY_MB\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"MEMORY_MB\"}) * 100",
              "refId": "A"
            }
          ]
        },
        {
          "id": 3,
          "type": "gauge",
          "title": "Disk Allocated",
          "description": "Placement DISK_GB usage divided by schedulable Placement disk capacity.",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 8,
            "w": 6,
            "x": 12,
            "y": 0
          },
          "fieldConfig": {
            "defaults": {
              "unit": "percent",
              "min": 0,
              "max": 100,
              "color": {
                "mode": "thresholds"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "yellow",
                    "value": 70
                  },
                  {
                    "color": "red",
                    "value": 90
                  }
                ]
              },
              "mappings": []
            },
            "overrides": []
          },
          "options": {
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showThresholdLabels": true,
            "showThresholdMarkers": true,
            "sizing": "auto"
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum(openstack_placement_resource_usage{resourcetype=\"DISK_GB\"}) / sum((openstack_placement_resource_total{resourcetype=\"DISK_GB\"} - openstack_placement_resource_reserved{resourcetype=\"DISK_GB\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"DISK_GB\"}) * 100",
              "refId": "A"
            }
          ]
        },
        {
          "id": 4,
          "type": "stat",
          "title": "Compute Hosts",
          "description": "Placement resource providers reporting VCPU inventory.",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 8,
            "w": 6,
            "x": 18,
            "y": 0
          },
          "fieldConfig": {
            "defaults": {
              "unit": "short",
              "color": {
                "mode": "thresholds"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": []
            },
            "overrides": []
          },
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showPercentChange": false,
            "textMode": "auto",
            "wideLayout": true
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "count(count by (hostname) (openstack_placement_resource_total{resourcetype=\"VCPU\"}))",
              "refId": "A"
            }
          ]
        },
        {
          "id": 5,
          "type": "stat",
          "title": "vCPU Remaining",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 0,
            "y": 8
          },
          "fieldConfig": {
            "defaults": {
              "unit": "cores",
              "decimals": 0,
              "color": {
                "mode": "palette-classic"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": []
            },
            "overrides": []
          },
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showPercentChange": false,
            "textMode": "auto",
            "wideLayout": true
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum((openstack_placement_resource_total{resourcetype=\"VCPU\"} - openstack_placement_resource_reserved{resourcetype=\"VCPU\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"VCPU\"}) - sum(openstack_placement_resource_usage{resourcetype=\"VCPU\"})",
              "refId": "A"
            }
          ]
        },
        {
          "id": 6,
          "type": "stat",
          "title": "RAM Remaining",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 6,
            "y": 8
          },
          "fieldConfig": {
            "defaults": {
              "unit": "bytes",
              "decimals": 1,
              "color": {
                "mode": "palette-classic"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": []
            },
            "overrides": []
          },
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showPercentChange": false,
            "textMode": "auto",
            "wideLayout": true
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "(sum((openstack_placement_resource_total{resourcetype=\"MEMORY_MB\"} - openstack_placement_resource_reserved{resourcetype=\"MEMORY_MB\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"MEMORY_MB\"}) - sum(openstack_placement_resource_usage{resourcetype=\"MEMORY_MB\"})) * 1024 * 1024",
              "refId": "A"
            }
          ]
        },
        {
          "id": 7,
          "type": "stat",
          "title": "Disk Remaining",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 12,
            "y": 8
          },
          "fieldConfig": {
            "defaults": {
              "unit": "bytes",
              "decimals": 1,
              "color": {
                "mode": "palette-classic"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": []
            },
            "overrides": []
          },
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showPercentChange": false,
            "textMode": "auto",
            "wideLayout": true
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "(sum((openstack_placement_resource_total{resourcetype=\"DISK_GB\"} - openstack_placement_resource_reserved{resourcetype=\"DISK_GB\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"DISK_GB\"}) - sum(openstack_placement_resource_usage{resourcetype=\"DISK_GB\"})) * 1024 * 1024 * 1024",
              "refId": "A"
            }
          ]
        },
        {
          "id": 8,
          "type": "stat",
          "title": "Running VMs",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 6,
            "w": 6,
            "x": 18,
            "y": 8
          },
          "fieldConfig": {
            "defaults": {
              "unit": "short",
              "decimals": 0,
              "color": {
                "mode": "thresholds"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": []
            },
            "overrides": []
          },
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "showPercentChange": false,
            "textMode": "auto",
            "wideLayout": true
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum(openstack_nova_running_vms)",
              "refId": "A"
            }
          ]
        },
        {
          "id": 9,
          "type": "timeseries",
          "title": "Allocation Trend",
          "description": "OpenStack Placement allocation percentages over time for deployment planning.",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 14
          },
          "fieldConfig": {
            "defaults": {
              "unit": "percent",
              "min": 0,
              "custom": {
                "axisBorderShow": false,
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "insertNulls": false,
                "lineInterpolation": "linear",
                "lineWidth": 2,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "never",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "dashed"
                }
              },
              "color": {
                "mode": "palette-classic"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "yellow",
                    "value": 70
                  },
                  {
                    "color": "red",
                    "value": 90
                  }
                ]
              },
              "mappings": []
            },
            "overrides": []
          },
          "options": {
            "legend": {
              "calcs": [
                "lastNotNull"
              ],
              "displayMode": "table",
              "placement": "bottom",
              "showLegend": true
            },
            "tooltip": {
              "mode": "multi",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum(openstack_placement_resource_usage{resourcetype=\"VCPU\"}) / sum((openstack_placement_resource_total{resourcetype=\"VCPU\"} - openstack_placement_resource_reserved{resourcetype=\"VCPU\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"VCPU\"}) * 100",
              "legendFormat": "vCPU",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum(openstack_placement_resource_usage{resourcetype=\"MEMORY_MB\"}) / sum((openstack_placement_resource_total{resourcetype=\"MEMORY_MB\"} - openstack_placement_resource_reserved{resourcetype=\"MEMORY_MB\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"MEMORY_MB\"}) * 100",
              "legendFormat": "RAM",
              "refId": "B"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum(openstack_placement_resource_usage{resourcetype=\"DISK_GB\"}) / sum((openstack_placement_resource_total{resourcetype=\"DISK_GB\"} - openstack_placement_resource_reserved{resourcetype=\"DISK_GB\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"DISK_GB\"}) * 100",
              "legendFormat": "Disk",
              "refId": "C"
            }
          ]
        },
        {
          "id": 10,
          "type": "timeseries",
          "title": "Placement vCPU Allocation",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 8,
            "w": 8,
            "x": 0,
            "y": 23
          },
          "fieldConfig": {
            "defaults": {
              "unit": "cores",
              "custom": {
                "axisBorderShow": false,
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "insertNulls": false,
                "lineInterpolation": "linear",
                "lineWidth": 2,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "never",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "color": {
                "mode": "palette-classic"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": []
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Capacity"
                },
                "properties": [
                  {
                    "id": "custom.lineStyle",
                    "value": {
                      "dash": [
                        10,
                        10
                      ],
                      "fill": "dash"
                    }
                  },
                  {
                    "id": "custom.fillOpacity",
                    "value": 0
                  }
                ]
              }
            ]
          },
          "options": {
            "legend": {
              "calcs": [
                "lastNotNull"
              ],
              "displayMode": "table",
              "placement": "bottom",
              "showLegend": true
            },
            "tooltip": {
              "mode": "multi",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum(openstack_placement_resource_usage{resourcetype=\"VCPU\"})",
              "legendFormat": "Allocated",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum((openstack_placement_resource_total{resourcetype=\"VCPU\"} - openstack_placement_resource_reserved{resourcetype=\"VCPU\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"VCPU\"})",
              "legendFormat": "Capacity",
              "refId": "B"
            }
          ]
        },
        {
          "id": 11,
          "type": "timeseries",
          "title": "Placement RAM Allocation",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 8,
            "w": 8,
            "x": 8,
            "y": 23
          },
          "fieldConfig": {
            "defaults": {
              "unit": "bytes",
              "custom": {
                "axisBorderShow": false,
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "insertNulls": false,
                "lineInterpolation": "linear",
                "lineWidth": 2,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "never",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "color": {
                "mode": "palette-classic"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": []
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Capacity"
                },
                "properties": [
                  {
                    "id": "custom.lineStyle",
                    "value": {
                      "dash": [
                        10,
                        10
                      ],
                      "fill": "dash"
                    }
                  },
                  {
                    "id": "custom.fillOpacity",
                    "value": 0
                  }
                ]
              }
            ]
          },
          "options": {
            "legend": {
              "calcs": [
                "lastNotNull"
              ],
              "displayMode": "table",
              "placement": "bottom",
              "showLegend": true
            },
            "tooltip": {
              "mode": "multi",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum(openstack_placement_resource_usage{resourcetype=\"MEMORY_MB\"}) * 1024 * 1024",
              "legendFormat": "Allocated",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum((openstack_placement_resource_total{resourcetype=\"MEMORY_MB\"} - openstack_placement_resource_reserved{resourcetype=\"MEMORY_MB\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"MEMORY_MB\"}) * 1024 * 1024",
              "legendFormat": "Capacity",
              "refId": "B"
            }
          ]
        },
        {
          "id": 12,
          "type": "timeseries",
          "title": "Placement Disk Allocation",
          "datasource": {
            "type": "prometheus",
            "uid": "prometheus"
          },
          "gridPos": {
            "h": 8,
            "w": 8,
            "x": 16,
            "y": 23
          },
          "fieldConfig": {
            "defaults": {
              "unit": "bytes",
              "custom": {
                "axisBorderShow": false,
                "axisCenteredZero": false,
                "axisColorMode": "text",
                "axisLabel": "",
                "axisPlacement": "auto",
                "barAlignment": 0,
                "drawStyle": "line",
                "fillOpacity": 10,
                "gradientMode": "none",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "insertNulls": false,
                "lineInterpolation": "linear",
                "lineWidth": 2,
                "pointSize": 5,
                "scaleDistribution": {
                  "type": "linear"
                },
                "showPoints": "never",
                "spanNulls": false,
                "stacking": {
                  "group": "A",
                  "mode": "none"
                },
                "thresholdsStyle": {
                  "mode": "off"
                }
              },
              "color": {
                "mode": "palette-classic"
              },
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "mappings": []
            },
            "overrides": [
              {
                "matcher": {
                  "id": "byName",
                  "options": "Capacity"
                },
                "properties": [
                  {
                    "id": "custom.lineStyle",
                    "value": {
                      "dash": [
                        10,
                        10
                      ],
                      "fill": "dash"
                    }
                  },
                  {
                    "id": "custom.fillOpacity",
                    "value": 0
                  }
                ]
              }
            ]
          },
          "options": {
            "legend": {
              "calcs": [
                "lastNotNull"
              ],
              "displayMode": "table",
              "placement": "bottom",
              "showLegend": true
            },
            "tooltip": {
              "mode": "multi",
              "sort": "none"
            }
          },
          "targets": [
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum(openstack_placement_resource_usage{resourcetype=\"DISK_GB\"}) * 1024 * 1024 * 1024",
              "legendFormat": "Allocated",
              "refId": "A"
            },
            {
              "datasource": {
                "type": "prometheus",
                "uid": "prometheus"
              },
              "expr": "sum((openstack_placement_resource_total{resourcetype=\"DISK_GB\"} - openstack_placement_resource_reserved{resourcetype=\"DISK_GB\"}) * openstack_placement_resource_allocation_ratio{resourcetype=\"DISK_GB\"}) * 1024 * 1024 * 1024",
              "legendFormat": "Capacity",
              "refId": "B"
            }
          ]
        }
      ]
    }
kind: ConfigMap
metadata:
  creationTimestamp: "2026-06-19T01:29:13Z"
  labels:
    grafana_dashboard: "1"
  name: kube-prometheus-stack-dashboard-openstack-deployment-capacity
  namespace: monitoring
  resourceVersion: "4016"
  uid: 66499fc9-8538-4dba-bad5-dd2a53800277
