Grafana dashboard: Reporte Gatling g7
Description: Gatling statistics review


https://github.com/Poswark/Gatling-Grafana

We verify that the data has been injected into the influxdb database

 [root@gatling ]# docker exec -it  influxdb bash 
root@e0a5814f43cc:/# influx
Connected to http://localhost:8086 version 1.8.10
InfluxDB shell version: 1.8.10
> show databases 
name: databases
name
----
_internal
gatlingdb
> use gatlingdb
Using database gatlingdb
> show series
key
---
gatling,request=Home,simulation=demostore,status=all
gatling,request=Home,simulation=demostore,status=ko
gatling,request=Home,simulation=demostore,status=ok
gatling,request=allRequests,simulation=demostore,status=all
gatling,request=allRequests,simulation=demostore,status=ko
gatling,request=allRequests,simulation=demostore,status=ok
gatling.users,request=allUsers,simulation=demostore
gatling.users,request=demostore,simulation=demostore
 
Grafana dashboard for testing

Alt text

{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "gatlingdb",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.1.2"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "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,
  "gnetId": 15046,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1632450079276,
  "links": [],
  "panels": [
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 13,
        "w": 13,
        "x": 0,
        "y": 0
      },
      "id": 17,
      "options": {
        "frameIndex": 0,
        "showHeader": true
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "query": "SELECT sum(\"count\") AS \"KO\" FROM \"gatling\" WHERE (\"status\" = 'ko') AND $timeFilter GROUP BY \"simulation\",  \"request\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table"
        },
        {
          "hide": false,
          "query": "SELECT sum(\"count\") AS \"KO\" FROM \"gatling\" WHERE (\"status\" = 'ko') AND $timeFilter GROUP BY \"simulation\" , \"request\"",
          "rawQuery": true,
          "refId": "B"
        }
      ],
      "title": "Panel Title",
      "type": "table"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "__systemRef": "hideSeriesFrom",
            "matcher": {
              "id": "byNames",
              "options": {
                "mode": "exclude",
                "names": [
                  "gatling.95%"
                ],
                "prefix": "All except:",
                "readOnly": true
              }
            },
            "properties": [
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": false,
                  "tooltip": false,
                  "viz": true
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 13,
        "w": 11,
        "x": 13,
        "y": 0
      },
      "id": 19,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "targets": [
        {
          "query": "SELECT percentile(\"percentiles50\", 50) AS \"50%\", percentile(\"percentiles95\", 95) AS \"95%\", percentile(\"percentiles99\", 99) AS \"99%\", max(\"max\") AS \"max\", percentile(\"percentiles75\", 75) AS \"75%\", min(\"min\") AS \"min\"  FROM \"gatling\" WHERE (\"request\" = 'allRequests' AND \"status\" = 'ok' AND \"simulation\" =~ /^$simulation$/) AND $timeFilter GROUP BY time($__interval) fill(null)",
          "rawQuery": true,
          "refId": "A"
        },
        {
          "hide": false,
          "query": "SELECT sum(\"active\") FROM \"gatling.users\" WHERE (\"simulation\" =~ /^$simulation$/ AND \"request\" = 'allUsers') AND $timeFilter GROUP BY time($__interval), \"simulation\"",
          "rawQuery": true,
          "refId": "B"
        }
      ],
      "title": "Response Time Percentiles over Time (OK)",
      "type": "timeseries"
    },
    {
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": null,
            "displayMode": "auto",
            "width": 70
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "KO / Total"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "custom.width",
                "value": 200
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "percentage",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 10
                    },
                    {
                      "color": "#EF843C",
                      "value": 20
                    },
                    {
                      "color": "#E24D42",
                      "value": 30
                    }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "run"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 150
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "OK / Total"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "custom.width",
                "value": 198
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "percentage",
                  "steps": [
                    {
                      "color": "#e24d42",
                      "value": null
                    },
                    {
                      "color": "#EF843C",
                      "value": 70
                    },
                    {
                      "color": "#EAB839",
                      "value": 80
                    },
                    {
                      "color": "green",
                      "value": 90
                    }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Mean / median(Mean)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 200
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "max",
                "value": 1.6
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "blue",
                      "value": 0.7
                    },
                    {
                      "color": "red",
                      "value": 1.3
                    }
                  ]
                }
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "min",
                "value": 0.4
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Duration / median(Duration)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 200
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "blue",
                      "value": null
                    },
                    {
                      "color": "green",
                      "value": 0.7
                    },
                    {
                      "color": "red",
                      "value": 1.3
                    }
                  ]
                }
              },
              {
                "id": "max",
                "value": 1.6
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "min",
                "value": 0.4
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 4,
        "w": 24,
        "x": 0,
        "y": 13
      },
      "id": 10,
      "options": {
        "frameIndex": 1,
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "run"
          }
        ]
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "run"
              ],
              "type": "tag"
            }
          ],
          "measurement": "gatling",
          "orderByTime": "ASC",
          "policy": "$archive",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [
                  "OK"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "mean"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "Mean"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "mean"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  " / ${mean_median}"
                ],
                "type": "math"
              },
              {
                "params": [
                  "Mean / median(Mean)"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "request",
              "operator": "=",
              "value": "allRequests"
            },
            {
              "condition": "AND",
              "key": "status",
              "operator": "=",
              "value": "ok"
            },
            {
              "condition": "AND",
              "key": "simulation",
              "operator": "=~",
              "value": "/^$simulation$/"
            }
          ]
        },
        {
          "groupBy": [
            {
              "params": [
                "run"
              ],
              "type": "tag"
            }
          ],
          "hide": false,
          "measurement": "gatling",
          "orderByTime": "ASC",
          "policy": "$archive",
          "refId": "D",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [
                  "KO"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "request",
              "operator": "=",
              "value": "allRequests"
            },
            {
              "condition": "AND",
              "key": "status",
              "operator": "=",
              "value": "ko"
            },
            {
              "condition": "AND",
              "key": "simulation",
              "operator": "=~",
              "value": "/^$simulation$/"
            }
          ]
        },
        {
          "groupBy": [
            {
              "params": [
                "run"
              ],
              "type": "tag"
            }
          ],
          "hide": false,
          "measurement": "gatling",
          "orderByTime": "ASC",
          "policy": "$archive",
          "refId": "E",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [
                  "Total"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "request",
              "operator": "=",
              "value": "allRequests"
            },
            {
              "condition": "AND",
              "key": "status",
              "operator": "=",
              "value": "all"
            },
            {
              "condition": "AND",
              "key": "simulation",
              "operator": "=~",
              "value": "/^$simulation$/"
            }
          ]
        },
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT \"Duration\", \"Duration\" / ${duration_median} as \"Duration / median(Duration)\",  \"run\"\nFROM (\nSELECT SUM(\"e\") as \"Duration\" \nFROM\n(SELECT elapsed(\"count\", 1s) as \"e\" FROM \"$archive\".\"gatling\" WHERE (\"request\" = 'allRequests' AND \"simulation\" =~ /^$simulation$/ AND \"status\" = 'all') AND $timeFilter GROUP BY \"run\")\nGROUP BY  \"run\"\n)\n",
          "rawQuery": true,
          "refId": "B",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        },
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "events",
          "orderByTime": "ASC",
          "policy": "autogen",
          "refId": "C",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Test: %OK and %Fail ",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "run"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "KO": false,
              "Time": true,
              "Total": false
            },
            "indexByName": {
              "Duration": 6,
              "KO": 3,
              "Mean": 5,
              "Mean / max(Mean)": 7,
              "OK": 2,
              "Time": 0,
              "Total": 4,
              "run": 1
            },
            "renameByName": {}
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "",
            "binary": {
              "left": "OK",
              "operator": "/",
              "reducer": "sum",
              "right": "Total"
            },
            "mode": "binary",
            "reduce": {
              "reducer": "sum"
            },
            "replaceFields": false
          }
        },
        {
          "id": "calculateField",
          "options": {
            "binary": {
              "left": "KO",
              "operator": "/",
              "reducer": "sum",
              "right": "Total"
            },
            "mode": "binary",
            "reduce": {
              "include": [
                "Total"
              ],
              "reducer": "max"
            },
            "replaceFields": false
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "RPS",
            "binary": {
              "left": "Total",
              "operator": "/",
              "reducer": "sum",
              "right": "Duration"
            },
            "mode": "binary",
            "reduce": {
              "reducer": "sum"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "displayMode": "auto",
            "width": 100
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "KO / Total"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "custom.width",
                "value": 300
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "percentage",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 10
                    },
                    {
                      "color": "#EF843C",
                      "value": 20
                    },
                    {
                      "color": "#E24D42",
                      "value": 30
                    }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "run"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 51
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "OK / Total"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "custom.width",
                "value": 300
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "percentage",
                  "steps": [
                    {
                      "color": "#e24d42",
                      "value": null
                    },
                    {
                      "color": "#EF843C",
                      "value": 70
                    },
                    {
                      "color": "#EAB839",
                      "value": 80
                    },
                    {
                      "color": "green",
                      "value": 90
                    }
                  ]
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 4,
        "w": 20,
        "x": 0,
        "y": 17
      },
      "id": 6,
      "options": {
        "frameIndex": 1,
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "run"
          }
        ]
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "run"
              ],
              "type": "tag"
            }
          ],
          "measurement": "gatling",
          "orderByTime": "ASC",
          "policy": "$archive",
          "query": "SELECT sum(\"count\") AS \"OK\" FROM \"$archive\".\"gatling\" WHERE (\"request\" = 'allRequests' AND \"status\" = 'ok' AND \"simulation\" =~ /^$simulation$/) AND $timeFilter GROUP BY \"run\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [
                  "OK"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "request",
              "operator": "=",
              "value": "allRequests"
            },
            {
              "condition": "AND",
              "key": "status",
              "operator": "=",
              "value": "ok"
            },
            {
              "condition": "AND",
              "key": "simulation",
              "operator": "=~",
              "value": "/^$simulation$/"
            }
          ]
        },
        {
          "groupBy": [
            {
              "params": [
                "run"
              ],
              "type": "tag"
            }
          ],
          "hide": false,
          "measurement": "gatling",
          "orderByTime": "ASC",
          "policy": "$archive",
          "query": "SELECT sum(\"count\") AS \"KO\" FROM \"$archive\".\"gatling\" WHERE (\"request\" = 'allRequests' AND \"status\" = 'ko' AND \"simulation\" =~ /^$simulation$/) AND $timeFilter GROUP BY \"run\"",
          "rawQuery": true,
          "refId": "D",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [
                  "KO"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "request",
              "operator": "=",
              "value": "allRequests"
            },
            {
              "condition": "AND",
              "key": "status",
              "operator": "=",
              "value": "ko"
            },
            {
              "condition": "AND",
              "key": "simulation",
              "operator": "=~",
              "value": "/^$simulation$/"
            }
          ]
        },
        {
          "groupBy": [
            {
              "params": [
                "run"
              ],
              "type": "tag"
            }
          ],
          "hide": false,
          "measurement": "gatling",
          "orderByTime": "ASC",
          "policy": "$archive",
          "query": "SELECT sum(\"count\") AS \"Total\" FROM \"$archive\".\"gatling\" WHERE (\"request\" = 'allRequests' AND \"status\" = 'all' AND \"simulation\" =~ /^$simulation$/) AND $timeFilter GROUP BY \"run\"",
          "rawQuery": true,
          "refId": "E",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [
                  "Total"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "request",
              "operator": "=",
              "value": "allRequests"
            },
            {
              "condition": "AND",
              "key": "status",
              "operator": "=",
              "value": "all"
            },
            {
              "condition": "AND",
              "key": "simulation",
              "operator": "=~",
              "value": "/^$simulation$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Test: %OK and %Fail ",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "run"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "KO": false,
              "Time": true,
              "Total": false
            },
            "indexByName": {
              "KO": 3,
              "OK": 2,
              "Time": 0,
              "Total": 4,
              "run": 1
            },
            "renameByName": {}
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "",
            "binary": {
              "left": "OK",
              "operator": "/",
              "reducer": "sum",
              "right": "Total"
            },
            "mode": "binary",
            "reduce": {
              "reducer": "sum"
            },
            "replaceFields": false
          }
        },
        {
          "id": "calculateField",
          "options": {
            "binary": {
              "left": "KO",
              "operator": "/",
              "reducer": "sum",
              "right": "Total"
            },
            "mode": "binary",
            "reduce": {
              "include": [
                "Total"
              ],
              "reducer": "max"
            },
            "replaceFields": false
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "displayMode": "auto"
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Mean"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "auto"
              },
              {
                "id": "custom.align",
                "value": "left"
              },
              {
                "id": "custom.width",
                "value": 100
              },
              {
                "id": "unit",
                "value": "ms"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "run"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 150
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Mean / max(Mean)"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "max",
                "value": 1
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "percentage",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "#EAB839",
                      "value": 50
                    },
                    {
                      "color": "#E24D42",
                      "value": 80
                    }
                  ]
                }
              },
              {
                "id": "custom.width",
                "value": 300
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Mean / mean(Mean)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 300
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "blue",
                      "value": null
                    },
                    {
                      "color": "green",
                      "value": 0.5
                    },
                    {
                      "color": "#EAB839",
                      "value": 1
                    },
                    {
                      "color": "red",
                      "value": 1.5
                    }
                  ]
                }
              },
              {
                "id": "max",
                "value": 2
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Mean / median(Mean)"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 300
              },
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "max",
                "value": 2
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "blue",
                      "value": null
                    },
                    {
                      "color": "green",
                      "value": 0.5
                    },
                    {
                      "color": "#EAB839",
                      "value": 1
                    },
                    {
                      "color": "red",
                      "value": 1.5
                    }
                  ]
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 3,
        "w": 20,
        "x": 0,
        "y": 21
      },
      "id": 15,
      "options": {
        "frameIndex": 1,
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "run"
          }
        ]
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "run"
              ],
              "type": "tag"
            }
          ],
          "measurement": "gatling",
          "orderByTime": "ASC",
          "policy": "$archive",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "mean"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "Mean"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "mean"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  " / ${mean_max}"
                ],
                "type": "math"
              },
              {
                "params": [
                  "Mean / max(Mean)"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "mean"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  " / ${mean_mean}"
                ],
                "type": "math"
              },
              {
                "params": [
                  "Mean / mean(Mean)"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "mean"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  " / ${mean_median}"
                ],
                "type": "math"
              },
              {
                "params": [
                  "Mean / median(Mean)"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "request",
              "operator": "=",
              "value": "allRequests"
            },
            {
              "condition": "AND",
              "key": "status",
              "operator": "=",
              "value": "ok"
            },
            {
              "condition": "AND",
              "key": "simulation",
              "operator": "=~",
              "value": "/^$simulation$/"
            }
          ]
        },
        {
          "groupBy": [
            {
              "params": [
                "run"
              ],
              "type": "tag"
            }
          ],
          "hide": true,
          "measurement": "gatling",
          "orderByTime": "ASC",
          "policy": "$archive",
          "query": "SELECT mean(\"mean\") AS \"Mean\", mean(\"mean\")  / ${mean_max} AS \"Mean / max(Mean)\" FROM \"$archive\".\"gatling\" WHERE (\"request\" = 'allRequests' AND \"status\" = 'ok' AND \"simulation\" =~ /^$simulation$/) AND $timeFilter GROUP BY \"run\"",
          "rawQuery": true,
          "refId": "B",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "mean"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "Mean"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "mean"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  " / ${mean_max}"
                ],
                "type": "math"
              },
              {
                "params": [
                  "Mean / max(Mean)"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "request",
              "operator": "=",
              "value": "allRequests"
            },
            {
              "condition": "AND",
              "key": "status",
              "operator": "=",
              "value": "ok"
            },
            {
              "condition": "AND",
              "key": "simulation",
              "operator": "=~",
              "value": "/^$simulation$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Test Mean Time + Mean analitics",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "KO": false,
              "Time": true,
              "Total": false
            },
            "indexByName": {
              "KO": 4,
              "Mean": 2,
              "Mean / max(Mean)": 3,
              "Time": 0,
              "Total": 5,
              "run": 1
            },
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "",
  "schemaVersion": 30,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "InfluxDB",
          "value": "InfluxDB"
        },
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "data source",
        "multi": false,
        "name": "db",
        "options": [],
        "query": "influxdb",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW RETENTION POLICIES",
        "description": null,
        "error": {
          "message": "InfluxDB Error: database not found: gatlingdb"
        },
        "hide": 2,
        "includeAll": false,
        "label": "Retention policy (archive)",
        "multi": false,
        "name": "archive",
        "options": [],
        "query": "SHOW RETENTION POLICIES",
        "refresh": 1,
        "regex": "^autogen$",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW RETENTION POLICIES",
        "description": null,
        "error": {
          "message": "InfluxDB Error: database not found: gatlingdb"
        },
        "hide": 2,
        "includeAll": false,
        "label": "Retention policy (new)",
        "multi": false,
        "name": "new",
        "options": [],
        "query": "SHOW RETENTION POLICIES",
        "refresh": 1,
        "regex": "^(?!$archive$).*$",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SELECT DISTINCT(\"simulation\") FROM \n  (SELECT last(\"mean\") FROM \"$new\".\"gatling\" GROUP BY \"simulation\"),\n  (SELECT last(\"mean\") FROM \"$archive\".\"gatling\" GROUP BY \"simulation\")\nWHERE $timeFilter",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "Simulation",
        "multi": false,
        "name": "simulation",
        "options": [],
        "query": "SELECT DISTINCT(\"simulation\") FROM \n  (SELECT last(\"mean\") FROM \"$new\".\"gatling\" GROUP BY \"simulation\"),\n  (SELECT last(\"mean\") FROM \"$archive\".\"gatling\" GROUP BY \"simulation\")\nWHERE $timeFilter",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SELECT max(\"Mean\") FROM (\nSELECT mean(\"mean\") as \"Mean\"\n   FROM  \"autogen\".\"gatling\"\n   WHERE \"request\" = 'allRequests'\n         AND \"status\" = 'ok'\n         AND \"simulation\" =~ /^${simulation:regex}$/\n         AND $timeFilter\n   GROUP BY \"run\"\n)",
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "mean_max",
        "options": [],
        "query": "SELECT max(\"Mean\") FROM (\nSELECT mean(\"mean\") as \"Mean\"\n   FROM  \"autogen\".\"gatling\"\n   WHERE \"request\" = 'allRequests'\n         AND \"status\" = 'ok'\n         AND \"simulation\" =~ /^${simulation:regex}$/\n         AND $timeFilter\n   GROUP BY \"run\"\n)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SELECT mean(\"Mean\") FROM (\nSELECT mean(\"mean\") as \"Mean\"\n   FROM  \"autogen\".\"gatling\"\n   WHERE \"request\" = 'allRequests'\n         AND \"status\" = 'ok'\n         AND \"simulation\" =~ /^${simulation:regex}$/\n         AND $timeFilter\n   GROUP BY \"run\"\n)",
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "mean_mean",
        "options": [],
        "query": "SELECT mean(\"Mean\") FROM (\nSELECT mean(\"mean\") as \"Mean\"\n   FROM  \"autogen\".\"gatling\"\n   WHERE \"request\" = 'allRequests'\n         AND \"status\" = 'ok'\n         AND \"simulation\" =~ /^${simulation:regex}$/\n         AND $timeFilter\n   GROUP BY \"run\"\n)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SELECT median(\"Mean\") FROM (\nSELECT mean(\"mean\") as \"Mean\"\n   FROM  \"autogen\".\"gatling\"\n   WHERE \"request\" = 'allRequests'\n         AND \"status\" = 'ok'\n         AND \"simulation\" =~ /^${simulation:regex}$/\n         AND $timeFilter\n   GROUP BY \"run\"\n)",
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "mean_median",
        "options": [],
        "query": "SELECT median(\"Mean\") FROM (\nSELECT mean(\"mean\") as \"Mean\"\n   FROM  \"autogen\".\"gatling\"\n   WHERE \"request\" = 'allRequests'\n         AND \"status\" = 'ok'\n         AND \"simulation\" =~ /^${simulation:regex}$/\n         AND $timeFilter\n   GROUP BY \"run\"\n)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SELECT median(\"Duration\") FROM (\nSELECT SUM(\"e\") as \"Duration\" FROM\n(SELECT elapsed(\"count\", 1s) as \"e\" FROM \"gatling\" WHERE (\"request\" = 'allRequests' AND \"simulation\" =~ /^$simulation$/ AND \"status\" = 'all') AND $timeFilter GROUP BY \"run\")\nGROUP BY  \"run\"\n)",
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "duration_median",
        "options": [],
        "query": "SELECT median(\"Duration\") FROM (\nSELECT SUM(\"e\") as \"Duration\" FROM\n(SELECT elapsed(\"count\", 1s) as \"e\" FROM \"gatling\" WHERE (\"request\" = 'allRequests' AND \"simulation\" =~ /^$simulation$/ AND \"status\" = 'all') AND $timeFilter GROUP BY \"run\")\nGROUP BY  \"run\"\n)",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Reporte Gatling g7",
  "uid": "ipZe1pH7z",
  "version": 1,
  "description": "Gatling statistics review\r\n"
}