Grafana dashboard: CF ORG Overview
Description: CF Org Overview @springernature engineering-enablement By: Naveen Goswami

Dashboard require cf_exporter and firehose_exporter, we tested it with [Prometheus bosh-releasse](https://github.com/bosh-prometheus/prometheus-boshrelease)

{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.1.2"
    },
    {
      "type": "panel",
      "id": "grafana-piechart-panel",
      "name": "Pie Chart",
      "version": "1.3.6"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "yesoreyeram-boomtable-panel",
      "name": "Boom Table",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 10066,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1555504217749,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "rgba(112, 103, 95, 0.89)",
        "rgba(112, 103, 95, 0.89)",
        "rgba(112, 103, 95, 0.89)"
      ],
      "decimals": null,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 12,
        "x": 0,
        "y": 0
      },
      "id": 17,
      "interval": "",
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "quota_name",
      "targets": [
        {
          "expr": "min(cf_organization_info{organization_name=\"$OrgName\"}) by (quota_name)",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": "40,85",
      "timeFrom": null,
      "timeShift": null,
      "title": "Quota Name",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#FA6400",
        "#73BF69",
        "#d44a3a"
      ],
      "decimals": null,
      "format": "percent",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 12,
        "x": 12,
        "y": 0
      },
      "id": 12,
      "interval": "",
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "avg((sum(min(firehose_container_metric_memory_bytes/1024/1024) by (instance_index, application_id)) by (application_id) / on(application_id) group_right(space_name) (cf_application_memory_mb{organization_name=\"$OrgName\"} * on (application_id) group_left(space_name) sum(cf_application_instances) by (application_id)))*100) by (organization_name)",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "thresholds": "40,85",
      "timeFrom": null,
      "timeShift": null,
      "title": "Average assigned memory utilization",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#73BF69",
        "rgba(112, 103, 95, 0.89)",
        "rgba(112, 103, 95, 0.89)"
      ],
      "decimals": null,
      "format": "decmbytes",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 12,
        "x": 0,
        "y": 2
      },
      "id": 16,
      "interval": "",
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "cf_organization_total_memory_mb_quota{organization_name=\"$OrgName\"}*(1000/1024)",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "thresholds": "1,100000",
      "timeFrom": null,
      "timeShift": null,
      "title": "Total memory quota",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#73BF69",
        "rgba(112, 103, 95, 0.89)",
        "#d44a3a"
      ],
      "decimals": null,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 12,
        "x": 12,
        "y": 2
      },
      "id": 10,
      "interval": "",
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(cf_application_info{organization_name=\"$OrgName\", state=\"STARTED\"}) by (organization_name)",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "thresholds": "1,1000000",
      "timeFrom": null,
      "timeShift": null,
      "title": "Number of applications active",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#C4162A",
        "#FF9830",
        "#37872D"
      ],
      "decimals": null,
      "description": "Scale the quota when turned red",
      "format": "percent",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 12,
        "x": 0,
        "y": 4
      },
      "id": 15,
      "interval": "",
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "100-sum(cf_application_memory_mb{organization_name=\"$OrgName\"} * on (application_id) group_right(space_name) sum(cf_application_instances{state=\"STARTED\"}) by (application_id)) / min(cf_organization_total_memory_mb_quota{organization_name=\"$OrgName\"}*(1000/1024)) * 100",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "thresholds": "10,15",
      "timeFrom": null,
      "timeShift": null,
      "title": "Total memory quota left",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "rgba(112, 103, 95, 0.89)",
        "rgba(112, 103, 95, 0.89)",
        "rgba(112, 103, 95, 0.89)"
      ],
      "format": "decmbytes",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 12,
        "x": 12,
        "y": 4
      },
      "id": 6,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(cf_application_memory_mb{organization_name=\"$OrgName\"} * on (application_id) group_right(space_name) sum(cf_application_instances{state=\"STARTED\"}) by (application_id)) ",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "refId": "A"
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Total Memory Assigned",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "avg"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "fontSize": "80%",
      "format": "decmbytes",
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 0,
        "y": 6
      },
      "id": 4,
      "interval": null,
      "legend": {
        "show": true,
        "sortDesc": true,
        "values": true
      },
      "legendType": "Right side",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "pieType": "donut",
      "pluginVersion": "6.1.2",
      "strokeWidth": 1,
      "targets": [
        {
          "expr": "sort_desc(sum(cf_application_memory_mb{organization_name=\"$OrgName\"} * on (application_id) group_right(space_name) sum(cf_application_instances{state=\"STARTED\"}) by (application_id)) by (space_name))",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "{{space_name}}",
          "refId": "A"
        },
        {
          "expr": "",
          "format": "table",
          "instant": true,
          "intervalFactor": 1,
          "refId": "B"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Memory Assigned per space",
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "fontSize": "70%",
      "format": "short",
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 12,
        "y": 6
      },
      "id": 11,
      "interval": null,
      "legend": {
        "percentage": false,
        "show": true,
        "values": true
      },
      "legendType": "Right side",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "pieType": "donut",
      "strokeWidth": 1,
      "targets": [
        {
          "expr": "sort_desc(sum(cf_application_info{organization_name=\"$OrgName\", state=\"STARTED\"}) by (space_name))",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "{{space_name}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Number of applications per space",
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
      "activePatternIndex": 0,
      "defaultPattern": {
        "bgColors": "green|red|red",
        "bgColors_overrides": "0->green|2->red|1->yellow",
        "clickable_cells_link": "",
        "col_name": "number of dead instances",
        "decimals": 2,
        "delimiter": ".",
        "enable_bgColor": true,
        "enable_bgColor_overrides": false,
        "enable_clickable_cells": false,
        "enable_textColor": false,
        "enable_textColor_overrides": false,
        "enable_time_based_thresholds": false,
        "enable_transform": false,
        "enable_transform_overrides": false,
        "filter": {
          "value_above": "",
          "value_below": ""
        },
        "format": "none",
        "name": "Default Pattern",
        "null_color": "",
        "null_textcolor": "o",
        "null_value": "No data",
        "pattern": "*",
        "row_col_wrapper": "_",
        "row_name": "_series_",
        "textColors": "red|orange|green",
        "textColors_overrides": "0->red|2->green|1->yellow",
        "thresholds": "1,100",
        "time_based_thresholds": [],
        "tooltipTemplate": "Series : _series_ <br/>Row Name : _row_name_ <br/>Col Name : _col_name_ <br/>Value : _value_",
        "transform_values": "_value_|_value_|_value_",
        "transform_values_overrides": "0->down|1->up",
        "valueName": "avg"
      },
      "default_title_for_rows": "application_name",
      "description": "No Data is good ;) here. Shows application whose desired number of instance are greater than number of running instances",
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 0,
        "y": 19
      },
      "hide_first_column": false,
      "hide_headers": false,
      "id": 14,
      "links": [],
      "patterns": [],
      "row_col_wrapper": "_",
      "targets": [
        {
          "expr": "min(cf_application_instances{organization_name=~\"$OrgName\", state=\"STARTED\"} - cf_application_instances_running{organization_name=~\"engineering-enablement\"}>0) by (application_name, space_name)",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "{{space_name}}/{{application_name}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "#Number of desired instances != #Number of running instances ",
      "type": "yesoreyeram-boomtable-panel"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "fontSize": "70%",
      "format": "short",
      "gridPos": {
        "h": 13,
        "w": 12,
        "x": 12,
        "y": 19
      },
      "id": 2,
      "interval": null,
      "legend": {
        "percentage": false,
        "show": true,
        "values": true
      },
      "legendType": "On graph",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "pieType": "donut",
      "strokeWidth": 1,
      "targets": [
        {
          "expr": "sum(cf_application_info{organization_name=\"$OrgName\"}) by (state)",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 1,
          "legendFormat": "{{state}}",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Number of apps started vs stopped",
      "type": "grafana-piechart-panel",
      "valueName": "current"
    }
  ],
  "refresh": false,
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(cf_application_info, organization_name)",
        "hide": 0,
        "includeAll": false,
        "label": "OrgName",
        "multi": false,
        "name": "OrgName",
        "options": [],
        "query": "label_values(cf_application_info, organization_name)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(cf_application_info{organization_name=~\"$OrgName\",},organization_id)",
        "hide": 2,
        "includeAll": false,
        "label": "OrgId",
        "multi": false,
        "name": "OrgId",
        "options": [],
        "query": "label_values(cf_application_info{organization_name=~\"$OrgName\",},organization_id)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "CF ORG Overview",
  "uid": "zJaAADRWk",
  "version": 1,
  "description": "CF Org Overview @springernature engineering-enablement By: Naveen Goswami"
}