fix(grafana): make file-1c dashboards live by default

This commit is contained in:
igor04091968
2026-05-22 09:48:28 +03:00
parent 172d113536
commit da58d682c1
3 changed files with 26 additions and 26 deletions
@@ -10,7 +10,7 @@
"panels": [ "panels": [
{ {
"id": 1, "id": 1,
"title": "Продажи за 7 дней", "title": "Снимки баз за 7 дней",
"type": "stat", "type": "stat",
"datasource": { "datasource": {
"type": "grafana-clickhouse-datasource", "type": "grafana-clickhouse-datasource",
@@ -33,7 +33,7 @@
"format": 1, "format": 1,
"pluginVersion": "11.2.2", "pluginVersion": "11.2.2",
"queryType": "table", "queryType": "table",
"rawSql": "SELECT sum(amount) AS value FROM analytics_1c.documents WHERE doc_type = 'Реализация' AND $__timeFilter(ts)", "rawSql": "SELECT count() AS value FROM analytics_1c.documents WHERE doc_type = 'InfobaseSnapshot' AND $__timeFilter(ts)",
"refId": "A" "refId": "A"
} }
], ],
@@ -79,7 +79,7 @@
}, },
{ {
"id": 2, "id": 2,
"title": "Просроченная дебиторка", "title": "Базы в состоянии busy",
"type": "stat", "type": "stat",
"datasource": { "datasource": {
"type": "grafana-clickhouse-datasource", "type": "grafana-clickhouse-datasource",
@@ -102,7 +102,7 @@
"format": 1, "format": 1,
"pluginVersion": "11.2.2", "pluginVersion": "11.2.2",
"queryType": "table", "queryType": "table",
"rawSql": "SELECT sum(amount) AS value FROM analytics_1c.documents WHERE status = 'overdue' AND $__timeFilter(ts)", "rawSql": "SELECT countDistinct(infobase) AS value FROM analytics_1c.documents WHERE status = 'busy' AND $__timeFilter(ts)",
"refId": "A" "refId": "A"
} }
], ],
@@ -286,7 +286,7 @@
}, },
{ {
"id": 5, "id": 5,
"title": "Продажи по дням", "title": "Снимки баз по дням",
"type": "timeseries", "type": "timeseries",
"datasource": { "datasource": {
"type": "grafana-clickhouse-datasource", "type": "grafana-clickhouse-datasource",
@@ -309,7 +309,7 @@
"format": 1, "format": 1,
"pluginVersion": "11.2.2", "pluginVersion": "11.2.2",
"queryType": "timeSeries", "queryType": "timeSeries",
"rawSql": "SELECT toStartOfDay(ts) AS time, sum(amount) AS value FROM analytics_1c.documents WHERE doc_type = 'Реализация' AND $__timeFilter(ts) GROUP BY time ORDER BY time", "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" "refId": "A"
} }
], ],
@@ -565,6 +565,6 @@
"timezone": "browser", "timezone": "browser",
"title": "1C File - Executive Summary", "title": "1C File - Executive Summary",
"uid": "1c-file-exec", "uid": "1c-file-exec",
"version": 1, "version": 2,
"weekStart": "" "weekStart": ""
} }
@@ -33,7 +33,7 @@
"format": 1, "format": 1,
"pluginVersion": "11.2.2", "pluginVersion": "11.2.2",
"queryType": "table", "queryType": "table",
"rawSql": "SELECT ts, entity_type, entity_id, actor, source, event_type, severity, score, summary FROM analytics_1c.entity_timeline WHERE $__timeFilter(ts) AND entity_type = '${entity_type}' AND entity_id = '${entity_id}' ORDER BY ts DESC LIMIT 200", "rawSql": "SELECT ts, entity_type, entity_id, actor, source, event_type, severity, score, summary FROM analytics_1c.entity_timeline WHERE $__timeFilter(ts) AND ('${entity_type}' IN ('', '$__all') OR entity_type = '${entity_type}') AND ('${entity_id}' IN ('', '$__all') OR entity_id = '${entity_id}') ORDER BY ts DESC LIMIT 200",
"refId": "A" "refId": "A"
} }
], ],
@@ -76,7 +76,7 @@
"format": 1, "format": 1,
"pluginVersion": "11.2.2", "pluginVersion": "11.2.2",
"queryType": "table", "queryType": "table",
"rawSql": "SELECT ts, rule_title, severity, score, summary FROM analytics_1c.detections WHERE entity_type = '${entity_type}' AND entity_id = '${entity_id}' AND $__timeFilter(ts) ORDER BY ts DESC LIMIT 100", "rawSql": "SELECT ts, rule_title, severity, score, summary FROM analytics_1c.detections WHERE $__timeFilter(ts) AND ('${entity_type}' IN ('', '$__all') OR entity_type = '${entity_type}') AND ('${entity_id}' IN ('', '$__all') OR entity_id = '${entity_id}') ORDER BY ts DESC LIMIT 100",
"refId": "A" "refId": "A"
} }
], ],
@@ -323,15 +323,15 @@
"uid": "clickhouse-1c" "uid": "clickhouse-1c"
}, },
"refresh": 1, "refresh": 1,
"definition": "SELECT arrayJoin(['user','document','host'])", "definition": "SELECT DISTINCT entity_type FROM analytics_1c.entity_timeline ORDER BY entity_type",
"query": "SELECT arrayJoin(['user','document','host'])", "query": "SELECT DISTINCT entity_type FROM analytics_1c.entity_timeline ORDER BY entity_type",
"multi": false, "multi": false,
"includeAll": false, "includeAll": true,
"sort": 1, "sort": 1,
"current": { "current": {
"selected": false, "selected": false,
"text": "", "text": "All",
"value": "" "value": "$__all"
} }
}, },
{ {
@@ -343,15 +343,15 @@
"uid": "clickhouse-1c" "uid": "clickhouse-1c"
}, },
"refresh": 1, "refresh": 1,
"definition": "SELECT DISTINCT entity_id FROM analytics_1c.entity_timeline ORDER BY entity_id", "definition": "SELECT DISTINCT entity_id FROM analytics_1c.entity_timeline WHERE ('${entity_type}' IN ('', '$__all') OR entity_type = '${entity_type}') ORDER BY entity_id",
"query": "SELECT DISTINCT entity_id FROM analytics_1c.entity_timeline ORDER BY entity_id", "query": "SELECT DISTINCT entity_id FROM analytics_1c.entity_timeline WHERE ('${entity_type}' IN ('', '$__all') OR entity_type = '${entity_type}') ORDER BY entity_id",
"multi": false, "multi": false,
"includeAll": false, "includeAll": true,
"sort": 1, "sort": 1,
"current": { "current": {
"selected": false, "selected": false,
"text": "", "text": "All",
"value": "" "value": "$__all"
} }
} }
] ]
@@ -364,6 +364,6 @@
"timezone": "browser", "timezone": "browser",
"title": "1C File - Investigation Timeline", "title": "1C File - Investigation Timeline",
"uid": "1c-file-investigation", "uid": "1c-file-investigation",
"version": 1, "version": 2,
"weekStart": "" "weekStart": ""
} }
@@ -190,7 +190,7 @@
}, },
{ {
"id": 5, "id": 5,
"title": "Длительные операции", "title": "События занятости файловой базы",
"type": "table", "type": "table",
"datasource": { "datasource": {
"type": "grafana-clickhouse-datasource", "type": "grafana-clickhouse-datasource",
@@ -213,7 +213,7 @@
"format": 1, "format": 1,
"pluginVersion": "11.2.2", "pluginVersion": "11.2.2",
"queryType": "table", "queryType": "table",
"rawSql": "SELECT ts, infobase, user, event_name, duration_ms, message FROM analytics_1c.reglog_events WHERE duration_ms > 3000 AND $__timeFilter(ts) ORDER BY duration_ms DESC LIMIT 50", "rawSql": "SELECT ts, infobase, user, event_name, level, message FROM analytics_1c.reglog_events WHERE event_name = 'FileBaseBusy' AND $__timeFilter(ts) ORDER BY ts DESC LIMIT 50",
"refId": "A" "refId": "A"
} }
], ],
@@ -332,6 +332,6 @@
"timezone": "browser", "timezone": "browser",
"title": "1C File - Operations Health", "title": "1C File - Operations Health",
"uid": "1c-file-ops", "uid": "1c-file-ops",
"version": 1, "version": 2,
"weekStart": "" "weekStart": ""
} }