Grafana dashboard: Locust requests table
Description: Table of locust requests

See [Locust dashboard](https://grafana.com/grafana/dashboards/10878) for more details

{
  "__inputs": [
    {
      "name": "DS_LOCUST",
      "label": "locust",
      "description": "",
      "type": "datasource",
      "pluginId": "postgres",
      "pluginName": "PostgreSQL"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.2.1"
    },
    {
      "type": "datasource",
      "id": "postgres",
      "name": "PostgreSQL",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "${DS_LOCUST}",
        "enable": false,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Events",
        "rawQuery": "",
        "showIn": 0,
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 14423,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1638529229750,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": "${DS_LOCUST}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "time"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "time"
              },
              {
                "id": "unit",
                "value": "time: HH:mm:ss.SSS"
              },
              {
                "id": "custom.align",
                "value": null
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "request name"
            },
            "properties": [
              {
                "id": "unit",
                "value": "short"
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.align",
                "value": null
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "request_id"
            },
            "properties": [
              {
                "id": "unit",
                "value": "short"
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "links",
                "value": [
                  {
                    "targetBlank": false,
                    "title": "",
                    "url": "/explore?orgId=1&left=[\"${__from}\",\"${__to}\",\"Loki\",{\"expr\":\"{deployment_environment=\\\"${__data.fields.env}\\\"} != \\\"monitor\\\" | logfmt |= \\\"requestId=${__data.fields.request_id}\\\"\"}]&right=[\"${__from}\",\"${__to}\",\"Tempo\",{\"query\":\"\"}]"
                  }
                ]
              },
              {
                "id": "custom.align",
                "value": null
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "env"
            },
            "properties": [
              {
                "id": "unit",
                "value": "short"
              },
              {
                "id": "decimals",
                "value": 2
              },
              {
                "id": "custom.align",
                "value": null
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "request_id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 285
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 100
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "response_time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 110
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "url"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 500
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "env"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 60
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "response_time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 127
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 33,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 4,
      "interval": "10ms",
      "links": [],
      "options": {
        "showHeader": true
      },
      "pluginVersion": "8.2.1",
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT name, time, response_time, exception, context ->> 'ssn' as ssn,context ->> 'account_id' as account_id, context ->> 'env' as env, context ->> 'request_id' as request_id, url \nFROM \"request\" \nWHERE $__timeFilter(time) and \n      testplan = '$testplan' and (exception is not null or not $only_errors)\nORDER BY time DESC",
          "refId": "B",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "column"
              }
            ]
          ],
          "timeColumn": "time",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Requests",
      "transformations": [
        {
          "id": "merge",
          "options": {
            "reducers": []
          }
        }
      ],
      "transparent": true,
      "type": "table"
    }
  ],
  "refresh": "",
  "schemaVersion": 31,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_LOCUST}",
        "definition": "SELECT DISTINCT testplan FROM request WHERE $__timeFilter(time)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "testplan",
        "options": [],
        "query": "SELECT DISTINCT testplan FROM request WHERE $__timeFilter(time)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {
          "selected": false,
          "text": "false",
          "value": "false"
        },
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "only_errors",
        "options": [
          {
            "selected": true,
            "text": "false",
            "value": "false"
          },
          {
            "selected": false,
            "text": "true",
            "value": "true"
          }
        ],
        "query": "false,true",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Locust requests table",
  "uid": "_GvzbmtMk",
  "version": 57,
  "description": "Table of locust requests"
}