Files
AWatch-rus/clickhouse-1c/grafana/provisioning/dashboards/files/1c-executive-summary.json
T

571 lines
14 KiB
JSON

{
"annotations": {
"list": []
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"id": null,
"links": [],
"panels": [
{
"id": 1,
"title": "Снимки баз за 7 дней",
"type": "stat",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"pluginVersion": "11.2.2",
"gridPos": {
"x": 0,
"y": 0,
"w": 6,
"h": 6
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"editorType": "sql",
"format": 1,
"pluginVersion": "11.2.2",
"queryType": "table",
"rawSql": "SELECT count() AS value FROM analytics_1c.documents WHERE doc_type = 'InfobaseSnapshot' AND $__timeFilter(ts)",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 1
},
{
"color": "red",
"value": 10
}
]
}
},
"overrides": []
}
},
{
"id": 2,
"title": "Базы в состоянии busy",
"type": "stat",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"pluginVersion": "11.2.2",
"gridPos": {
"x": 6,
"y": 0,
"w": 6,
"h": 6
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"editorType": "sql",
"format": 1,
"pluginVersion": "11.2.2",
"queryType": "table",
"rawSql": "SELECT countDistinct(infobase) AS value FROM analytics_1c.documents WHERE status = 'busy' AND $__timeFilter(ts)",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 1
},
{
"color": "red",
"value": 10
}
]
}
},
"overrides": []
}
},
{
"id": 3,
"title": "Открытые кейсы",
"type": "stat",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"pluginVersion": "11.2.2",
"gridPos": {
"x": 12,
"y": 0,
"w": 6,
"h": 6
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"editorType": "sql",
"format": 1,
"pluginVersion": "11.2.2",
"queryType": "table",
"rawSql": "SELECT count() AS value FROM analytics_1c.cases WHERE status != 'closed'",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 1
},
{
"color": "red",
"value": 10
}
]
}
},
"overrides": []
}
},
{
"id": 4,
"title": "Critical detections",
"type": "stat",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"pluginVersion": "11.2.2",
"gridPos": {
"x": 18,
"y": 0,
"w": 6,
"h": 6
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"editorType": "sql",
"format": 1,
"pluginVersion": "11.2.2",
"queryType": "table",
"rawSql": "SELECT count() AS value FROM analytics_1c.detections WHERE severity = 'critical' AND $__timeFilter(ts)",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "orange",
"value": 1
},
{
"color": "red",
"value": 10
}
]
}
},
"overrides": []
}
},
{
"id": 5,
"title": "Снимки баз по дням",
"type": "timeseries",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"pluginVersion": "11.2.2",
"gridPos": {
"x": 0,
"y": 6,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"editorType": "sql",
"format": 1,
"pluginVersion": "11.2.2",
"queryType": "timeSeries",
"rawSql": "SELECT toStartOfDay(ts) AS time, count() AS value FROM analytics_1c.documents WHERE doc_type = 'InfobaseSnapshot' AND $__timeFilter(ts) GROUP BY time ORDER BY time",
"refId": "A"
}
],
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "multi"
}
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
}
},
"overrides": []
}
},
{
"id": 6,
"title": "Detections по времени",
"type": "timeseries",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"pluginVersion": "11.2.2",
"gridPos": {
"x": 12,
"y": 6,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"editorType": "sql",
"format": 1,
"pluginVersion": "11.2.2",
"queryType": "timeSeries",
"rawSql": "SELECT toStartOfHour(ts) AS time, count() AS value FROM analytics_1c.detections WHERE $__timeFilter(ts) GROUP BY time ORDER BY time",
"refId": "A"
}
],
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "multi"
}
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
}
},
"overrides": []
}
},
{
"id": 7,
"title": "Топ риск-пользователей",
"type": "table",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"pluginVersion": "11.2.2",
"gridPos": {
"x": 0,
"y": 14,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"editorType": "sql",
"format": 1,
"pluginVersion": "11.2.2",
"queryType": "table",
"rawSql": "SELECT entity_id AS user, sum(score) AS score_total, count() AS detections_total FROM analytics_1c.detections WHERE entity_type = 'user' AND $__timeFilter(ts) GROUP BY entity_id ORDER BY score_total DESC LIMIT 10",
"refId": "A"
}
],
"options": {
"showHeader": true,
"sortBy": [
{
"displayName": "ts",
"desc": true
}
]
},
"fieldConfig": {
"defaults": {},
"overrides": []
}
},
{
"id": 8,
"title": "Топ проблемных баз",
"type": "table",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"pluginVersion": "11.2.2",
"gridPos": {
"x": 12,
"y": 14,
"w": 12,
"h": 8
},
"targets": [
{
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"editorType": "sql",
"format": 1,
"pluginVersion": "11.2.2",
"queryType": "table",
"rawSql": "SELECT infobase, count() AS detections_total, sum(score) AS score_total FROM analytics_1c.detections WHERE $__timeFilter(ts) GROUP BY infobase ORDER BY score_total DESC LIMIT 10",
"refId": "A"
}
],
"options": {
"showHeader": true,
"sortBy": [
{
"displayName": "ts",
"desc": true
}
]
},
"fieldConfig": {
"defaults": {},
"overrides": []
}
}
],
"refresh": "30s",
"schemaVersion": 39,
"style": "dark",
"tags": [
"1c",
"executive",
"clickhouse"
],
"templating": {
"list": [
{
"name": "infobase",
"label": "Infobase",
"type": "query",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"refresh": 1,
"definition": "SELECT DISTINCT infobase FROM analytics_1c.documents ORDER BY infobase",
"query": "SELECT DISTINCT infobase FROM analytics_1c.documents ORDER BY infobase",
"multi": true,
"includeAll": true,
"sort": 1,
"current": {
"selected": false,
"text": "All",
"value": "$__all"
}
},
{
"name": "severity",
"label": "Severity",
"type": "query",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"refresh": 1,
"definition": "SELECT arrayJoin(['low','medium','high','critical'])",
"query": "SELECT arrayJoin(['low','medium','high','critical'])",
"multi": true,
"includeAll": true,
"sort": 1,
"current": {
"selected": false,
"text": "All",
"value": "$__all"
}
},
{
"name": "host",
"label": "Host",
"type": "query",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"refresh": 1,
"definition": "SELECT DISTINCT host FROM analytics_1c.host_events ORDER BY host",
"query": "SELECT DISTINCT host FROM analytics_1c.host_events ORDER BY host",
"multi": true,
"includeAll": true,
"sort": 1,
"current": {
"selected": false,
"text": "All",
"value": "$__all"
}
},
{
"name": "user",
"label": "User",
"type": "query",
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "clickhouse-1c"
},
"refresh": 1,
"definition": "SELECT DISTINCT user FROM analytics_1c.reglog_events ORDER BY user",
"query": "SELECT DISTINCT user FROM analytics_1c.reglog_events ORDER BY user",
"multi": true,
"includeAll": true,
"sort": 1,
"current": {
"selected": false,
"text": "All",
"value": "$__all"
}
}
]
},
"time": {
"from": "now-7d",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "1C File - Executive Summary",
"uid": "1c-file-exec",
"version": 2,
"weekStart": ""
}