Grafana dashboard: Exec Kubernetes Cost Report

High level Exec Kubernetes Cost Report, 

-   Exec Kubernetes Cost Report
    
    -   Cluster
        
        -   Daily Cost
            
        -   Estimated Monthly Cost (Based on last 3 Days)
            
    -   Namespace Resources Requested
        
        -   Top 6 Resource Requests Daily Cost
            
        -   Top 6 CPU Resource Requests Daily Cost
            
        -   Top 6 Memory Requests Daily Cost
            
        -   Top 10 Resource Requests Daily Cost Per Pod
            
        -   Top 6 Disk Monthly Cost
            
    -   Namespace Resources Used
        
        -   Top 6 Usage Daily Cost
            
        -   Top 6 CPU Usage Daily Cost
            
        -   Top 6 Memory Usage Daily Cost
            
        -   Top 10 Usage Daily Cost Per Pod

{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.3.1"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "links": [],
  "liveNow": true,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 9,
      "panels": [],
      "title": "Cluster",
      "type": "row"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 1
      },
      "id": 2,
      "interval": "1h",
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "8.3.1",
      "targets": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "exemplar": false,
          "expr": "sum(\n  sum_over_time(\n    (\n    capacity_instance:spot_instance_cost:cost \n    OR \n    capacity_instance:on_demand_instance_cost:cost\n    )\n  [1d:1h])\n)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "Cost",
          "refId": "A"
        }
      ],
      "title": "Daily Cost ",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "Time"
          }
        }
      ],
      "type": "gauge"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 0
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 1
      },
      "id": 5,
      "interval": "1h",
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "8.3.1",
      "targets": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "exemplar": false,
          "expr": "sum(\n  sum_over_time(\n    (\n    capacity_instance:spot_instance_cost:cost \n    OR \n    capacity_instance:on_demand_instance_cost:cost\n    )\n  [3d:1h])\n)*10",
          "instant": true,
          "interval": "",
          "legendFormat": "Cost",
          "refId": "A"
        }
      ],
      "title": "Estimated Monthly Cost (Based on last 3 Days)",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "Time"
          }
        }
      ],
      "type": "gauge"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 10
      },
      "id": 11,
      "panels": [],
      "title": "Namespace Resources Requested",
      "type": "row"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "fillOpacity": 80,
            "gradientMode": "opacity",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 11
      },
      "id": 13,
      "options": {
        "barWidth": 0.97,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "table",
          "placement": "bottom"
        },
        "orientation": "auto",
        "showValue": "always",
        "stacking": "none",
        "tooltip": {
          "mode": "single"
        },
        "xTickLabelRotation": 0
      },
      "targets": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "exemplar": false,
          "expr": "topk(6,\n  sum_over_time(\n      sum by (namespace) (\n          # See description for label_replace\n          label_replace(\n            zone_capacity_instance_namespace_node_pod:pod_cpu_requests_instance_cpu_price:spot_pod_cpu_requests_cost\n            OR\n            capacity_instance_namespace_node_pod:pod_cpu_requests_instance_cpu_price:on_demand_pod_cpu_requests_cost\n          , \"resource\", \"CPU\", \"\",\"\")\n          \n          OR \n          \n          label_replace(\n            zone_capacity_instance_namespace_node_pod:pod_memory_requests_instance_mem_price:spot_pod_mem_requests_cost\n            OR\n            capacity_instance_namespace_node_pod:pod_memory_requests_instance_mem_price:on_demand_pod_mem_requests_cost\n          , \"resource\", \"memory\", \"\",\"\")\n\n    )\n  [1d:1h])\n)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Top 6 Resource Requests Daily Cost ",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "Time"
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Value #A"
              }
            ]
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Value #A": "Cost"
            }
          }
        }
      ],
      "type": "barchart"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "fillOpacity": 80,
            "gradientMode": "opacity",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 20
      },
      "id": 7,
      "options": {
        "barWidth": 0.97,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "table",
          "placement": "bottom"
        },
        "orientation": "auto",
        "showValue": "always",
        "stacking": "none",
        "tooltip": {
          "mode": "single"
        },
        "xTickLabelRotation": 0
      },
      "targets": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "exemplar": false,
          "expr": "topk(6,\n  sum_over_time(\n      sum by (namespace) (\n        zone_capacity_instance_namespace_node_pod:pod_cpu_requests_instance_cpu_price:spot_pod_cpu_requests_cost\n        OR\n        capacity_instance_namespace_node_pod:pod_cpu_requests_instance_cpu_price:on_demand_pod_cpu_requests_cost\n    )\n  [1d:1h])\n)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Top 6 CPU Resource Requests Daily Cost ",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "Time"
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Value #A"
              }
            ]
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Value #A": "Cost"
            }
          }
        }
      ],
      "type": "barchart"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "fillOpacity": 80,
            "gradientMode": "opacity",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 20
      },
      "id": 15,
      "options": {
        "barWidth": 0.97,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "table",
          "placement": "bottom"
        },
        "orientation": "auto",
        "showValue": "always",
        "stacking": "none",
        "tooltip": {
          "mode": "single"
        },
        "xTickLabelRotation": 0
      },
      "targets": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "exemplar": false,
          "expr": "topk(6,\n  sum_over_time(\n      sum by (namespace) (        \n        zone_capacity_instance_namespace_node_pod:pod_memory_requests_instance_mem_price:spot_pod_mem_requests_cost\n        OR\n        capacity_instance_namespace_node_pod:pod_memory_requests_instance_mem_price:on_demand_pod_mem_requests_cost\n    )\n  [1d:1h])\n)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Top 6 Memory Requests Daily Cost ",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "Time"
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Value #A"
              }
            ]
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Value #A": "Cost"
            }
          }
        }
      ],
      "type": "barchart"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "hidden",
            "axisSoftMin": 0,
            "fillOpacity": 80,
            "gradientMode": "opacity",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 28
      },
      "id": 18,
      "options": {
        "barWidth": 0.97,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "table",
          "placement": "bottom"
        },
        "orientation": "horizontal",
        "showValue": "always",
        "stacking": "none",
        "tooltip": {
          "mode": "single"
        },
        "xTickLabelRotation": 0
      },
      "targets": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "exemplar": false,
          "expr": "topk(10,\nsum_over_time(\n    sum by (pod) (\n        # See description for label_replace\n        label_replace(\n\t\t    zone_capacity_instance_namespace_node_pod:pod_cpu_requests_instance_cpu_price:spot_pod_cpu_requests_cost\n            OR\n            capacity_instance_namespace_node_pod:pod_cpu_requests_instance_cpu_price:on_demand_pod_cpu_requests_cost\n        , \"resource\", \"CPU\", \"\",\"\")\n        \n        OR \n        \n        label_replace(\n\t\t    zone_capacity_instance_namespace_node_pod:pod_memory_requests_instance_mem_price:spot_pod_mem_requests_cost\n            OR\n            capacity_instance_namespace_node_pod:pod_memory_requests_instance_mem_price:on_demand_pod_mem_requests_cost\n        , \"resource\", \"memory\", \"\",\"\")\n\n\t)\n[1d:1h])\n)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "{{pod}}",
          "refId": "A"
        }
      ],
      "title": "Top 10 Resource Requests Daily Cost per Pod",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "Time"
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Value #A"
              }
            ]
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "label_beta_kubernetes_io_instance_type": true,
              "label_eks_amazonaws_com_capacity_type": true
            },
            "indexByName": {},
            "renameByName": {
              "Value #A": "Cost",
              "label_eks_amazonaws_com_capacity_type": "",
              "pod": ""
            }
          }
        }
      ],
      "type": "barchart"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "fillOpacity": 80,
            "gradientMode": "opacity",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 37
      },
      "id": 17,
      "options": {
        "barWidth": 0.97,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "table",
          "placement": "bottom"
        },
        "orientation": "auto",
        "showValue": "always",
        "stacking": "none",
        "tooltip": {
          "mode": "single"
        },
        "xTickLabelRotation": 0
      },
      "targets": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "exemplar": false,
          "expr": "topk(6,sum by (namespace) (sum by (persistentvolumeclaim,namespace) (kubelet_volume_stats_capacity_bytes/1024/1024/1024) * 0.089))",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Top 6 Disk Monthly Cost",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "Time"
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Value #A"
              }
            ]
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Value #A": "Cost"
            }
          }
        }
      ],
      "type": "barchart"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 46
      },
      "id": 21,
      "panels": [
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "axisSoftMin": 0,
                "fillOpacity": 80,
                "gradientMode": "opacity",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineWidth": 1
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "currencyUSD"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 47
          },
          "id": 16,
          "options": {
            "barWidth": 0.97,
            "groupWidth": 0.7,
            "legend": {
              "calcs": [],
              "displayMode": "table",
              "placement": "bottom"
            },
            "orientation": "auto",
            "showValue": "always",
            "stacking": "none",
            "tooltip": {
              "mode": "single"
            },
            "xTickLabelRotation": 0
          },
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "exemplar": false,
              "expr": "topk(6,\n  sum_over_time(\n      sum by (namespace) (\n          # See description for label_replace\n          label_replace(\n          zone_capacity_instance_namespace_node_pod:pod_cpu_usage_instance_cpu_price:spot_pod_cpu_usage_cost\n              OR\n              capacity_instance_namespace_node_pod:pod_cpu_usage_instance_cpu_price:on_demand_pod_cpu_usage_cost\n          , \"resource\", \"CPU\", \"\",\"\")\n          \n          OR \n          \n          label_replace(\n          zone_capacity_instance_namespace_node_pod:pod_memory_usage_instance_mem_price:spot_pod_mem_usage_cost\n              OR\n              capacity_instance_namespace_node_pod:pod_memory_usage_instance_mem_price:on_demand_pod_mem_usage_cost\n          , \"resource\", \"memory\", \"\",\"\")\n\n    )\n  [1d:1h])\n)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "Top 6 Usage Daily Cost ",
          "transformations": [
            {
              "id": "seriesToColumns",
              "options": {
                "byField": "Time"
              }
            },
            {
              "id": "sortBy",
              "options": {
                "fields": {},
                "sort": [
                  {
                    "desc": true,
                    "field": "Value #A"
                  }
                ]
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {},
                "renameByName": {
                  "Value #A": "Cost"
                }
              }
            }
          ],
          "type": "barchart"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "axisSoftMin": 0,
                "fillOpacity": 80,
                "gradientMode": "opacity",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineWidth": 1
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "currencyUSD"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 56
          },
          "id": 12,
          "options": {
            "barWidth": 0.97,
            "groupWidth": 0.7,
            "legend": {
              "calcs": [],
              "displayMode": "table",
              "placement": "bottom"
            },
            "orientation": "auto",
            "showValue": "always",
            "stacking": "none",
            "tooltip": {
              "mode": "single"
            },
            "xTickLabelRotation": 0
          },
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "exemplar": false,
              "expr": "topk(6,\n  sum_over_time(\n      sum by (namespace) (\n          zone_capacity_instance_namespace_node_pod:pod_cpu_usage_instance_cpu_price:spot_pod_cpu_usage_cost\n          OR\n          capacity_instance_namespace_node_pod:pod_cpu_usage_instance_cpu_price:on_demand_pod_cpu_usage_cost\n    )\n  [1d:1h])\n)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "Top 6 CPU Usage Daily Cost ",
          "transformations": [
            {
              "id": "seriesToColumns",
              "options": {
                "byField": "Time"
              }
            },
            {
              "id": "sortBy",
              "options": {
                "fields": {},
                "sort": [
                  {
                    "desc": true,
                    "field": "Value #A"
                  }
                ]
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {},
                "renameByName": {
                  "Value #A": "Cost"
                }
              }
            }
          ],
          "type": "barchart"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "auto",
                "axisSoftMin": 0,
                "fillOpacity": 80,
                "gradientMode": "opacity",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineWidth": 1
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "currencyUSD"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 12,
            "y": 56
          },
          "id": 14,
          "options": {
            "barWidth": 0.97,
            "groupWidth": 0.7,
            "legend": {
              "calcs": [],
              "displayMode": "table",
              "placement": "bottom"
            },
            "orientation": "auto",
            "showValue": "always",
            "stacking": "none",
            "tooltip": {
              "mode": "single"
            },
            "xTickLabelRotation": 0
          },
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "exemplar": false,
              "expr": "topk(6,\n  sum_over_time(\n      sum by (namespace) (\n          zone_capacity_instance_namespace_node_pod:pod_memory_usage_instance_mem_price:spot_pod_mem_usage_cost\n          OR\n          capacity_instance_namespace_node_pod:pod_memory_usage_instance_mem_price:on_demand_pod_mem_usage_cost\n    )\n  [1d:1h])\n)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "title": "Top 6 Memory Usage Daily Cost ",
          "transformations": [
            {
              "id": "seriesToColumns",
              "options": {
                "byField": "Time"
              }
            },
            {
              "id": "sortBy",
              "options": {
                "fields": {},
                "sort": [
                  {
                    "desc": true,
                    "field": "Value #A"
                  }
                ]
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {},
                "indexByName": {},
                "renameByName": {
                  "Value #A": "Cost"
                }
              }
            }
          ],
          "type": "barchart"
        },
        {
          "fieldConfig": {
            "defaults": {
              "color": {
                "mode": "palette-classic"
              },
              "custom": {
                "axisLabel": "",
                "axisPlacement": "hidden",
                "axisSoftMin": 0.02,
                "fillOpacity": 80,
                "gradientMode": "opacity",
                "hideFrom": {
                  "legend": false,
                  "tooltip": false,
                  "viz": false
                },
                "lineWidth": 1
              },
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green"
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "currencyUSD"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 64
          },
          "id": 19,
          "options": {
            "barWidth": 0.97,
            "groupWidth": 0.7,
            "legend": {
              "calcs": [],
              "displayMode": "table",
              "placement": "bottom"
            },
            "orientation": "horizontal",
            "showValue": "always",
            "stacking": "none",
            "text": {},
            "tooltip": {
              "mode": "single"
            },
            "xTickLabelRotation": 0
          },
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "exemplar": false,
              "expr": "topk(10,\n  sum_over_time(\n      sum by (pod) (\n          # See description for label_replace\n          label_replace(\n          zone_capacity_instance_namespace_node_pod:pod_cpu_usage_instance_cpu_price:spot_pod_cpu_usage_cost\n              OR\n              capacity_instance_namespace_node_pod:pod_cpu_usage_instance_cpu_price:on_demand_pod_cpu_usage_cost\n          , \"resource\", \"CPU\", \"\",\"\")\n          \n          OR \n          \n          label_replace(\n          zone_capacity_instance_namespace_node_pod:pod_memory_usage_instance_mem_price:spot_pod_mem_usage_cost\n              OR\n              capacity_instance_namespace_node_pod:pod_memory_usage_instance_mem_price:on_demand_pod_mem_usage_cost\n          , \"resource\", \"memory\", \"\",\"\")\n\n    )\n  [1d:1h])\n)",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "{{pod}}",
              "refId": "A"
            }
          ],
          "title": "Top 10 Usage Daily Cost per Pod",
          "transformations": [
            {
              "id": "seriesToColumns",
              "options": {
                "byField": "Time"
              }
            },
            {
              "id": "sortBy",
              "options": {
                "fields": {},
                "sort": [
                  {
                    "desc": true,
                    "field": "Value #A"
                  }
                ]
              }
            },
            {
              "id": "organize",
              "options": {
                "excludeByName": {
                  "label_beta_kubernetes_io_instance_type": true,
                  "label_eks_amazonaws_com_capacity_type": true
                },
                "indexByName": {},
                "renameByName": {
                  "Value #A": "Cost",
                  "label_eks_amazonaws_com_capacity_type": "",
                  "pod": ""
                }
              }
            }
          ],
          "type": "barchart"
        }
      ],
      "title": "Namespace Resources Used",
      "type": "row"
    }
  ],
  "refresh": "5m",
  "schemaVersion": 33,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "hidden": false
  },
  "timezone": "",
  "title": "Exec Kubernetes Cost Report",
  "uid": "ldZSL-T7rsafa",
  "version": 1,
  "weekStart": "",
  "gnetId": 15874
}