Skip to content

Instantly share code, notes, and snippets.

@olafbuitelaar
Last active April 14, 2021 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olafbuitelaar/d6ec23cb0f01b90503692f2f56d2ef48 to your computer and use it in GitHub Desktop.
Save olafbuitelaar/d6ec23cb0f01b90503692f2f56d2ef48 to your computer and use it in GitHub Desktop.
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 2,
"iteration": 1618343394757,
"links": [],
"panels": [
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 10,
"w": 12,
"x": 0,
"y": 0
},
"hiddenSeries": false,
"id": 4,
"legend": {
"alignAsTable": true,
"avg": true,
"current": true,
"max": true,
"min": true,
"show": true,
"total": true,
"values": true
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"alias": "new",
"bucketAggs": [
{
"field": "created_at",
"id": "2",
"settings": {
"interval": "1d",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"metrics": [
{
"field": "select field",
"id": "1",
"type": "count"
}
],
"query": "state:new",
"refId": "A",
"timeField": "created_at"
},
{
"alias": "closed",
"bucketAggs": [
{
"field": "created_at",
"id": "2",
"settings": {
"interval": "1d",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"metrics": [
{
"field": "select field",
"id": "1",
"type": "count"
}
],
"query": "state:closed",
"refId": "B",
"timeField": "created_at"
},
{
"alias": "open",
"bucketAggs": [
{
"field": "created_at",
"id": "2",
"settings": {
"interval": "1d",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"metrics": [
{
"field": "select field",
"id": "1",
"type": "count"
}
],
"query": "state:open",
"refId": "C",
"timeField": "created_at"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "new vs closed",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {},
"unit": "m"
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 10,
"w": 12,
"x": 12,
"y": 0
},
"hiddenSeries": false,
"id": 14,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": true,
"min": true,
"rightSide": false,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null as zero",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Average pending_time",
"yaxis": 2
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"bucketAggs": [
{
"field": "created_at",
"id": "2",
"settings": {
"interval": "1d",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"metrics": [
{
"field": "close_in_min",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
}
],
"query": "state:closed",
"refId": "A",
"timeField": "created_at"
},
{
"bucketAggs": [
{
"field": "created_at",
"id": "2",
"settings": {
"interval": "1d",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"hide": true,
"metrics": [
{
"field": "pending_time",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
}
],
"refId": "B",
"timeField": "created_at"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "close time",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "m",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "m",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 4,
"x": 0,
"y": 10
},
"id": 19,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n count(*) as total /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id in (1,2)\ngroup by users.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
},
{
"format": "time_series",
"group": [],
"hide": true,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n count(*) as value\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id=4\ngroup by users.id\nORDER BY 1",
"refId": "B",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Open-Tickets per user",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 4,
"x": 4,
"y": 10
},
"id": 18,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n count(*) as total /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at) \ngroup by users.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
},
{
"format": "time_series",
"group": [],
"hide": true,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n count(*) as value\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id=4\ngroup by users.id\nORDER BY 1",
"refId": "B",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Tickets per user",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 4,
"x": 8,
"y": 10
},
"id": 20,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n count(*) as total /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id=4\ngroup by users.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
},
{
"format": "time_series",
"group": [],
"hide": true,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n count(*) as value\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id=4\ngroup by users.id\nORDER BY 1",
"refId": "B",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Closed-Tickets per user",
"transformations": [],
"type": "bargauge"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 10
},
"hiddenSeries": false,
"id": 8,
"legend": {
"alignAsTable": true,
"avg": true,
"current": false,
"max": true,
"min": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"bucketAggs": [
{
"field": "created_at",
"id": "2",
"settings": {
"interval": "1d",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"metrics": [
{
"field": "article_count",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
}
],
"refId": "A",
"timeField": "created_at"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "avg messages per ticket",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 4,
"x": 0,
"y": 16
},
"id": 23,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n groups.name as metric,\n count(*) as total /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join groups on (tickets.group_id=groups.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id in (1)\ngroup by groups.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "New-Tickets per group",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 4,
"x": 4,
"y": 16
},
"id": 24,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n groups.name as metric,\n count(*) as total /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join groups on (tickets.group_id=groups.id)\nWHERE\n$__timeFilter(tickets.created_at) and (tickets.state_id in (2) or tickets.escalation_at is not null)\ngroup by groups.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Open-Tickets per group",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 250
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 4,
"x": 8,
"y": 16
},
"id": 25,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n groups.name as metric,\n count(*) as total /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join groups on (tickets.group_id=groups.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id in (4)\ngroup by groups.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Tickets per group",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"displayMode": "color-background",
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 3
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "create time"
},
"properties": [
{
"id": "custom.width",
"value": 190
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_contact_customer_at"
},
"properties": [
{
"id": "custom.width",
"value": 188
}
]
},
{
"matcher": {
"id": "byName",
"options": "firstname"
},
"properties": [
{
"id": "custom.width",
"value": 76
}
]
},
{
"matcher": {
"id": "byName",
"options": "hours_ago"
},
"properties": [
{
"id": "custom.width",
"value": 84
}
]
},
{
"matcher": {
"id": "byName",
"options": "days_ago"
},
"properties": [
{
"id": "custom.width",
"value": 79
}
]
},
{
"matcher": {
"id": "byName",
"options": "company"
},
"properties": [
{
"id": "custom.width",
"value": 141
}
]
},
{
"matcher": {
"id": "byName",
"options": "client"
},
"properties": [
{
"id": "custom.width",
"value": 118
}
]
}
]
},
"gridPos": {
"h": 25,
"w": 12,
"x": 12,
"y": 18
},
"id": 10,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n tickets.created_at AS \"create time\",\n tickets.last_contact_customer_at,\n EXTRACT(EPOCH FROM current_timestamp-tickets.last_contact_customer_at)/3600 as hours_ago,\n EXTRACT(EPOCH FROM current_timestamp-tickets.last_contact_customer_at)/86400 as days_ago,\n case when organizations.name is null then 'no company' ELSE organizations.name end as client,\n users.firstname,\n tickets.title\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE\n$__timeFilter(tickets.created_at) and (tickets.last_contact_customer_at>tickets.last_contact_agent_at or tickets.last_contact_agent_at is null) and tickets.state_id in (2)\nORDER BY tickets.last_contact_customer_at asc",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "client responded",
"type": "table"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 0,
"y": 22
},
"id": 22,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n organizations.name as metric,\n count(*) as total /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join organizations on (tickets.organization_id=organizations.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id in (1)\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
},
{
"format": "time_series",
"group": [],
"hide": true,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n count(*) as value\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id=4\ngroup by users.id\nORDER BY 1",
"refId": "B",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "New-Tickets per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 6,
"y": 22
},
"id": 26,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n organizations.name as metric,\n count(*) as total /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join organizations on (tickets.organization_id=organizations.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id in (2)\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
},
{
"format": "time_series",
"group": [],
"hide": true,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n count(*) as value\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id=4\ngroup by users.id\nORDER BY 1",
"refId": "B",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Open-Tickets per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "dark-red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 28
},
"id": 27,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n case when organizations.name is null then 'no company' else organizations.name end as metric,\n count(*) as total /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id in (1,2) and tickets.escalation_at is not null\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
},
{
"format": "time_series",
"group": [],
"hide": true,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n count(*) as value\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id=4\ngroup by users.id\nORDER BY 1",
"refId": "B",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Escalated-Tickets per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 35
},
"id": 28,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n case when organizations.name is null then 'no company' ELSE organizations.name end as metric,\n count(*) as total /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
},
{
"format": "time_series",
"group": [],
"hide": true,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n count(*) as value\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id=4\ngroup by users.id\nORDER BY 1",
"refId": "B",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Tickets per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 800
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 42
},
"id": 29,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n case when organizations.name is null then 'no company' ELSE organizations.name end as metric,\n sum(tickets.article_count) as article_count /*,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Messages per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"displayMode": "color-background",
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 3
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "create time"
},
"properties": [
{
"id": "custom.width",
"value": 190
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_contact_customer_at"
},
"properties": [
{
"id": "custom.width",
"value": 188
}
]
},
{
"matcher": {
"id": "byName",
"options": "firstname"
},
"properties": [
{
"id": "custom.width",
"value": 76
}
]
},
{
"matcher": {
"id": "byName",
"options": "hours_ago"
},
"properties": [
{
"id": "custom.width",
"value": 84
}
]
},
{
"matcher": {
"id": "byName",
"options": "days_ago"
},
"properties": [
{
"id": "custom.width",
"value": 79
}
]
},
{
"matcher": {
"id": "byName",
"options": "company"
},
"properties": [
{
"id": "custom.width",
"value": 141
}
]
},
{
"matcher": {
"id": "byName",
"options": "client"
},
"properties": [
{
"id": "custom.width",
"value": 118
}
]
}
]
},
"gridPos": {
"h": 25,
"w": 12,
"x": 12,
"y": 43
},
"id": 44,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n tickets.created_at AS \"create time\",\n tickets.last_contact_customer_at,\n EXTRACT(EPOCH FROM current_timestamp-tickets.last_contact_customer_at)/3600 as hours_ago,\n EXTRACT(EPOCH FROM current_timestamp-tickets.last_contact_customer_at)/86400 as days_ago,\n case when organizations.name is null then 'no company' ELSE organizations.name end as client,\n users.firstname,\n tickets.title\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.last_contact_agent_at is null and tickets.state_id in (1)\nORDER BY tickets.last_contact_customer_at asc",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "new unanswered tickets",
"type": "table"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 49
},
"id": 30,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n case when organizations.name is null then 'no company' ELSE organizations.name end as metric,\n ((sum(tickets.article_count)::decimal/count(distinct(tickets.id))::decimal) * 1) as message_ratio\n /*( (( count(distinct(tickets.id))/sum(tickets.article_count) ) * 100) as message_ratio ,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Message/Ticket Ratio per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 56
},
"id": 37,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n case when organizations.name is null then 'no company' ELSE organizations.name end as metric,\n count(*) as closed\n /*( (( count(distinct(tickets.id))/sum(tickets.article_count) ) * 100) as message_ratio ,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\nleft join organizations on (tickets.organization_id=organizations.id) and tickets.state_id in (4)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Closed per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "m"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 0,
"y": 63
},
"id": 31,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n case when organizations.name is null then 'no company' ELSE organizations.name end as metric,\n avg(tickets.close_in_min) as avf_close_time\n \nFROM tickets\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE tickets.state_id in (4) AND\n$__timeFilter(tickets.created_at)\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Avg Close Time per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "m"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 6,
"x": 6,
"y": 63
},
"id": 36,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n case when organizations.name is null then 'no company' ELSE organizations.name end as metric,\n avg(tickets.first_response_in_min) as avf_close_time\n \nFROM tickets\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Avg FirstResponse Time per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "create time"
},
"properties": [
{
"id": "custom.width",
"value": 190
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_contact_customer_at"
},
"properties": [
{
"id": "custom.width",
"value": 189
}
]
},
{
"matcher": {
"id": "byName",
"options": "firstname"
},
"properties": [
{
"id": "custom.width",
"value": 82
}
]
},
{
"matcher": {
"id": "byName",
"options": "hours_ago"
},
"properties": [
{
"id": "custom.width",
"value": 86
}
]
},
{
"matcher": {
"id": "byName",
"options": "days_ago"
},
"properties": [
{
"id": "custom.width",
"value": 75
}
]
},
{
"matcher": {
"id": "byName",
"options": "company"
},
"properties": [
{
"id": "custom.width",
"value": 142
}
]
},
{
"matcher": {
"id": "byName",
"options": "client"
},
"properties": [
{
"id": "custom.width",
"value": 105
}
]
}
]
},
"gridPos": {
"h": 29,
"w": 12,
"x": 12,
"y": 68
},
"id": 33,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n tickets.created_at AS \"create time\",\n tickets.last_contact_customer_at,\n EXTRACT(EPOCH FROM current_timestamp-tickets.created_at)/86400 as days_ago,\n case when organizations.name is null then 'no company' ELSE organizations.name end as client,\n users.firstname,\n tickets.title\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE\n$__timeFilter(tickets.created_at) and tickets.state_id not in (4,5)\nORDER BY tickets.created_at asc",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "days open",
"type": "table"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "m"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 71
},
"id": 32,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n case when organizations.name is null then 'no company' ELSE organizations.name end as metric,\n sum(tickets.close_in_min) as avf_close_time\n \nFROM tickets\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE tickets.state_id in (4) AND\n$__timeFilter(tickets.created_at)\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Total Close Time per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "m"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 12,
"x": 0,
"y": 78
},
"id": 39,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n case when organizations.name is null then 'no company' ELSE organizations.name end as metric,\n max(tickets.close_in_min) as avf_close_time\n \nFROM tickets\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE tickets.state_id in (4) AND\n$__timeFilter(tickets.created_at)\ngroup by organizations.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Max Close Time per client",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "m"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 0,
"y": 85
},
"id": 34,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as agent,\n avg(tickets.close_in_min) as avf_close_time\n \nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by users.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Avg Close Time per agent",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "m"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 6,
"y": 85
},
"id": 35,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as agent,\n avg(tickets.first_response_in_min) as avf_close_time\n \nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by users.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Avg FirstResponse Time per agent",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 0,
"y": 91
},
"id": 45,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n groups.name as metric,\n ((sum(tickets.article_count)::decimal) * 1) as message_ratio\n /*( (( count(distinct(tickets.id))/sum(tickets.article_count) ) * 100) as message_ratio ,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join groups on (tickets.group_id=groups.id)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by groups.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Message's per group",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 6,
"y": 91
},
"id": 46,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n groups.name as metric,\n ((sum(tickets.article_count)::decimal/count(distinct(tickets.id))::decimal) * 1) as message_ratio\n /*( (( count(distinct(tickets.id))/sum(tickets.article_count) ) * 100) as message_ratio ,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join groups on (tickets.group_id=groups.id)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by groups.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Message/Ticket ratio per group",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 0,
"y": 97
},
"id": 47,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n ((sum(tickets.article_count)::decimal) * 1) as message_ratio\n /*( (( count(distinct(tickets.id))/sum(tickets.article_count) ) * 100) as message_ratio ,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by users.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Message's per user",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 6,
"x": 6,
"y": 97
},
"id": 48,
"options": {
"displayMode": "lcd",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"sum"
],
"fields": "",
"values": false
},
"showUnfilled": true
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "time_series",
"group": [],
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n min(tickets.created_at) AS \"time\",\n users.firstname as metric,\n ((sum(tickets.article_count)::decimal/count(distinct(tickets.id))::decimal) * 1) as message_ratio\n /*( (( count(distinct(tickets.id))/sum(tickets.article_count) ) * 100) as message_ratio ,\n count(case when state_id=4 then 1 ELSE 0 END) as closed*/\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by users.id\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "Message/Ticket ratio per user",
"transformations": [],
"type": "bargauge"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "create time"
},
"properties": [
{
"id": "custom.width",
"value": 190
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_contact_customer_at"
},
"properties": [
{
"id": "custom.width",
"value": 186
}
]
},
{
"matcher": {
"id": "byName",
"options": "firstname"
},
"properties": [
{
"id": "custom.width",
"value": 81
}
]
},
{
"matcher": {
"id": "byName",
"options": "hours_ago"
},
"properties": [
{
"id": "custom.width",
"value": 86
}
]
},
{
"matcher": {
"id": "byName",
"options": "days_ago"
},
"properties": [
{
"id": "custom.width",
"value": 76
}
]
},
{
"matcher": {
"id": "byName",
"options": "company"
},
"properties": [
{
"id": "custom.width",
"value": 142
}
]
},
{
"matcher": {
"id": "byName",
"options": "client"
},
"properties": [
{
"id": "custom.width",
"value": 99
}
]
}
]
},
"gridPos": {
"h": 25,
"w": 12,
"x": 12,
"y": 97
},
"id": 38,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n tickets.created_at AS \"create time\",\n tickets.last_contact_customer_at,\n EXTRACT(EPOCH FROM current_timestamp-tickets.created_at)/86400 as days_ago,\n case when organizations.name is null then 'no company' ELSE organizations.name end as client,\n users.firstname,\n tickets.title\nFROM tickets\ninner join users on (tickets.owner_id=users.id)\nleft join organizations on (tickets.organization_id=organizations.id)\nWHERE\nNOT ($__timeFilter(tickets.created_at)) and tickets.state_id not in (4,5)\nORDER BY tickets.created_at asc",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "not closed outside period",
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 103
},
"id": 6,
"options": {
"showHeader": true,
"sortBy": [
{
"desc": true,
"displayName": "Count"
}
]
},
"pluginVersion": "7.3.3",
"targets": [
{
"bucketAggs": [
{
"field": "owner.id",
"id": "2",
"settings": {
"min_doc_count": 0,
"order": "desc",
"orderBy": "_count",
"size": "10"
},
"type": "terms"
}
],
"metrics": [
{
"field": "select field",
"id": "1",
"meta": {},
"settings": {},
"type": "count"
}
],
"query": "",
"refId": "A",
"timeField": "created_at"
}
],
"timeFrom": null,
"timeShift": null,
"title": "tickets per owner",
"type": "table"
},
{
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "organization_id"
},
"properties": [
{
"id": "custom.width",
"value": null
}
]
}
]
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 111
},
"id": 12,
"options": {
"showHeader": true,
"sortBy": []
},
"pluginVersion": "7.3.3",
"targets": [
{
"format": "table",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n *\nFROM users\nwhere organization_id=2\nORDER BY id",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"timeFrom": null,
"timeShift": null,
"title": "user id's",
"type": "table"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "_index"
},
"properties": [
{
"id": "custom.width",
"value": 257
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_contact_agent_at"
},
"properties": [
{
"id": "custom.width",
"value": 232
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_contact_customer_at"
},
"properties": [
{
"id": "custom.width",
"value": 206
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_owner_update_at"
},
"properties": [
{
"id": "custom.width",
"value": 218
}
]
}
]
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 119
},
"id": 2,
"options": {
"showHeader": true,
"sortBy": [
{
"desc": true,
"displayName": "customer.email"
}
]
},
"pluginVersion": "7.3.3",
"targets": [
{
"alias": "",
"bucketAggs": [
{
"field": "last_contact_agent_at",
"id": "2",
"settings": {
"min_doc_count": 0,
"order": "desc",
"orderBy": "_term",
"size": "10"
},
"type": "terms"
}
],
"hide": false,
"metrics": [
{
"field": "select field",
"id": "1",
"meta": {},
"pipelineVariables": [
{
"name": "var1",
"pipelineAgg": "select metric"
},
{
"name": "var2",
"pipelineAgg": "select metric"
}
],
"settings": {},
"type": "logs"
}
],
"query": "last_contact_agent_at - last_contact_customer_at < 0",
"refId": "A",
"timeField": "created_at"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"transformations": [],
"type": "table"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "zammad-db",
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 122
},
"hiddenSeries": false,
"id": 41,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"format": "time_series",
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n date(tickets.created_at) AS \"time\",\n 'Avg Close Time' as metric,\n avg(tickets.close_in_min) as avf_close_time\n \nFROM tickets\nWHERE\n$__timeFilter(tickets.created_at)\ngroup by date(tickets.created_at)\nORDER BY 1",
"refId": "A",
"select": [
[
{
"params": [
"value"
],
"type": "column"
}
]
],
"timeColumn": "time",
"where": [
{
"name": "$__timeFilter",
"params": [],
"type": "macro"
}
]
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Avg Close Time - DB",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "m",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
},
{
"datasource": "ES_users",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "_index"
},
"properties": [
{
"id": "custom.width",
"value": 257
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_contact_agent_at"
},
"properties": [
{
"id": "custom.width",
"value": 232
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_contact_customer_at"
},
"properties": [
{
"id": "custom.width",
"value": 206
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_owner_update_at"
},
"properties": [
{
"id": "custom.width",
"value": 218
}
]
}
]
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 128
},
"id": 42,
"options": {
"showHeader": true,
"sortBy": [
{
"desc": true,
"displayName": "customer.email"
}
]
},
"pluginVersion": "7.3.3",
"targets": [
{
"alias": "",
"bucketAggs": [
{
"field": "last_contact_agent_at",
"id": "2",
"settings": {
"min_doc_count": 0,
"order": "desc",
"orderBy": "_term",
"size": "10"
},
"type": "terms"
}
],
"hide": false,
"metrics": [
{
"field": "select field",
"id": "1",
"meta": {},
"pipelineVariables": [
{
"name": "var1",
"pipelineAgg": "select metric"
},
{
"name": "var2",
"pipelineAgg": "select metric"
}
],
"settings": {},
"type": "logs"
}
],
"query": "",
"refId": "A",
"timeField": "created_at"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"transformations": [],
"type": "table"
},
{
"datasource": "zammad_stats_store",
"fieldConfig": {
"defaults": {
"custom": {
"align": null,
"filterable": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "_index"
},
"properties": [
{
"id": "custom.width",
"value": 257
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_contact_agent_at"
},
"properties": [
{
"id": "custom.width",
"value": 232
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_contact_customer_at"
},
"properties": [
{
"id": "custom.width",
"value": 206
}
]
},
{
"matcher": {
"id": "byName",
"options": "last_owner_update_at"
},
"properties": [
{
"id": "custom.width",
"value": 218
}
]
}
]
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 137
},
"id": 43,
"options": {
"showHeader": true,
"sortBy": [
{
"desc": true,
"displayName": "customer.email"
}
]
},
"pluginVersion": "7.3.3",
"targets": [
{
"alias": "",
"bucketAggs": [],
"hide": false,
"metrics": [
{
"field": "select field",
"id": "1",
"meta": {},
"pipelineVariables": [
{
"name": "var1",
"pipelineAgg": "select metric"
},
{
"name": "var2",
"pipelineAgg": "select metric"
}
],
"settings": {
"size": 500
},
"type": "raw_data"
}
],
"query": "",
"refId": "A",
"timeField": "created_at"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"transformations": [],
"type": "table"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": null,
"fieldConfig": {
"defaults": {
"custom": {}
},
"overrides": []
},
"fill": 1,
"fillGradient": 0,
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 146
},
"hiddenSeries": false,
"id": 16,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"options": {
"alertThreshold": true
},
"percentage": false,
"pluginVersion": "7.3.3",
"pointradius": 2,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"bucketAggs": [
{
"field": "created_at",
"id": "2",
"settings": {
"interval": "auto",
"min_doc_count": 0,
"trimEdges": 0
},
"type": "date_histogram"
}
],
"metrics": [
{
"field": "pending_time",
"id": "1",
"meta": {},
"settings": {},
"type": "avg"
}
],
"refId": "A",
"timeField": "created_at"
}
],
"thresholds": [],
"timeFrom": null,
"timeRegions": [],
"timeShift": null,
"title": "Pending time",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": null
}
}
],
"refresh": "1m",
"schemaVersion": 26,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"datasource": "ES_users",
"error": null,
"filters": [],
"hide": 0,
"label": null,
"name": "Filters",
"skipUrlSync": false,
"type": "adhoc"
}
]
},
"time": {
"from": "now-60d",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "New dashboard Copy2",
"uid": "4QdlwhTMz",
"version": 77
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment