Grafana dashboard: baur 0.x
Description: build statistic dashboard for baur versions 0.x.

The dashboard visualizes build statistics from baur (<https://github.com/simplesurance/baur>).
The baur PostgreSQL database has to be added as Graphana Datasource to make it available to the dashboard.

The dashboard is only compatible with baur versions 0.x.x

{
  "__inputs": [
    {
      "name": "DS_POSTGRES-BAUR",
      "label": "postgres-baur",
      "description": "PostgreSQL database used by baur",
      "type": "datasource",
      "pluginId": "postgres",
      "pluginName": "PostgreSQL"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "5.3.0"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    },
    {
      "type": "datasource",
      "id": "postgres",
      "name": "PostgreSQL",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": "5.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": 8835,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 19,
      "panels": [],
      "title": "Build Time",
      "type": "row"
    },
    {
      "aliasColors": {
        "avg_duration_sec": "#1f78c1"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POSTGRES-BAUR}",
      "fill": 1,
      "gridPos": {
        "h": 7,
        "w": 11,
        "x": 0,
        "y": 1
      },
      "id": 4,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": true,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "time_series",
          "group": [],
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT date_trunc('day',build.stop_timestamp::timestamp::date) AS time, EXTRACT(epoch FROM AVG(build.stop_timestamp - build.start_timestamp)) AS avg \nFROM BUILD\nWHERE $__timeFilter(build.stop_timestamp) \nGROUP BY time\nORDER BY time",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Average  Application Build Time",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "dtdurations",
          "label": "Duration",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#629e51",
        "#e5ac0e",
        "#bf1b00"
      ],
      "datasource": "${DS_POSTGRES-BAUR}",
      "description": "Average Application Build Time in choosen time range",
      "format": "s",
      "gauge": {
        "maxValue": 300,
        "minValue": 0,
        "show": true,
        "thresholdLabels": true,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 7,
        "w": 3,
        "x": 12,
        "y": 1
      },
      "id": 11,
      "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": "date_part",
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "table",
          "group": [],
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select EXTRACT(epoch FROM AVG(build.stop_timestamp - build.start_timestamp)) from build WHERE $__timeFilter(build.stop_timestamp)",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "90,180",
      "title": "Avg. Application Build Time",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POSTGRES-BAUR}",
      "description": "By average build time",
      "fill": 1,
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 16,
        "y": 1
      },
      "id": 15,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": false,
        "total": false,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "intervalFactor": 1,
          "legendFormat": "",
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "\tSELECT application.name, EXTRACT(EPOCH FROM (AVG(build.stop_timestamp - build.start_timestamp))), $__time(current_date)\n\tFROM build\n\tJOIN application on build.application_id = application.id\n\tWHERE $__timeFilter(build.stop_timestamp)\n\tGROUP BY (application.name)\n\tORDER BY (AVG(build.stop_timestamp - build.start_timestamp)) DESC \n\tLIMIT 5",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 5 Application by Build Duration",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "format": "dtdurations",
          "label": "Duration",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 8
      },
      "id": 21,
      "panels": [],
      "title": "Build Count",
      "type": "row"
    },
    {
      "aliasColors": {
        "count": "#f4d598"
      },
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POSTGRES-BAUR}",
      "fill": 1,
      "gridPos": {
        "h": 7,
        "w": 11,
        "x": 0,
        "y": 9
      },
      "id": 7,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "hideZero": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": true,
        "values": true
      },
      "lines": false,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select date_trunc('hour', build.start_timestamp) AS time, count(build.id) from build join application ON application.id = build.application_id WHERE $__timeFilter(build.start_timestamp) GROUP BY time ORDER BY(time)",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Builds per Hour",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "none",
          "label": "Count",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "#fceaca",
        "#d44a3a"
      ],
      "datasource": "${DS_POSTGRES-BAUR}",
      "decimals": null,
      "description": "",
      "format": "short",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 7,
        "w": 3,
        "x": 12,
        "y": 9
      },
      "id": 13,
      "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": "count",
      "targets": [
        {
          "alias": "",
          "expr": "select count(id) from build WHERE date_trunc('day', build.stop_timestamp) = current_date  group by date_trunc('day', build.stop_timestamp);",
          "format": "table",
          "group": [],
          "instant": false,
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select count(id) from build",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "",
      "title": "Total Builds Completed",
      "type": "singlestat",
      "valueFontSize": "200%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POSTGRES-BAUR}",
      "fill": 1,
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 16,
        "y": 9
      },
      "id": 34,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "time_series",
          "group": [],
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT application.name, COUNT(application.name) AS builds, $__time(current_date) from build \n  JOIN application ON build.application_id = application.id\n\tWHERE $__timeFilter(build.stop_timestamp) \n\tGROUP BY(application.name) ORDER BY builds DESC LIMIT 5;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 5 Applications by Number of Builds",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "total"
        ]
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "label": "Number of Builds",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 16
      },
      "id": 23,
      "panels": [],
      "title": "Build Outputs",
      "type": "row"
    },
    {
      "aliasColors": {
        "build_count": "#6ed0e0",
        "output_size": "#f9d9f9",
        "sum": "#ef843c"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POSTGRES-BAUR}",
      "fill": 0,
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 17
      },
      "id": 25,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "build_count",
          "yaxis": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "time_series",
          "group": [],
          "hide": false,
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": " with data as (select sum(size_bytes) as bytes, date_trunc('hour', build.stop_timestamp) as time from output join build_output on build_output.output_id = output.id join build on build.id = build_output.build_id  WHERE $__timeFilter(build.stop_timestamp)  GROUP BY(date_trunc('hour',build.stop_timestamp))) select time, sum(bytes)  over(order by time asc rows between unbounded preceding and current row) AS output_size from data;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "alias": "",
          "format": "time_series",
          "hide": true,
          "rawSql": "WITH data AS (\n\tSELECT count(build.id) AS count,\n\tdate_trunc('hour', build.stop_timestamp) AS time\n\tFROM output JOIN build_output on build_output.output_id = output.id\n\tJOIN build ON build.id = build_output.build_id\n\tWHERE $__timeFilter(build.stop_timestamp) \n\tGROUP BY(date_trunc('hour',build.stop_timestamp)))\nSELECT time, sum(count) \nOVER(ORDER BY time ASC ROWS BETWEEN unbounded preceding AND\n\tCURRENT ROW) AS build_count FROM data;\n",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Build Outputs Produced",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "decbytes",
          "label": "Output Size",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "decimals": null,
          "format": "none",
          "label": "Number of Builds",
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "#ef843c",
        "#d44a3a"
      ],
      "datasource": "${DS_POSTGRES-BAUR}",
      "format": "decbytes",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 7,
        "w": 3,
        "x": 12,
        "y": 17
      },
      "id": 17,
      "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": "sum",
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "table",
          "group": [],
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select sum(size_bytes) from output join build_output on build_output.output_id = output.id join build on build.id = build_output.build_id ",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "",
      "title": "Total Builld Outputs Created",
      "type": "singlestat",
      "valueFontSize": "200%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "avg"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POSTGRES-BAUR}",
      "fill": 1,
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 16,
        "y": 17
      },
      "id": 32,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "time_series",
          "group": [],
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "WITH builds AS (\n  SELECT build.application_id AS application_id, build.id, SUM(output.size_bytes) AS bytes\n  FROM build \n  JOIN application ON application.id = build.application_id \n  JOIN build_output ON build_output.build_id = build.id \n  JOIN output ON output.id = build_output.output_id\n  WHERE $__timeFilter(build.stop_timestamp)\n  GROUP BY(build.id) \n  ORDER BY bytes\n)\n\nSELECT $__time(current_date), application.name, MAX(bytes) AS bytes FROM builds JOIN application ON application.id = application_id GROUP BY(application.name) ORDER BY bytes DESC LIMIT 5;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 5 Application by Build Output Size",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "series",
        "name": null,
        "show": true,
        "values": [
          "current"
        ]
      },
      "yaxes": [
        {
          "format": "decbytes",
          "label": "Output Size",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_POSTGRES-BAUR}",
      "fill": 0,
      "gridPos": {
        "h": 7,
        "w": 9,
        "x": 0,
        "y": 24
      },
      "id": 27,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": false,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "bps_s3",
          "yaxis": 1
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "time_series",
          "group": [],
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT output.type, AVG(output.size_bytes / ((upload.upload_duration_ns::float / 1000000000))), date_trunc('hour', build.stop_timestamp) AS time\nFROM upload \nJOIN build_output ON build_output.id = upload.build_output_id \nJOIN output ON output.id = build_output.output_id\nJOIN build ON build.id = build_output.build_id\nWHERE $__timeFilter(build.stop_timestamp)\nGROUP BY (output.type, time)\nORDER BY time;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Build Output Upload Speed",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "Bps",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_POSTGRES-BAUR}",
      "format": "Bps",
      "gauge": {
        "maxValue": null,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 7,
        "w": 3,
        "x": 9,
        "y": 24
      },
      "id": 30,
      "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": "avg",
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "table",
          "group": [],
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT AVG(output.size_bytes / ((upload.upload_duration_ns::float / 1000000000))), date_trunc('hour', build.stop_timestamp) AS time\nFROM upload \nJOIN build_output ON build_output.id = upload.build_output_id \nJOIN output ON output.id = build_output.output_id\nJOIN build ON build.id = build_output.build_id\nWHERE output.type = 'docker'\nAND $__timeFilter(build.stop_timestamp)\nGROUP BY (time)\nORDER BY time;\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "10485760,1048576",
      "title": "Docker Upload Speed",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "avg"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_POSTGRES-BAUR}",
      "format": "Bps",
      "gauge": {
        "maxValue": null,
        "minValue": 0,
        "show": true,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 7,
        "w": 3,
        "x": 12,
        "y": 24
      },
      "id": 29,
      "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": "avg",
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "table",
          "group": [],
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT AVG(output.size_bytes / ((upload.upload_duration_ns::float / 1000000000))), date_trunc('hour', build.stop_timestamp) AS time\nFROM upload \nJOIN build_output ON build_output.id = upload.build_output_id \nJOIN output ON output.id = build_output.output_id\nJOIN build ON build.id = build_output.build_id\nWHERE output.type = 's3'\nAND $__timeFilter(build.stop_timestamp)\nGROUP BY (time)\nORDER BY time;\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": "10485760,1048576",
      "title": "S3 Upload Speed",
      "type": "singlestat",
      "valueFontSize": "50%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "avg"
    },
    {
      "columns": [],
      "datasource": "${DS_POSTGRES-BAUR}",
      "fontSize": "100%",
      "gridPos": {
        "h": 7,
        "w": 4,
        "x": 16,
        "y": 24
      },
      "id": 36,
      "links": [],
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 0,
        "desc": true
      },
      "styles": [
        {
          "alias": "",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "",
          "type": "date"
        }
      ],
      "targets": [
        {
          "alias": "",
          "expr": "",
          "format": "table",
          "group": [],
          "intervalFactor": 1,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT application.name, to_char(build.start_timestamp, 'HH:MM:SS DD.MM.YYYY TZ') AS build_start_time from build \n  JOIN application ON build.application_id = application.id\n\tWHERE $__timeFilter(build.start_timestamp) \n ORDER BY build.start_timestamp DESC LIMIT 5;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Last Build Applications",
      "transform": "table",
      "type": "table"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 16,
  "style": "dark",
  "tags": [
    "baur",
    "build",
    "ci"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-7d",
    "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": "browser",
  "title": "baur 0.x",
  "uid": "hfq-pm5mz",
  "version": 22,
  "description": "build statistic dashboard for baur versions 0.x."
}