Grafana dashboard: Tableau de bord DSI
Description: GLPI Dashboard
Show somes informations on tickets


{
  "__inputs": [
    {
      "name": "DS_GLPI_- MYSQL",
      "label": "GLPI - MYSQL",
      "description": "",
      "type": "datasource",
      "pluginId": "mysql",
      "pluginName": "MySQL"
    },
    {
      "name": "VAR_URL_GLPI",
      "type": "constant",
      "label": "URL_GLPI",
      "value": "http://walle/",
      "description": ""
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.2.4"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph (old)",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "mysql",
      "name": "MySQL",
      "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"
      }
    ]
  },
  "description": "GLPI Dashboard\r\nShow somes informations on tickets",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 14377,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1637246327146,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "datasource": "${DS_GLPI_- MYSQL}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "center",
            "displayMode": "color-text",
            "filterable": true
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "nom catégorie"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "text": "0"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 8,
        "x": 0,
        "y": 0
      },
      "id": 17,
      "options": {
        "showHeader": true
      },
      "pluginVersion": "8.2.4",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "itilcategories_id"
              ],
              "type": "column"
            }
          ],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT glpi_itilcategories.completename as 'Nom catégorie',\ncount(DISTINCT glpi_tickets.name) as 'Nombre tickets' \nFROM glpi_tickets \ninner join glpi_itilcategories on glpi_tickets.itilcategories_id = glpi_itilcategories.id \nWHERE $__timeFilter(date) and glpi_tickets.is_deleted = '0' \nGroup by glpi_itilcategories.name \nORDER BY `Nombre tickets` DESC",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "id"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "glpi_tickets",
          "timeColumn": "date",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top catégorie des tickets",
      "type": "table"
    },
    {
      "datasource": "${DS_GLPI_- MYSQL}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlPu"
          },
          "custom": {
            "align": "center",
            "displayMode": "color-text",
            "filterable": true
          },
          "mappings": [],
          "min": -1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "nom catégorie"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "text": "0"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 8,
        "x": 8,
        "y": 0
      },
      "id": 21,
      "options": {
        "showHeader": true
      },
      "pluginVersion": "8.2.4",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "itilcategories_id"
              ],
              "type": "column"
            }
          ],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT glpi_itilcategories.completename as 'Nom catégorie',\ncount(DISTINCT glpi_tickets.name) as 'Nombre tickets' \nFROM glpi_tickets\ninner join glpi_itilcategories on glpi_tickets.itilcategories_id = glpi_itilcategories.id \nWHERE $__timeFilter(date) and glpi_tickets.is_deleted = '0'  and glpi_tickets.type = 2\nGroup by glpi_itilcategories.name \nORDER BY `Nombre tickets` DESC",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "id"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "glpi_tickets",
          "timeColumn": "date",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top catégorie des demandes",
      "type": "table"
    },
    {
      "datasource": "${DS_GLPI_- MYSQL}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlPu"
          },
          "custom": {
            "align": "center",
            "displayMode": "color-text",
            "filterable": true
          },
          "mappings": [],
          "min": -1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "nom catégorie"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "text": "0"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 8,
        "x": 16,
        "y": 0
      },
      "id": 20,
      "options": {
        "showHeader": true
      },
      "pluginVersion": "8.2.4",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "itilcategories_id"
              ],
              "type": "column"
            }
          ],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT glpi_itilcategories.completename as 'Nom catégorie',\ncount(DISTINCT glpi_tickets.name) as 'Nombre tickets' \nFROM glpi_tickets \ninner join glpi_itilcategories on glpi_tickets.itilcategories_id = glpi_itilcategories.id \nWHERE $__timeFilter(date) and glpi_tickets.is_deleted = '0'  and glpi_tickets.type = 1\nGroup by glpi_itilcategories.name \nORDER BY `Nombre tickets` DESC",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "id"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "glpi_tickets",
          "timeColumn": "date",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top catégorie des incidents",
      "type": "table"
    },
    {
      "datasource": "${DS_GLPI_- MYSQL}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": -1,
            "drawStyle": "line",
            "fillOpacity": 28,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 10,
            "pointSize": 19,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "always",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "string"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 12
      },
      "id": 27,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.1.2",
      "targets": [
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT COUNT(id) as \"Incidents\", date\r\nFROM glpi_tickets \r\nWHERE YEAR(date) = 2021 and is_deleted = 0 and type = 1\r\nGROUP BY MONTH(date) \r\nORDER BY date\r\n",
          "refId": "B",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_blacklists",
          "timeColumn": "date_mod",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT COUNT(id) as \"Demandes\", date \r\nFROM glpi_tickets  \r\nWHERE YEAR(date) = 2021 and is_deleted = 0 and type = 2\r\nGROUP BY MONTH(date) \r\nORDER BY date\r\n",
          "refId": "C",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_blacklists",
          "timeColumn": "date_mod",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT COUNT(id) as \"Sollicitations totales\", date_creation \r\nFROM glpi_tickets \r\nWHERE YEAR(date) = 2021 and is_deleted = 0\r\nGROUP BY MONTH(date) \r\nORDER BY date\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_blacklists",
          "timeColumn": "date_mod",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": "1y",
      "timeShift": null,
      "title": "Evolutions des incidents et des demandes",
      "transformations": [],
      "type": "timeseries"
    },
    {
      "datasource": "${DS_GLPI_- MYSQL}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": -1,
            "drawStyle": "line",
            "fillOpacity": 28,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 10,
            "pointSize": 19,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "always",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "string"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 12
      },
      "id": 26,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single"
        }
      },
      "pluginVersion": "8.1.2",
      "repeat": null,
      "targets": [
        {
          "format": "table",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT COUNT(id) as \"Incidents\", date_creation \r\nFROM glpi_tickets \r\nWHERE YEAR(date_creation) = 2021 and is_deleted = 0\r\nGROUP BY MONTH(date_creation) \r\nORDER BY date_creation\r\n",
          "refId": "B",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_blacklists",
          "timeColumn": "date_mod",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": "1y",
      "timeShift": null,
      "title": "Evolutions des solicitations",
      "transformations": [],
      "type": "timeseries"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_GLPI_- MYSQL}",
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 20
      },
      "hiddenSeries": false,
      "id": 23,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.2.4",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select \r\n@rownum := @rownum + 1 as \"Nombre d'incidents\",\r\ndate as time\r\nfrom glpi_tickets \r\ncross join (select @rownum := 0) r \r\nWHERE $__timeFilter(date) and type = 1 and glpi_tickets.is_deleted = '0' \r\norder by date\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_blacklists",
          "timeColumn": "date_mod",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select \r\n@rownum := @rownum + 1 as \"Nombre de demandes\",\r\ndate as time\r\nfrom glpi_tickets \r\ncross join (select @rownum := 0) r \r\nWHERE $__timeFilter(date) and type = 2 and glpi_tickets.is_deleted = '0' \r\norder by date\r\n",
          "refId": "B",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_blacklists",
          "timeColumn": "date_mod",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select \r\n@Total := @Total + 1 as Total,\r\ndate as time\r\nfrom glpi_tickets \r\ncross join (select @Total := 0) r \r\nWHERE $__timeFilter(date) and glpi_tickets.is_deleted = '0' \r\norder by date\r\n",
          "refId": "C",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_blacklists",
          "timeColumn": "date_mod",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": "1y",
      "timeRegions": [],
      "timeShift": null,
      "title": "Evolutions des tickets",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:98",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:99",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_GLPI_- MYSQL}",
      "description": "Nombre de postes gérés",
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 20
      },
      "hiddenSeries": false,
      "id": 24,
      "interval": "1y",
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": true,
        "hideEmpty": false,
        "hideZero": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.2.4",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "format": "time_series",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select \r\n@rownum := @rownum + 1 as \"Nombre de postes\",\r\ndate_creation as time\r\nfrom glpi_computers\r\ncross join (select @rownum := 0) r \r\nWHERE $__timeFilter(date_creation) and is_deleted = 0\r\norder by date_creation\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_blacklists",
          "timeColumn": "date_mod",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select \r\n@rownum := @rownum + 1 as \"Nombre d'utilisateurs\",\r\ndate_creation as time\r\nfrom glpi_users\r\ncross join (select @rownum := 0) r \r\nWHERE $__timeFilter(date_creation) and is_deleted = 0\r\norder by date_creation\r\n",
          "refId": "B",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_blacklists",
          "timeColumn": "date_mod",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": "3y",
      "timeRegions": [],
      "timeShift": null,
      "title": "Evolutions du parc informatique",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:98",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:99",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "${DS_GLPI_- MYSQL}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 28
      },
      "id": 19,
      "options": {
        "displayMode": "gradient",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": true
        },
        "showUnfilled": false,
        "text": {}
      },
      "pluginVersion": "8.2.4",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "type"
              ],
              "type": "column"
            }
          ],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\ncount(distinct id) as \"Nombre d'incidents\"\nFROM glpi_tickets\nWHERE\n  $__timeFilter(date) and type = 1 and is_deleted = 0\nGroup BY type",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "type"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_tickets",
          "timeColumn": "date_creation",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "format": "table",
          "group": [
            {
              "params": [
                "type"
              ],
              "type": "column"
            }
          ],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT\ncount(distinct id) as \"Nombre de demandes\"\nFROM glpi_tickets\nWHERE\n  $__timeFilter(date) and type = 2 and is_deleted = 0\nGroup BY type",
          "refId": "B",
          "select": [
            [
              {
                "params": [
                  "type"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_tickets",
          "timeColumn": "date_creation",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Incidents / Demandes",
      "type": "bargauge"
    },
    {
      "datasource": "${DS_GLPI_- MYSQL}",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "custom": {
            "align": "center",
            "displayMode": "color-text",
            "filterable": true
          },
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "string"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "nom catégorie"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "text": "0"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 28
      },
      "id": 25,
      "options": {
        "showHeader": true
      },
      "pluginVersion": "8.2.4",
      "targets": [
        {
          "format": "table",
          "group": [
            {
              "params": [
                "itilcategories_id"
              ],
              "type": "column"
            }
          ],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT glpi_requesttypes.name as 'Sources',\ncount(DISTINCT glpi_tickets.name) as 'Nombre tickets' \nFROM glpi_tickets\ninner join glpi_requesttypes on glpi_tickets.requesttypes_id = glpi_requesttypes.id \nWHERE $__timeFilter(date) and glpi_tickets.is_deleted = '0'\nGroup by glpi_requesttypes.name \nORDER BY `Nombre tickets` DESC",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              },
              {
                "params": [
                  "count"
                ],
                "type": "aggregate"
              },
              {
                "params": [
                  "id"
                ],
                "type": "alias"
              }
            ]
          ],
          "table": "glpi_tickets",
          "timeColumn": "date",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Sources des sollicitations",
      "type": "table"
    },
    {
      "datasource": "${DS_GLPI_- MYSQL}",
      "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": 9,
        "w": 24,
        "x": 0,
        "y": 36
      },
      "id": 29,
      "options": {
        "showHeader": true
      },
      "pluginVersion": "8.2.4",
      "targets": [
        {
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT DATE_FORMAT(t.date_creation, \"%d/%m/%Y %H:%i\") AS \"Date de création\",\r\ne.name AS \"Entité\",\r\nt.id as \"Numéro de ticket\",\r\nt.name AS \"Titre du ticket\",\r\nconcat(u.firstname,' ', u.realname) as \"Demandeur\",\r\nconcat(u2.firstname,' ', u2.realname) as \"Technicien\",\r\nCASE \r\n   WHEN t.status = 1 THEN 'Nouveau'\r\n   WHEN t.status = 2 THEN 'En cours (Attribué)'\r\n   WHEN t.status = 3 THEN 'En cours (Planifié)'\r\n   WHEN t.status = 4 THEN 'En attente'\r\n   WHEN t.status = 7 THEN 'Accepté'\r\n   WHEN t.status = 8 THEN 'Observé'\r\n   WHEN t.status = 9 THEN 'Evaluation'\r\n   WHEN t.status = 10 THEN 'Approuvé'\r\n   WHEN t.status = 11 THEN 'Test'\r\n   WHEN t.status = 12 THEN 'Qualifié'\r\nEND AS \"Statut\",\r\nCASE \r\n   WHEN t.priority = 1 THEN 'Très Basse'\r\n   WHEN t.priority = 2 THEN 'Basse'\r\n   WHEN t.priority = 3 THEN 'Moyenne'\r\n   WHEN t.priority = 4 THEN 'Haute'\r\n   WHEN t.priority = 5 THEN 'Très Haute'\r\nEND AS \"Priorité\"\r\nFROM glpi_tickets t\r\nLEFT OUTER JOIN glpi_entities e ON t.entities_id = e.id\r\nLEFT OUTER JOIN glpi_users u ON (u.id = (SELECT tu1.users_id FROM glpi_tickets_users tu1 WHERE tu1.tickets_id = t.id AND tu1.`type` = 1))\r\nLEFT OUTER JOIN glpi_users u2 ON (u2.id = (SELECT tu2.users_id FROM glpi_tickets_users tu2 WHERE tu2.tickets_id = t.id AND tu2.`type` = 2))\r\nWHERE (t.`status` <> 6 AND t.`status` <> 5)\r\nORDER BY t.date_mod DESC",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "glpi_blacklists",
          "timeColumn": "date_mod",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Tickets ouverts",
      "type": "table"
    }
  ],
  "refresh": "",
  "schemaVersion": 32,
  "style": "dark",
  "tags": [
    "GLPI MYSQL"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "GLPI API",
          "value": "GLPI API"
        },
        "description": null,
        "error": null,
        "hide": 2,
        "includeAll": false,
        "label": "GLPI Datasource",
        "multi": false,
        "name": "DS_GLPI",
        "options": [],
        "query": "ddurieux-glpi-datasource",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "description": null,
        "error": null,
        "hide": 2,
        "label": null,
        "name": "URL_GLPI",
        "query": "${VAR_URL_GLPI}",
        "skipUrlSync": false,
        "type": "constant",
        "current": {
          "value": "${VAR_URL_GLPI}",
          "text": "${VAR_URL_GLPI}",
          "selected": false
        },
        "options": [
          {
            "value": "${VAR_URL_GLPI}",
            "text": "${VAR_URL_GLPI}",
            "selected": false
          }
        ]
      }
    ]
  },
  "time": {
    "from": "now-2d",
    "to": "now"
  },
  "timepicker": {
    "nowDelay": "",
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "Tableau de bord DSI",
  "uid": "uxOO7EUGz",
  "version": 58
}