Compare commits

...

5 Commits

Author SHA1 Message Date
kongfei
8358ab4b81 add canal dashboards 2023-05-05 10:46:53 +08:00
青牛踏雪
0fc6cb8ef2 fix vm old dashboard to new (#1521) 2023-05-04 20:13:01 +08:00
xiechenglong
e1ab013c45 fix:Unknown column 'rw' in 'field list' (#1519)
Co-authored-by: xiechenglong <xiechenglong@inspur.com>
2023-05-04 15:17:15 +08:00
xtan
d984ad8bf4 docs: pg sql script and gitignore (#1518) 2023-05-04 08:59:17 +08:00
kongfei605
86fe3c7c43 chmod 755 wait for aarch64 (#1517) 2023-04-28 16:39:57 +08:00
8 changed files with 4999 additions and 1927 deletions

1
.gitignore vendored
View File

@@ -41,6 +41,7 @@ _test
/docker/pub
/docker/n9e
/docker/mysqldata
/docker/experience_pg_vm/pgdata
/etc.local
.alerts

View File

@@ -1,3 +1,4 @@
FROM flashcatcloud/toolbox:v0.0.1 as toolbox
FROM --platform=$TARGETPLATFORM python:3-slim
@@ -5,8 +6,8 @@ WORKDIR /app
ADD n9e /app/
ADD etc /app/
ADD integrations /app/integrations/
ADD --chmod=755 https://github.com/ufoscout/docker-compose-wait/releases/download/2.11.0/wait_aarch64 /wait
ADD pub /app/pub/
COPY --chmod=755 --from=toolbox /toolbox/wait_aarch64 /wait
EXPOSE 17000

View File

@@ -251,7 +251,6 @@ COMMENT ON COLUMN chart.group_id IS 'chart group id';
CREATE TABLE chart_share (
id bigserial,
cluster varchar(128) not null,
dashboard_id bigint not null,
datasource_id bigint not null default 0,
configs text,
create_at bigint not null default 0,

View File

@@ -167,7 +167,7 @@ CREATE TABLE `busi_group_member` (
KEY (`user_group_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
insert into busi_group_member(busi_group_id, user_group_id, perm_flag) values(1, 1, "rw");
insert into busi_group_member(busi_group_id, user_group_id, perm_flag) values(1, 1, 'rw');
-- for dashboard new version
CREATE TABLE `board` (
@@ -334,7 +334,7 @@ CREATE TABLE `alert_subscribe` (
KEY (`update_at`),
KEY (`group_id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
CREATE TABLE `target` (
`id` bigint unsigned not null auto_increment,
`group_id` bigint not null default 0 comment 'busi group id',
@@ -383,7 +383,7 @@ CREATE TABLE `metric_view` (
) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4;
insert into metric_view(name, cate, configs) values('Host View', 0, '{"filters":[{"oper":"=","label":"__name__","value":"cpu_usage_idle"}],"dynamicLabels":[],"dimensionLabels":[{"label":"ident","value":""}]}');
CREATE TABLE `recording_rule` (
`id` bigint unsigned not null auto_increment,
`group_id` bigint not null default '0' comment 'group_id',
@@ -582,15 +582,15 @@ CREATE TABLE `datasource`
`updated_by` varchar(64) not null default '',
UNIQUE KEY (`name`),
PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
CREATE TABLE `builtin_cate` (
`id` bigint unsigned not null auto_increment,
`name` varchar(191) not null,
`user_id` bigint not null default 0,
PRIMARY KEY (`id`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
CREATE TABLE `notify_tpl` (
`id` bigint unsigned not null auto_increment,
`channel` varchar(32) not null,

View File

@@ -0,0 +1,614 @@
{
"name": "Canal instances",
"tags": "",
"configs": {
"version": "2.0.0",
"links": [],
"var": [
{
"name": "destination",
"allOption": false,
"multi": false,
"definition": "label_values(canal_instance, destination)"
}
],
"panels": [
{
"version": "2.0.0",
"id": "758ed076-0140-4755-bd86-da18d0648fdd",
"type": "row",
"name": "Instance status",
"collapsed": true,
"layout": {
"h": 1,
"w": 24,
"x": 0,
"y": 0,
"i": "758ed076-0140-4755-bd86-da18d0648fdd"
},
"panels": []
},
{
"version": "2.0.0",
"id": "0c611d83-9ccb-402f-b3ed-14d53bd3e818",
"type": "timeseries",
"name": "Basic",
"description": "Canal instance <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2>",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 0,
"y": 1,
"i": "0c611d83-9ccb-402f-b3ed-14d53bd3e818"
},
"targets": [
{
"refId": "A",
"expr": "canal_instance{destination=~\"$destination\"}",
"legend": "Destination: {{destination}}"
},
{
"refId": "B",
"expr": "canal_instance_parser_mode{destination=~\"$destination\"}",
"legend": "Parallel parser: {{parallel}}"
},
{
"refId": "C",
"expr": "canal_instance_store{destination=~\"$destination\"}",
"legend": "Batch mode: {{batchMode}}"
},
{
"refId": "D",
"expr": "canal_instance_store{destination=~\"$destination\"}",
"legend": "Buffer size: {{size}}"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "efde62a5-f4ac-4062-80d1-4cc7dd50bb9f",
"type": "timeseries",
"name": "Network bandwith",
"description": "Canal instance <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ռ<EFBFBD>á<EFBFBD>\ninbound: <20><>ȡMySQL binlog.\noutbound: <20><>Client<6E>˴<EFBFBD><CBB4><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>binlog.",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 6,
"y": 1,
"i": "efde62a5-f4ac-4062-80d1-4cc7dd50bb9f"
},
"targets": [
{
"refId": "A",
"expr": "rate(canal_instance_received_binlog_bytes{destination=~\"$destination\", parser=\"0\"}[2m]) / 1024",
"legend": "inbound"
},
{
"refId": "B",
"expr": "rate(canal_instance_client_bytes{destination=~\"$destination\"}[2m]) / 1024",
"legend": "outbound"
},
{
"refId": "C",
"expr": "rate(canal_instance_received_binlog_bytes{destination=~\"$destination\", parser=\"1\"}[2m]) / 1024",
"legend": "inbound-1"
},
{
"refId": "D",
"expr": "rate(canal_instance_received_binlog_bytes{destination=~\"$destination\", parser=\"2\"}[2m]) / 1024",
"legend": "inbound-2"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "93d407a9-c1bf-4f9c-b88b-f0a01c023ea4",
"type": "timeseries",
"name": "Delay",
"description": "master: Canal server<65><72><EFBFBD><EFBFBD><EFBFBD>MySQL master<65><72><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>ͨ<EFBFBD><CDA8>master heartbeat<61><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2>idle״̬<D7B4>µ<EFBFBD><C2B5><EFBFBD>ʱ<EFBFBD><CAB1>\nput: store put<75><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>Ϊ<EFBFBD><CEAA>׼<EFBFBD><D7BC>\nget: client get<65><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>Ϊ<EFBFBD><CEAA>׼<EFBFBD><D7BC>\nack: client ack<63><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD>Ϊ<EFBFBD><CEAA>׼<EFBFBD><D7BC>",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 12,
"y": 1,
"i": "93d407a9-c1bf-4f9c-b88b-f0a01c023ea4"
},
"targets": [
{
"refId": "D",
"expr": "canal_instance_traffic_delay{destination=~\"$destination\"} / 1000",
"legend": "master"
},
{
"refId": "A",
"expr": "canal_instance_put_delay{destination=~\"$destination\"} / 1000",
"legend": "put"
},
{
"refId": "B",
"expr": "canal_instance_get_delay{destination=~\"$destination\"} / 1000",
"legend": "get"
},
{
"refId": "C",
"expr": "canal_instance_ack_delay{destination=~\"$destination\"} / 1000",
"legend": "ack"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "131cbcbe-29e7-469a-bb17-5914a8471ee7",
"type": "timeseries",
"name": "Blocking",
"description": "sink<6E>߳<EFBFBD>blockingռ<67>ȣ<EFBFBD>dump<6D>߳<EFBFBD>blockingռ<67><D5BC>(<28><>parallel mode)<29><>",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 18,
"y": 1,
"i": "131cbcbe-29e7-469a-bb17-5914a8471ee7"
},
"targets": [
{
"refId": "B",
"expr": "clamp_max(rate(canal_instance_publish_blocking_time{destination=~\"$destination\", parser=\"0\"}[2m]), 1000) / 10",
"legend": "dump"
},
{
"refId": "A",
"expr": "clamp_max(rate(canal_instance_sink_blocking_time{destination=~\"$destination\"}[2m]), 1000) / 10",
"legend": "sink"
},
{
"refId": "C",
"expr": "clamp_max(rate(canal_instance_publish_blocking_time{destination=~\"$destination\", parser=\"1\"}[2m]), 1000) / 10",
"legend": "dump-1"
},
{
"refId": "D",
"expr": "clamp_max(rate(canal_instance_publish_blocking_time{destination=~\"$destination\", parser=\"2\"}[2m]), 1000) / 10",
"legend": "dump-2"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "de248e75-37cb-4536-874c-fbdd61a4a6a4",
"type": "row",
"name": "Throughput",
"collapsed": true,
"layout": {
"h": 1,
"w": 24,
"x": 0,
"y": 6,
"i": "de248e75-37cb-4536-874c-fbdd61a4a6a4"
},
"panels": []
},
{
"version": "2.0.0",
"id": "16e7b311-3e9e-4c17-874e-4ef3beb8779f",
"type": "timeseries",
"name": "TPS(table rows)",
"description": "Instance<63><65><EFBFBD><EFBFBD>binlog<6F><67>TPS(<28><>master<65><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>table rowsΪ<73><CEAA>׼<EFBFBD><D7BC><EFBFBD><EFBFBD>)<29><>\nput: put<75><74><EFBFBD><EFBFBD>TPS<50><53>\nget: get<65><74><EFBFBD><EFBFBD>TPS<50><53>\nack: ack<63><6B><EFBFBD><EFBFBD>TPS<50><53>",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 0,
"y": 7,
"i": "16e7b311-3e9e-4c17-874e-4ef3beb8779f"
},
"targets": [
{
"refId": "A",
"expr": "rate(canal_instance_put_rows{destination=~\"$destination\"}[2m])",
"legend": "put"
},
{
"refId": "B",
"expr": "rate(canal_instance_get_rows{destination=~\"$destination\"}[2m])",
"legend": "get"
},
{
"refId": "C",
"expr": "rate(canal_instance_ack_rows{destination=~\"$destination\"}[2m])",
"legend": "ack"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "791852f6-dad5-43fd-8629-3f84f8b4ae85",
"type": "timeseries",
"name": "TPS(MySQL transaction)",
"description": "Canal instance <20><><EFBFBD><EFBFBD>binlog<6F><67>TPS<50><53><EFBFBD><EFBFBD>MySQL transactionΪ<6E><CEAA>λ<EFBFBD><CEBB><EFBFBD>㡣",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 6,
"y": 7,
"i": "791852f6-dad5-43fd-8629-3f84f8b4ae85"
},
"targets": [
{
"refId": "A",
"expr": "rate(canal_instance_transactions{destination=~\"$destination\"}[2m])",
"legend": "transactions"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "3de66e9d-a9ad-41a9-8a48-8911e382e1fe",
"type": "row",
"name": "Client",
"collapsed": true,
"layout": {
"h": 1,
"w": 24,
"x": 0,
"y": 12,
"i": "3de66e9d-a9ad-41a9-8a48-8911e382e1fe"
},
"panels": []
},
{
"version": "2.0.0",
"id": "74c61ee7-2c28-4ee4-997d-e9a4bd9e7183",
"type": "timeseries",
"name": "Client requests",
"description": "Canal instance<63><65><EFBFBD>յ<EFBFBD><D5B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͳ<EFBFBD>ƣ<EFBFBD><C6A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>packet type<70><65><EFBFBD>ࡣ",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 0,
"y": 13,
"i": "74c61ee7-2c28-4ee4-997d-e9a4bd9e7183"
},
"targets": [
{
"refId": "A",
"expr": "canal_instance_client_packets{destination=~\"$destination\"}",
"legend": "{{packetType}}"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "037002c9-dda5-4ce2-b8a3-d14e8ef9440b",
"type": "timeseries",
"name": "Client QPS",
"description": "client <20><><EFBFBD><EFBFBD><EFBFBD>GET<45><54>ACK<43><4B><EFBFBD><EFBFBD>QPS<50><53>",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 6,
"y": 13,
"i": "037002c9-dda5-4ce2-b8a3-d14e8ef9440b"
},
"targets": [
{
"refId": "A",
"expr": "rate(canal_instance_client_packets{destination=~\"$destination\",packetType=\"GET\"}[2m])",
"legend": "GET"
},
{
"refId": "B",
"expr": "rate(canal_instance_client_packets{destination=~\"$destination\",packetType=\"CLIENTACK\"}[2m])",
"legend": "ACK"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "2a433709-f08d-404a-acd6-3ef295157b83",
"type": "timeseries",
"name": "Empty packets",
"description": "server<65><72>ӦGET<45><54><EFBFBD>󣬵<EFBFBD><F3A3ACB5><EFBFBD><EFBFBD>ؿհ<D8BF><D5B0><EFBFBD>ռ<EFBFBD>ȡ<EFBFBD>",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 12,
"y": 13,
"i": "2a433709-f08d-404a-acd6-3ef295157b83"
},
"targets": [
{
"refId": "A",
"expr": "rate(canal_instance_client_empty_batches{destination=~\"$destination\"}[2m])",
"legend": "empty"
},
{
"refId": "B",
"expr": "rate(canal_instance_client_packets{destination=~\"$destination\", packetType=\"GET\"}[2m])",
"legend": "nonempty"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "1c262e9e-1dc5-4aae-bf8c-0e4c3e85a84f",
"type": "timeseries",
"name": "Response time",
"description": "Canal client <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ӧʱ<D3A6><CAB1>ĸſ<C4B8><C5BF><EFBFBD>",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 18,
"y": 13,
"i": "1c262e9e-1dc5-4aae-bf8c-0e4c3e85a84f"
},
"targets": [
{
"refId": "A",
"expr": "rate(canal_instance_client_request_latency_bucket{destination=~\"$destination\"}[2m])",
"legend": "{{le}}ms"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "ae68fd29-4dd4-445a-86b9-76144d23d27c",
"type": "row",
"name": "Store",
"collapsed": true,
"layout": {
"h": 1,
"w": 24,
"x": 0,
"y": 18,
"i": "ae68fd29-4dd4-445a-86b9-76144d23d27c"
},
"panels": []
},
{
"version": "2.0.0",
"id": "27b7365c-2bca-42b7-836d-33dc769b2a4e",
"type": "timeseries",
"name": "Store remain events",
"description": "Canal instance ringbuffer<65><72>δ<EFBFBD>ͷŵ<CDB7>events<74><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD>",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 0,
"y": 19,
"i": "27b7365c-2bca-42b7-836d-33dc769b2a4e"
},
"targets": [
{
"refId": "A",
"expr": "canal_instance_store_produce_seq{destination=~\"$destination\"} - canal_instance_store_consume_seq{destination=~\"$destination\"}",
"legend": "events"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
},
{
"version": "2.0.0",
"id": "f399e86f-8f87-43fe-80a2-5b6f2ef7529f",
"type": "timeseries",
"name": "Store remain mem",
"description": "Canal instance ringbuffer <20><>δ<EFBFBD>ͷ<EFBFBD>eventsռ<73><D5BC><EFBFBD>ڴ档",
"links": [],
"layout": {
"h": 5,
"w": 6,
"x": 6,
"y": 19,
"i": "f399e86f-8f87-43fe-80a2-5b6f2ef7529f"
},
"targets": [
{
"refId": "A",
"expr": "(canal_instance_store_produce_mem{destination=~\"$destination\"} - canal_instance_store_consume_mem{destination=~\"$destination\"}) / 1024",
"legend": "memsize"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
}
},
"custom": {
"version": "2.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.5,
"stack": "off"
}
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -10,7 +10,7 @@
### 配置文件示例:
其中label_key: `instance` label: `service` 为[dashboard](../dashboard/victoriametrics.json)中选择变量,如果有特殊需求,可自行修改或者添加
其中label_key: `instance` label: `service` 为[dashboard](../dashboard/victoriametrics.json)中选择变量,制作版本为v1.83.0已经在1.90.0进行过验证理论上适配当前1.70.0以上所有版本,指标描述全部补齐,并调整为中文,这个仪表盘为官方推荐的集群仪表盘,一直在持续更新,推荐使用这个
```toml
# vmstorage