This is an automated email from the ASF dual-hosted git repository. wu-sheng pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git
commit d73818e622b6e0fc9304fa661819c1b1c3f08f17 Author: Wu Sheng <[email protected]> AuthorDate: Thu May 21 20:22:46 2026 +0800 templates: scalar latest(...) → cards, split k8s_service pod tables Class 2 — widgets that combined several scalar latest(...) metrics into one line (which collapses each to a single point, violating the widget-type-follows-MQE-shape rule; upstream renders each as a Card): - kafka (instance): ISR shrinks/expands, under-replicated / under-min-isr - rocketmq: messages produced/consumed today + yesterday, topics, brokers - elasticsearch: shard-state breakdown (5), index size all/primary - flink: slots total/available - clickhouse: keeper alive conns / outstanding …now split into individual cards. Class 3 — k8s_service "Service Pods" folded a plain pod_total line with two labeled latest(...) metrics; split into a pod-total line plus "Pods Waiting" / "Pod Restarts" tables. --- .../src/bundled_templates/layers/clickhouse.json | 27 +++--- .../bundled_templates/layers/elasticsearch.json | 96 ++++++++++++++++------ apps/bff/src/bundled_templates/layers/flink.json | 25 ++++-- .../src/bundled_templates/layers/k8s_service.json | 41 ++++++--- apps/bff/src/bundled_templates/layers/kafka.json | 50 +++++++---- .../bff/src/bundled_templates/layers/rocketmq.json | 79 +++++++++++------- 6 files changed, 215 insertions(+), 103 deletions(-) diff --git a/apps/bff/src/bundled_templates/layers/clickhouse.json b/apps/bff/src/bundled_templates/layers/clickhouse.json index 0d8dd33..9bb5f79 100644 --- a/apps/bff/src/bundled_templates/layers/clickhouse.json +++ b/apps/bff/src/bundled_templates/layers/clickhouse.json @@ -252,19 +252,26 @@ "rowSpan": 2 }, { - "id": "keeper", - "title": "Keeper", - "type": "line", + "id": "keeper_alive", + "title": "Keeper Alive Conns", + "type": "card", "expressions": [ - "latest(aggregate_labels(meter_clickhouse_keeper_connections_alive,sum))", - "latest(aggregate_labels(meter_clickhouse_keeper_outstanding_requests,sum))" + "latest(aggregate_labels(meter_clickhouse_keeper_connections_alive,sum))" ], - "expressionLabels": [ - "alive conns", - "outstanding" + "span": 3, + "rowSpan": 1, + "format": "int" + }, + { + "id": "keeper_outstanding", + "title": "Keeper Outstanding Requests", + "type": "card", + "expressions": [ + "latest(aggregate_labels(meter_clickhouse_keeper_outstanding_requests,sum))" ], - "span": 6, - "rowSpan": 2 + "span": 3, + "rowSpan": 1, + "format": "int" } ], "instance": [ diff --git a/apps/bff/src/bundled_templates/layers/elasticsearch.json b/apps/bff/src/bundled_templates/layers/elasticsearch.json index 619772c..bd0c844 100644 --- a/apps/bff/src/bundled_templates/layers/elasticsearch.json +++ b/apps/bff/src/bundled_templates/layers/elasticsearch.json @@ -125,25 +125,59 @@ "rowSpan": 1 }, { - "id": "shards_breakdown", - "title": "Shards Breakdown", - "type": "line", + "id": "shards_active", + "title": "Active Shards", + "type": "card", "expressions": [ - "latest(meter_elasticsearch_cluster_shards_total)", - "latest(meter_elasticsearch_cluster_initializing_shards_total)", - "latest(meter_elasticsearch_cluster_relocating_shards_total)", - "latest(meter_elasticsearch_cluster_unassigned_shards_total)", - "latest(meter_elasticsearch_cluster_delayed_unassigned_shards_total)" + "latest(meter_elasticsearch_cluster_shards_total)" ], - "expressionLabels": [ - "active", - "initializing", - "relocating", - "unassigned", - "delayed-unassigned" + "span": 2, + "rowSpan": 1, + "format": "int" + }, + { + "id": "shards_initializing", + "title": "Initializing", + "type": "card", + "expressions": [ + "latest(meter_elasticsearch_cluster_initializing_shards_total)" ], - "span": 6, - "rowSpan": 2 + "span": 2, + "rowSpan": 1, + "format": "int" + }, + { + "id": "shards_relocating", + "title": "Relocating", + "type": "card", + "expressions": [ + "latest(meter_elasticsearch_cluster_relocating_shards_total)" + ], + "span": 2, + "rowSpan": 1, + "format": "int" + }, + { + "id": "shards_unassigned", + "title": "Unassigned", + "type": "card", + "expressions": [ + "latest(meter_elasticsearch_cluster_unassigned_shards_total)" + ], + "span": 2, + "rowSpan": 1, + "format": "int" + }, + { + "id": "shards_delayed", + "title": "Delayed Unassigned", + "type": "card", + "expressions": [ + "latest(meter_elasticsearch_cluster_delayed_unassigned_shards_total)" + ], + "span": 2, + "rowSpan": 1, + "format": "int" }, { "id": "breakers", @@ -393,20 +427,28 @@ "rowSpan": 2 }, { - "id": "data_size", - "title": "Index Size", - "type": "line", - "unit": "GB", + "id": "idx_size_all", + "title": "Index Size (all shards)", + "type": "card", "expressions": [ - "latest(meter_elasticsearch_index_indices_store_size_bytes_total)/1024/1024/1024", - "latest(meter_elasticsearch_index_indices_store_size_bytes_primary)/1024/1024/1024" + "latest(meter_elasticsearch_index_indices_store_size_bytes_total)/1024/1024/1024" ], - "expressionLabels": [ - "all shards", - "primary" + "span": 3, + "rowSpan": 1, + "format": "decimal", + "unit": "GB" + }, + { + "id": "idx_size_primary", + "title": "Index Size (primary)", + "type": "card", + "expressions": [ + "latest(meter_elasticsearch_index_indices_store_size_bytes_primary)/1024/1024/1024" ], - "span": 6, - "rowSpan": 2 + "span": 3, + "rowSpan": 1, + "format": "decimal", + "unit": "GB" }, { "id": "docs", diff --git a/apps/bff/src/bundled_templates/layers/flink.json b/apps/bff/src/bundled_templates/layers/flink.json index 1fb3f43..5afa613 100644 --- a/apps/bff/src/bundled_templates/layers/flink.json +++ b/apps/bff/src/bundled_templates/layers/flink.json @@ -93,19 +93,26 @@ "rowSpan": 1 }, { - "id": "slots", - "title": "Slots Total / Available", - "type": "line", + "id": "slots_total", + "title": "Slots Total", + "type": "card", "expressions": [ - "latest(meter_flink_jobManager_taskManagers_slots_total)", - "latest(meter_flink_jobManager_taskManagers_slots_available)" + "latest(meter_flink_jobManager_taskManagers_slots_total)" ], - "expressionLabels": [ - "total", - "available" + "span": 3, + "rowSpan": 1, + "format": "int" + }, + { + "id": "slots_available", + "title": "Slots Available", + "type": "card", + "expressions": [ + "latest(meter_flink_jobManager_taskManagers_slots_available)" ], "span": 3, - "rowSpan": 2 + "rowSpan": 1, + "format": "int" }, { "id": "cpu_load", diff --git a/apps/bff/src/bundled_templates/layers/k8s_service.json b/apps/bff/src/bundled_templates/layers/k8s_service.json index ad8aba5..50d8019 100644 --- a/apps/bff/src/bundled_templates/layers/k8s_service.json +++ b/apps/bff/src/bundled_templates/layers/k8s_service.json @@ -107,23 +107,44 @@ "dashboards": { "service": [ { - "id": "pod_capacity", + "id": "pod_total", "title": "Service Pods", - "tip": "Pod count + waiting / restart counters.", "type": "line", "expressions": [ - "k8s_service_pod_total", - "latest(k8s_service_pod_status_waiting)", + "k8s_service_pod_total" + ], + "span": 4, + "rowSpan": 2 + }, + { + "id": "pod_waiting", + "title": "Pods Waiting", + "type": "table", + "expressions": [ + "latest(k8s_service_pod_status_waiting)" + ], + "tableHeaders": [ + "Container \u00b7 Pod \u00b7 Reason", + "" + ], + "showTableValues": false, + "span": 4, + "rowSpan": 3 + }, + { + "id": "pod_restarts", + "title": "Pod Restarts", + "type": "table", + "expressions": [ "latest(k8s_service_pod_status_restarts_total)" ], - "expressionLabels": [ - "total", - "waiting", - "restarts" + "tableHeaders": [ + "Pod", + "Restarts" ], + "showTableValues": true, "span": 4, - "rowSpan": 2, - "format": "int" + "rowSpan": 3 }, { "id": "cpu_resources", diff --git a/apps/bff/src/bundled_templates/layers/kafka.json b/apps/bff/src/bundled_templates/layers/kafka.json index 0052052..8712319 100644 --- a/apps/bff/src/bundled_templates/layers/kafka.json +++ b/apps/bff/src/bundled_templates/layers/kafka.json @@ -217,19 +217,26 @@ "rowSpan": 2 }, { - "id": "isr", - "title": "ISR Shrinks / Expands", - "type": "line", + "id": "isr_shrinks", + "title": "ISR Shrinks/s", + "type": "card", "expressions": [ - "latest(meter_kafka_broker_isr_shrinks_per_second)", - "latest(meter_kafka_broker_isr_expands_per_second)" + "latest(meter_kafka_broker_isr_shrinks_per_second)" ], - "expressionLabels": [ - "shrinks", - "expands" + "span": 3, + "rowSpan": 1, + "format": "decimal" + }, + { + "id": "isr_expands", + "title": "ISR Expands/s", + "type": "card", + "expressions": [ + "latest(meter_kafka_broker_isr_expands_per_second)" ], "span": 3, - "rowSpan": 2 + "rowSpan": 1, + "format": "decimal" }, { "id": "mem_pct", @@ -244,18 +251,25 @@ }, { "id": "under_replicated", - "title": "Under-Replicated", - "type": "line", + "title": "Under-Replicated Partitions", + "type": "card", "expressions": [ - "latest(meter_kafka_broker_under_replicated_partitions)", - "latest(meter_kafka_broker_under_min_isr_partition_count)" + "latest(meter_kafka_broker_under_replicated_partitions)" ], - "expressionLabels": [ - "under-replicated", - "under-min-isr" + "span": 3, + "rowSpan": 1, + "format": "int" + }, + { + "id": "under_min_isr", + "title": "Under Min-ISR Partitions", + "type": "card", + "expressions": [ + "latest(meter_kafka_broker_under_min_isr_partition_count)" ], - "span": 6, - "rowSpan": 2 + "span": 3, + "rowSpan": 1, + "format": "int" }, { "id": "partitions_leaders", diff --git a/apps/bff/src/bundled_templates/layers/rocketmq.json b/apps/bff/src/bundled_templates/layers/rocketmq.json index 69cc538..daecf9a 100644 --- a/apps/bff/src/bundled_templates/layers/rocketmq.json +++ b/apps/bff/src/bundled_templates/layers/rocketmq.json @@ -80,34 +80,48 @@ "dashboards": { "service": [ { - "id": "today_msgs", - "title": "Messages Today", - "type": "line", + "id": "today_produced", + "title": "Produced Today", + "type": "card", + "expressions": [ + "latest(meter_rocketmq_cluster_messages_produced_today)" + ], + "span": 3, + "rowSpan": 1, + "format": "int" + }, + { + "id": "today_consumed", + "title": "Consumed Today", + "type": "card", "expressions": [ - "latest(meter_rocketmq_cluster_messages_produced_today)", "latest(meter_rocketmq_cluster_messages_consumed_today)" ], - "expressionLabels": [ - "produced", - "consumed" + "span": 3, + "rowSpan": 1, + "format": "int" + }, + { + "id": "yesterday_produced", + "title": "Produced Yesterday", + "type": "card", + "expressions": [ + "latest(meter_rocketmq_cluster_messages_produced_until_yesterday)" ], - "span": 6, - "rowSpan": 2 + "span": 3, + "rowSpan": 1, + "format": "int" }, { - "id": "yesterday_msgs", - "title": "Messages Yesterday", - "type": "line", + "id": "yesterday_consumed", + "title": "Consumed Yesterday", + "type": "card", "expressions": [ - "latest(meter_rocketmq_cluster_messages_produced_until_yesterday)", "latest(meter_rocketmq_cluster_messages_consumed_until_yesterday)" ], - "expressionLabels": [ - "produced", - "consumed" - ], - "span": 6, - "rowSpan": 2 + "span": 3, + "rowSpan": 1, + "format": "int" }, { "id": "tps", @@ -183,19 +197,26 @@ "rowSpan": 2 }, { - "id": "topics_brokers", - "title": "Topics / Brokers", - "type": "line", + "id": "topic_count", + "title": "Topics", + "type": "card", "expressions": [ - "latest(meter_rocketmq_cluster_topic_count)", - "latest(meter_rocketmq_cluster_broker_count)" + "latest(meter_rocketmq_cluster_topic_count)" ], - "expressionLabels": [ - "topics", - "brokers" + "span": 3, + "rowSpan": 1, + "format": "int" + }, + { + "id": "broker_count", + "title": "Brokers", + "type": "card", + "expressions": [ + "latest(meter_rocketmq_cluster_broker_count)" ], - "span": 12, - "rowSpan": 2 + "span": 3, + "rowSpan": 1, + "format": "int" } ], "instance": [
