Skip to content

Commit

Permalink
Minor improvements of monitoring dashboard (cvat-ai#5795)
Browse files Browse the repository at this point in the history
  • Loading branch information
azhavoro authored Mar 2, 2023
1 parent 1c9bc48 commit 15cbbbb
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 15 deletions.
94 changes: 80 additions & 14 deletions components/analytics/grafana/dashboards/monitoring.json
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@
"custom": {
"align": "auto",
"displayMode": "auto",
"filterable": true,
"inspect": true,
"minWidth": 80
},
Expand Down Expand Up @@ -946,7 +947,7 @@
}
},
"queryType": "sql",
"rawSql": "SELECT\r\n user_id,\r\n user_name,\r\n source,\r\n project_id,\r\n task_id,\r\n job_id,\r\n JSONExtractString(payload, 'message') as error,\r\n JSONExtractString(payload, 'stack') as stack,\r\n payload\r\nFROM events\r\nWHERE\r\n ( timestamp >= $__fromTime AND timestamp <= $__toTime )\r\n AND scope = 'send:exception'\r\n AND source IN (${sources})\r\n AND (-1 IN (${users}) OR user_id IN (${users}))\r\n AND (-1 IN (${organizations}) OR org_id IN (${organizations}))\r\n AND (-1 IN (${projects}) OR project_id IN (${projects}))\r\n AND (-1 IN (${tasks}) OR task_id IN (${tasks}))\r\n AND (-1 IN (${jobs}) OR job_id IN (${jobs}))\r\nORDER BY timestamp DESC",
"rawSql": "SELECT\r\n timestamp,\r\n user_id,\r\n user_name,\r\n source,\r\n project_id,\r\n task_id,\r\n job_id,\r\n JSONExtractString(payload, 'message') as error,\r\n JSONExtractString(payload, 'stack') as stack,\r\n payload\r\nFROM events\r\nWHERE\r\n ( timestamp >= $__fromTime AND timestamp <= $__toTime )\r\n AND scope = 'send:exception'\r\n AND source IN (${sources})\r\n AND (-1 IN (${users}) OR user_id IN (${users}))\r\n AND (-1 IN (${organizations}) OR org_id IN (${organizations}))\r\n AND (-1 IN (${projects}) OR project_id IN (${projects}))\r\n AND (-1 IN (${tasks}) OR task_id IN (${tasks}))\r\n AND (-1 IN (${jobs}) OR job_id IN (${jobs}))\r\n AND ('-1' IN (${errors}) OR error IN (${errors}))\r\nORDER BY timestamp DESC",
"refId": "A"
}
],
Expand All @@ -962,14 +963,18 @@
"list": [
{
"current": {
"selected": true,
"selected": false,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "PDEE91DDB90597936"
},
"definition": "SELECT source\nFROM events\nWHERE $__timeFilter(timestamp)",
"hide": 0,
"includeAll": true,
Expand All @@ -987,14 +992,18 @@
{
"allValue": "-1",
"current": {
"selected": true,
"selected": false,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "PDEE91DDB90597936"
},
"definition": "SELECT user_id\nFROM events\nWHERE $__timeFilter(timestamp)\n AND user_id IS NOT NULL",
"hide": 0,
"includeAll": true,
Expand All @@ -1013,8 +1022,16 @@
"allValue": "-1",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "PDEE91DDB90597936"
},
"definition": "SELECT project_id\nFROM events\nWHERE $__timeFilter(timestamp)\n AND project_id IS NOT NULL",
"hide": 0,
Expand All @@ -1033,9 +1050,17 @@
{
"allValue": "-1",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "PDEE91DDB90597936"
},
"definition": "SELECT task_id\nFROM events\nWHERE $__timeFilter(timestamp) \n AND task_id IS NOT NULL",
"hide": 0,
Expand All @@ -1055,8 +1080,16 @@
"allValue": "-1",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "PDEE91DDB90597936"
},
"definition": "SELECT job_id\nFROM events\nWHERE $__timeFilter(timestamp)\n AND job_id IS NOT NULL",
"hide": 0,
Expand All @@ -1075,9 +1108,17 @@
{
"allValue": "-1",
"current": {
"selected": false,
"text": "All",
"value": "$__all"
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "grafana-clickhouse-datasource",
"uid": "PDEE91DDB90597936"
},
"definition": "SELECT org_id\nFROM events\nWHERE $__timeFilter(timestamp)\nAND org_id IS NOT NULL",
"hide": 0,
Expand All @@ -1092,6 +1133,31 @@
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"allValue": "'-1'",
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"definition": "SELECT\n JSONExtractString(payload, 'message')\n FROM cvat.events\nWHERE $__timeFilter(timestamp)\n AND JSONHas(payload, 'message')\n AND scope='send:exception'",
"hide": 0,
"includeAll": true,
"label": "Error message",
"multi": true,
"name": "errors",
"options": [],
"query": "SELECT\n JSONExtractString(payload, 'message')\n FROM cvat.events\nWHERE $__timeFilter(timestamp)\n AND JSONHas(payload, 'message')\n AND scope='send:exception'",
"refresh": 2,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
Expand All @@ -1103,6 +1169,6 @@
"timezone": "",
"title": "Monitoring",
"uid": "WvDvWK04k",
"version": 1,
"version": 2,
"weekStart": ""
}
1 change: 0 additions & 1 deletion components/analytics/vector/vector.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ auth.strategy = "basic"
auth.user = "${CLICKHOUSE_USER}"
auth.password = "${CLICKHOUSE_PASSWORD}"
endpoint = "http://${CLICKHOUSE_HOST}:8123"
batch.timeout_secs = 10
request.concurrency = "adaptive"
encoding.only_fields = [
"scope",
Expand Down

0 comments on commit 15cbbbb

Please sign in to comment.