CAST AI Metrics Grafana dashboard example JSON

{
    "__inputs": [
      {
        "name": "DS_EXAMPLE-PROM",
        "label": "example-prom",
        "description": "",
        "type": "datasource",
        "pluginId": "prometheus",
        "pluginName": "Prometheus"
      }
    ],
    "__elements": {},
    "__requires": [
      {
        "type": "grafana",
        "id": "grafana",
        "name": "Grafana",
        "version": "10.2.2"
      },
      {
        "type": "datasource",
        "id": "prometheus",
        "name": "Prometheus",
        "version": "1.0.0"
      },
      {
        "type": "panel",
        "id": "stat",
        "name": "Stat",
        "version": ""
      },
      {
        "type": "panel",
        "id": "timeseries",
        "name": "Time series",
        "version": ""
      }
    ],
    "annotations": {
      "list": [
        {
          "builtIn": 1,
          "datasource": {
            "type": "datasource",
            "uid": "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": "",
    "editable": true,
    "fiscalYearStartMonth": 0,
    "graphTooltip": 0,
    "id": null,
    "links": [],
    "liveNow": false,
    "panels": [
      {
        "collapsed": false,
        "datasource": {
          "type": "prometheus",
          "uid": "b30a8b95-0086-4861-8840-2ef54dfcff33"
        },
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 0
        },
        "id": 20,
        "panels": [],
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "b30a8b95-0086-4861-8840-2ef54dfcff33"
            },
            "refId": "A"
          }
        ],
        "title": "Status",
        "type": "row"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "currencyUSD"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 7,
          "w": 4,
          "x": 0,
          "y": 1
        },
        "id": 4,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "auto",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "sum(castai_cluster_compute_cost_hourly{castai_cluster=\"$cluster_name\"})*24*30",
            "interval": "",
            "legendFormat": "",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "COST (monthly)",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 7,
          "w": 4,
          "x": 4,
          "y": 1
        },
        "id": 6,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "auto",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "exemplar": true,
            "expr": "sum(castai_cluster_provisioned_cpu_cores{castai_cluster=\"$cluster_name\"})",
            "interval": "",
            "legendFormat": "cpu cores",
            "refId": "A"
          }
        ],
        "title": "CPU",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "gbytes"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 7,
          "w": 4,
          "x": 8,
          "y": 1
        },
        "id": 8,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "auto",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "exemplar": true,
            "expr": "sum(castai_cluster_provisioned_memory_bytes{castai_cluster=\"$cluster_name\"}/1024/1024/1024)",
            "interval": "",
            "legendFormat": "GiB",
            "refId": "A"
          }
        ],
        "title": "Memory",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 0,
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "none"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 7,
          "w": 4,
          "x": 12,
          "y": 1
        },
        "id": 30,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "auto",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "sum(castai_cluster_provisioned_gpu{castai_cluster=\"$cluster_name\"})",
            "interval": "",
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "GPU",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": [
            {
              "matcher": {
                "id": "byName",
                "options": "Unscheduled"
              },
              "properties": [
                {
                  "id": "color",
                  "value": {
                    "mode": "thresholds"
                  }
                },
                {
                  "id": "thresholds",
                  "value": {
                    "mode": "absolute",
                    "steps": [
                      {
                        "color": "green",
                        "value": null
                      },
                      {
                        "color": "red",
                        "value": 1
                      }
                    ]
                  }
                }
              ]
            }
          ]
        },
        "gridPos": {
          "h": 7,
          "w": 2,
          "x": 16,
          "y": 1
        },
        "id": 2,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "horizontal",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "value_and_name",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "sum(castai_cluster_node_count{castai_cluster=\"$cluster_name\"})",
            "interval": "",
            "legendFormat": "Total",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Nodes",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": [
            {
              "matcher": {
                "id": "byName",
                "options": "Unscheduled"
              },
              "properties": [
                {
                  "id": "color",
                  "value": {
                    "mode": "thresholds"
                  }
                },
                {
                  "id": "thresholds",
                  "value": {
                    "mode": "absolute",
                    "steps": [
                      {
                        "color": "green",
                        "value": null
                      },
                      {
                        "color": "red",
                        "value": 1
                      }
                    ]
                  }
                }
              ]
            }
          ]
        },
        "gridPos": {
          "h": 7,
          "w": 2,
          "x": 18,
          "y": 1
        },
        "id": 104,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "horizontal",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "value_and_name",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "exemplar": true,
            "expr": "castai_cluster_pods_count{castai_cluster=\"$cluster_name\"}",
            "interval": "",
            "legendFormat": "Total",
            "refId": "A"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "exemplar": true,
            "expr": "castai_cluster_unschedulable_pods_count{castai_cluster=\"$cluster_name\"}",
            "hide": false,
            "interval": "",
            "legendFormat": "Unscheduled",
            "refId": "B"
          }
        ],
        "title": "PODS",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": [
            {
              "matcher": {
                "id": "byName",
                "options": "Unscheduled"
              },
              "properties": [
                {
                  "id": "color",
                  "value": {
                    "mode": "thresholds"
                  }
                },
                {
                  "id": "thresholds",
                  "value": {
                    "mode": "absolute",
                    "steps": [
                      {
                        "color": "green",
                        "value": null
                      },
                      {
                        "color": "red",
                        "value": 1
                      }
                    ]
                  }
                }
              ]
            }
          ]
        },
        "gridPos": {
          "h": 7,
          "w": 2,
          "x": 20,
          "y": 1
        },
        "id": 72,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "horizontal",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "value_and_name",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "castai_evictor_node_target_count{castai_cluster=\"$cluster_name\"}",
            "interval": "",
            "legendFormat": "Nodes",
            "range": true,
            "refId": "A"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "castai_evictor_pod_target_count{castai_cluster=\"$cluster_name\"}",
            "hide": false,
            "interval": "",
            "legendFormat": "Pods",
            "range": true,
            "refId": "B"
          }
        ],
        "title": "Eviction",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 1,
            "mappings": [
              {
                "options": {
                  "from": 0,
                  "result": {
                    "color": "red",
                    "index": 0,
                    "text": "ERR"
                  },
                  "to": 0.1
                },
                "type": "range"
              },
              {
                "options": {
                  "from": 0.1,
                  "result": {
                    "color": "green",
                    "index": 1,
                    "text": "OK"
                  },
                  "to": 1000
                },
                "type": "range"
              }
            ],
            "max": 10,
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "red",
                  "value": null
                },
                {
                  "color": "green",
                  "value": 0.1
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 7,
          "w": 2,
          "x": 22,
          "y": 1
        },
        "id": 10,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "value",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "rate(castai_autoscaler_agent_snapshots_processed_total{castai_cluster=\"$cluster_name\"}[10m])*60",
            "interval": "",
            "legendFormat": "Processing",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Snapshots",
        "type": "stat"
      },
      {
        "collapsed": false,
        "datasource": {
          "type": "prometheus",
          "uid": "b30a8b95-0086-4861-8840-2ef54dfcff33"
        },
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 8
        },
        "id": 27,
        "panels": [],
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "b30a8b95-0086-4861-8840-2ef54dfcff33"
            },
            "refId": "A"
          }
        ],
        "title": "Nodes",
        "type": "row"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "min": 1,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 0,
          "y": 9
        },
        "id": 12,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "exemplar": true,
            "expr": "sum(castai_cluster_node_count{castai_cluster=\"$cluster_name\"}) by (castai_node_lifecycle)",
            "interval": "",
            "legendFormat": "{{castai_node_lifecycle}}",
            "refId": "A"
          }
        ],
        "title": "Nodes by lifecycle",
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "min": 1,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 12,
          "y": 9
        },
        "id": 14,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "exemplar": true,
            "expr": "sum (castai_cluster_node_count{castai_cluster=\"$cluster_name\"}) by (castai_managed_by)",
            "interval": "",
            "legendFormat": "{{castai_managed_by}}",
            "refId": "A"
          }
        ],
        "title": "Nodes by provisioner",
        "type": "timeseries"
      },
      {
        "collapsed": false,
        "datasource": {
          "type": "prometheus",
          "uid": "b30a8b95-0086-4861-8840-2ef54dfcff33"
        },
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 17
        },
        "id": 29,
        "panels": [],
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "b30a8b95-0086-4861-8840-2ef54dfcff33"
            },
            "refId": "A"
          }
        ],
        "title": "CPU and Memory by lifecycle",
        "type": "row"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "min": 1,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 0,
          "y": 18
        },
        "id": 16,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "exemplar": true,
            "expr": "sum(castai_cluster_provisioned_cpu_cores{castai_cluster=\"$cluster_name\"}) by (castai_node_lifecycle)",
            "interval": "",
            "legendFormat": "{{castai_node_lifecycle}}",
            "refId": "A"
          }
        ],
        "title": "CPU by lifecycle",
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "min": 1,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            },
            "unit": "bytes"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 12,
          "y": 18
        },
        "id": 18,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "exemplar": true,
            "expr": "sum (castai_cluster_provisioned_memory_bytes{castai_cluster=\"$cluster_name\"}) by (castai_node_lifecycle)",
            "interval": "",
            "legendFormat": "{{castai_node_lifecycle}}",
            "refId": "A"
          }
        ],
        "title": "Memory by lifecycle",
        "type": "timeseries"
      },
      {
        "collapsed": false,
        "datasource": {
          "type": "prometheus",
          "uid": "b30a8b95-0086-4861-8840-2ef54dfcff33"
        },
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 26
        },
        "id": 22,
        "panels": [],
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "b30a8b95-0086-4861-8840-2ef54dfcff33"
            },
            "refId": "A"
          }
        ],
        "title": "Efficiency",
        "type": "row"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 0,
          "y": 27
        },
        "id": 24,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "sum(castai_cluster_provisioned_cpu_cores{castai_cluster=\"$cluster_name\"})",
            "hide": false,
            "interval": "",
            "legendFormat": "provisioned",
            "range": true,
            "refId": "D"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "sum(castai_cluster_allocatable_cpu_cores{castai_cluster=\"$cluster_name\"})",
            "interval": "",
            "legendFormat": "allocatable",
            "range": true,
            "refId": "A"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "exemplar": true,
            "expr": "sum(castai_cluster_requests_cpu_cores{castai_cluster=\"$cluster_name\"})",
            "hide": false,
            "interval": "",
            "legendFormat": "requested",
            "refId": "B"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "sum(castai_cluster_used_cpu_cores{castai_cluster=\"$cluster_name\"})",
            "hide": false,
            "interval": "",
            "legendFormat": "used",
            "range": true,
            "refId": "C"
          }
        ],
        "title": "CPU provisioned, allocatable, requested, used",
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                },
                {
                  "color": "red",
                  "value": 80
                }
              ]
            },
            "unit": "bytes"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 12,
          "x": 12,
          "y": 27
        },
        "id": 25,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "sum(castai_cluster_provisioned_memory_bytes{castai_cluster=\"$cluster_name\"})",
            "hide": false,
            "interval": "",
            "legendFormat": "provisioned",
            "range": true,
            "refId": "D"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "sum(castai_cluster_allocatable_memory_bytes{castai_cluster=\"$cluster_name\"})",
            "interval": "",
            "legendFormat": "allocatable",
            "range": true,
            "refId": "A"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "sum(castai_cluster_requests_memory_bytes{castai_cluster=\"$cluster_name\"})",
            "hide": false,
            "interval": "",
            "legendFormat": "requested",
            "range": true,
            "refId": "B"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "exemplar": true,
            "expr": "sum(castai_cluster_used_memory_bytes{castai_cluster=\"$cluster_name\"})",
            "hide": false,
            "interval": "",
            "legendFormat": "used",
            "range": true,
            "refId": "C"
          }
        ],
        "title": "Memory provisioned, allocatable, requested, used",
        "type": "timeseries"
      },
      {
        "collapsed": false,
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 35
        },
        "id": 32,
        "panels": [],
        "repeat": "node_template",
        "repeatDirection": "h",
        "title": "Node template [$node_template]",
        "type": "row"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 10,
          "x": 0,
          "y": 36
        },
        "id": 31,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_provisioned_cpu_cores{castai_cluster=\"$cluster_name\", node_template=\"$node_template\"})",
            "instant": false,
            "legendFormat": "Provisioned",
            "range": true,
            "refId": "A"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_requested_cpu_cores{castai_cluster=\"$cluster_name\", node_template=\"$node_template\"})",
            "hide": false,
            "instant": false,
            "legendFormat": "Requested",
            "range": true,
            "refId": "B"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_used_cpu_cores{castai_cluster=\"$cluster_name\", node_template=\"$node_template\"})",
            "hide": false,
            "instant": false,
            "legendFormat": "Used",
            "range": true,
            "refId": "C"
          }
        ],
        "title": "CPU",
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 0,
            "mappings": [],
            "max": 100,
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "percent"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 2,
          "x": 10,
          "y": 36
        },
        "id": 43,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "horizontal",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "auto",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_requested_cpu_cores{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"}) / sum(castai_node_provisioned_cpu_cores{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"}) * 100",
            "instant": false,
            "legendFormat": "Provisioning",
            "range": true,
            "refId": "A"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_used_cpu_cores{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"}) / sum(castai_node_provisioned_cpu_cores{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"}) * 100",
            "hide": false,
            "instant": false,
            "legendFormat": "Overall",
            "range": true,
            "refId": "C"
          }
        ],
        "title": "CPU efficiency %",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "decimals": 0,
            "mappings": [],
            "max": 100,
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "percent"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 2,
          "x": 12,
          "y": 36
        },
        "id": 56,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "horizontal",
          "reduceOptions": {
            "calcs": [
              "lastNotNull"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "auto",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_requested_ram_bytes{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"}) / sum(castai_node_provisioned_ram_bytes{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"}) * 100",
            "hide": false,
            "instant": false,
            "legendFormat": "Provisioning",
            "range": true,
            "refId": "A"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_used_ram_bytes{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"}) / sum(castai_node_provisioned_ram_bytes{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"}) * 100",
            "hide": false,
            "instant": false,
            "legendFormat": "Overall",
            "range": true,
            "refId": "C"
          }
        ],
        "title": "Memory efficiency %",
        "type": "stat"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "description": "",
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "line",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            },
            "unit": "bytes"
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 10,
          "x": 14,
          "y": 36
        },
        "id": 33,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_provisioned_ram_bytes{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"})",
            "instant": false,
            "legendFormat": "Provisioned",
            "range": true,
            "refId": "A"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_requested_ram_bytes{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"})",
            "hide": false,
            "instant": false,
            "legendFormat": "Requested",
            "range": true,
            "refId": "B"
          },
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_used_ram_bytes{castai_cluster=\"$cluster_name\",node_template=\"$node_template\"})",
            "hide": false,
            "instant": false,
            "legendFormat": "Used",
            "range": true,
            "refId": "C"
          }
        ],
        "title": "Memory",
        "type": "timeseries"
      },
      {
        "collapsed": false,
        "gridPos": {
          "h": 1,
          "w": 24,
          "x": 0,
          "y": 71
        },
        "id": 120,
        "panels": [],
        "title": "Spot interruption",
        "type": "row"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "palette-classic"
            },
            "custom": {
              "axisBorderShow": false,
              "axisCenteredZero": false,
              "axisColorMode": "text",
              "axisLabel": "",
              "axisPlacement": "auto",
              "barAlignment": 0,
              "drawStyle": "bars",
              "fillOpacity": 0,
              "gradientMode": "none",
              "hideFrom": {
                "legend": false,
                "tooltip": false,
                "viz": false
              },
              "insertNulls": false,
              "lineInterpolation": "linear",
              "lineWidth": 1,
              "pointSize": 5,
              "scaleDistribution": {
                "type": "linear"
              },
              "showPoints": "auto",
              "spanNulls": false,
              "stacking": {
                "group": "A",
                "mode": "none"
              },
              "thresholdsStyle": {
                "mode": "off"
              }
            },
            "mappings": [],
            "min": 0,
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 24,
          "x": 0,
          "y": 72
        },
        "id": 137,
        "options": {
          "legend": {
            "calcs": [],
            "displayMode": "list",
            "placement": "bottom",
            "showLegend": true
          },
          "tooltip": {
            "mode": "single",
            "sort": "none"
          }
        },
        "pluginVersion": "10.2.2",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "sum(castai_node_spot_interruption{castai_cluster=\"$cluster_name\"}) by (node_template)",
            "instant": false,
            "legendFormat": "__auto",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Interruptions by template",
        "type": "timeseries"
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_EXAMPLE-PROM}"
        },
        "fieldConfig": {
          "defaults": {
            "color": {
              "mode": "thresholds"
            },
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "green",
                  "value": null
                }
              ]
            }
          },
          "overrides": []
        },
        "gridPos": {
          "h": 8,
          "w": 6,
          "x": 0,
          "y": 80
        },
        "id": 136,
        "maxPerRow": 6,
        "options": {
          "colorMode": "value",
          "graphMode": "area",
          "justifyMode": "auto",
          "orientation": "auto",
          "reduceOptions": {
            "calcs": [
              "sum"
            ],
            "fields": "",
            "values": false
          },
          "textMode": "auto",
          "wideLayout": true
        },
        "pluginVersion": "10.2.2",
        "repeat": "node_template",
        "repeatDirection": "h",
        "targets": [
          {
            "datasource": {
              "type": "prometheus",
              "uid": "${DS_EXAMPLE-PROM}"
            },
            "editorMode": "code",
            "expr": "castai_node_spot_interruption{castai_cluster=\"$cluster_name\", node_template=\"$node_template\"}",
            "instant": false,
            "interval": "",
            "legendFormat": "interruptions",
            "range": true,
            "refId": "A"
          }
        ],
        "title": "Total interruptions in [$node_template]",
        "type": "stat"
      }
    ],
    "refresh": "5m",
    "schemaVersion": 38,
    "tags": [],
    "templating": {
      "list": [
        {
          "current": {},
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_EXAMPLE-PROM}"
          },
          "definition": "label_values(castai_cluster_provisioned_cpu_cores,castai_cluster)",
          "hide": 0,
          "includeAll": false,
          "label": "cluster",
          "multi": false,
          "name": "cluster_name",
          "options": [],
          "query": {
            "qryType": 1,
            "query": "label_values(castai_cluster_provisioned_cpu_cores,castai_cluster)",
            "refId": "PrometheusVariableQueryEditor-VariableQuery"
          },
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "sort": 0,
          "type": "query"
        },
        {
          "current": {
            "selected": false,
            "text": "on_demand",
            "value": "on_demand"
          },
          "hide": 2,
          "includeAll": false,
          "multi": false,
          "name": "lifecycle",
          "options": [
            {
              "selected": true,
              "text": "on_demand",
              "value": "on_demand"
            },
            {
              "selected": false,
              "text": "spot",
              "value": "spot"
            },
            {
              "selected": false,
              "text": "spot_fallback",
              "value": "spot_fallback"
            }
          ],
          "query": "on_demand, spot, spot_fallback",
          "queryValue": "",
          "skipUrlSync": false,
          "type": "custom"
        },
        {
          "current": {},
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_EXAMPLE-PROM}"
          },
          "definition": "label_values(castai_node_provisioned_cpu_cores{castai_cluster=\"$cluster_name\"},node_template)",
          "hide": 0,
          "includeAll": true,
          "multi": true,
          "name": "node_template",
          "options": [],
          "query": {
            "qryType": 1,
            "query": "label_values(castai_node_provisioned_cpu_cores{castai_cluster=\"$cluster_name\"},node_template)",
            "refId": "PrometheusVariableQueryEditor-VariableQuery"
          },
          "refresh": 1,
          "regex": "",
          "skipUrlSync": false,
          "sort": 0,
          "type": "query"
        }
      ]
    },
    "time": {
      "from": "now-6h",
      "to": "now"
    },
    "timepicker": {},
    "timezone": "",
    "title": "CAST AI Example",
    "uid": "_fUL-dBIz",
    "version": 29,
    "weekStart": ""
  }