Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/src/main/resources/jmx/rules/broker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ rules:
type: param(request)
mapping:
Count:
metric: kafka.request.size.total
metric: kafka.request.size
type: counter
desc: The total size of requests received by the broker
unit: By
Expand Down Expand Up @@ -133,7 +133,7 @@ rules:
unit: ms
mapping:
Count:
metric: kafka.request.time.total
metric: kafka.request.time
type: counter
desc: The total time the broker has taken to service requests
Mean:
Expand All @@ -159,7 +159,7 @@ rules:
unit: ms
mapping:
Count:
metric: kafka.request.queue.time.total
metric: kafka.request.queue.time
type: counter
desc: The total time the broker has taken to dequeue requests
Mean:
Expand All @@ -181,7 +181,7 @@ rules:
unit: ms
mapping:
Count:
metric: kafka.response.queue.time.total
metric: kafka.response.queue.time
type: counter
desc: The total time the broker has taken to dequeue responses
Mean:
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/jmx/rules/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ rules:
- bean: kafka.server:type=KafkaRequestHandlerPool,name=RequestHandlerAvgIdlePercent
mapping:
Count:
metric: kafka.io.threads.idle.time.total
metric: kafka.io.threads.idle.time
type: counter
desc: The total time the io threads are idle
unit: ns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,10 @@ public static boolean isTraceEnable() {
}

private void init() {
String nodeType = getNodeType();

Attributes baseAttributes = Attributes.builder()
.put(ResourceAttributes.SERVICE_NAMESPACE, clusterId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove SERVICE_NAMESPACE?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open source prom: job = service_namespace + service_name
aliyun prom: job = service_name
by removing service_namespace, we can have the same value (cluster_id) of job label for both implementations

.put(ResourceAttributes.SERVICE_NAME, nodeType)
.put(ResourceAttributes.SERVICE_NAME, clusterId)
.put(ResourceAttributes.SERVICE_INSTANCE_ID, String.valueOf(kafkaConfig.nodeId()))
.put("instance", String.valueOf(kafkaConfig.nodeId())) // for Aliyun Prometheus compatibility
.build();

Resource resource = Resource.empty().toBuilder()
Expand Down
210 changes: 97 additions & 113 deletions docker/telemetry/grafana/provisioning/dashboards/Developer/detailed.json

Large diffs are not rendered by default.

83 changes: 26 additions & 57 deletions docker/telemetry/grafana/provisioning/dashboards/User/broker.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance, error) (rate(kafka_request_error_count_total{job=~\"$cluster_id/$node_type\", instance=~\"$node_id\", error!=\"NONE\"}[$__rate_interval]))",
"expr": "sum by(instance, error) (rate(kafka_request_error_count_total{job=\"$cluster_id\", instance=~\"$node_id\", error!=\"NONE\"}[$__rate_interval]))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -210,7 +210,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance, listener) (kafka_server_connection_count{job=~\"$cluster_id/$node_type\", instance=~\"$node_id\"})",
"expr": "sum by(instance, listener) (kafka_server_connection_count{job=\"$cluster_id\", instance=~\"$node_id\"})",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -309,7 +309,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "kafka_partition_count{job=~\"$cluster_id/$node_type\", instance=~\"$node_id\"}",
"expr": "kafka_partition_count{job=\"$cluster_id\", instance=~\"$node_id\"}",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -409,7 +409,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (rate(kafka_message_count_total{job=~\"$cluster_id/$node_type\", instance=~\"$node_id\"}[$__rate_interval]))",
"expr": "sum by(instance) (rate(kafka_message_count_total{job=\"$cluster_id\", instance=~\"$node_id\"}[$__rate_interval]))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -513,7 +513,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (rate(kafka_network_io_bytes_total{job=~\"$cluster_id/.*\", direction=\"in\", instance=~\"$node_id\"}[$__rate_interval]))",
"expr": "sum by(instance) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", direction=\"in\", instance=~\"$node_id\"}[$__rate_interval]))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -617,7 +617,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (rate(kafka_network_io_bytes_total{job=~\"$cluster_id/.*\", direction=\"out\", instance=~\"$node_id\"}[$__rate_interval]))",
"expr": "sum by(instance) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", direction=\"out\", instance=~\"$node_id\"}[$__rate_interval]))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -717,7 +717,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(topic, instance) (rate(kafka_message_count_total{job=~\"$cluster_id/$node_type\", instance=~\"$node_id\"}[$__rate_interval]))",
"expr": "sum by(topic, instance) (rate(kafka_message_count_total{job=\"$cluster_id\", instance=~\"$node_id\"}[$__rate_interval]))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -821,7 +821,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(topic, instance) (rate(kafka_network_io_bytes_total{job=~\"$cluster_id/.*\", direction=\"in\", instance=~\"$node_id\"}[$__rate_interval]))",
"expr": "sum by(topic, instance) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", direction=\"in\", instance=~\"$node_id\"}[$__rate_interval]))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -925,7 +925,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(topic, instance) (rate(kafka_network_io_bytes_total{job=~\"$cluster_id/.*\", direction=\"out\", instance=~\"$node_id\"}[$__rate_interval]))",
"expr": "sum by(topic, instance) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", direction=\"out\", instance=~\"$node_id\"}[$__rate_interval]))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -1029,7 +1029,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance, topic) (rate(kafka_request_count_total{job=~\"$cluster_id/.*\", instance=~\"$node_id\", type=\"Produce\"}[$__rate_interval]))",
"expr": "sum by(instance, topic) (rate(kafka_request_count_total{job=\"$cluster_id\", instance=~\"$node_id\", type=\"Produce\"}[$__rate_interval]))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -1133,7 +1133,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance, topic) (rate(kafka_request_count_total{job=~\"$cluster_id/.*\", instance=~\"$node_id\", type=\"Fetch\"}[$__rate_interval]))",
"expr": "sum by(instance, topic) (rate(kafka_request_count_total{job=\"$cluster_id\", instance=~\"$node_id\", type=\"Fetch\"}[$__rate_interval]))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
Expand Down Expand Up @@ -1233,7 +1233,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (kafka_request_time_99p_milliseconds{job=~\"$cluster_id/.*\", instance=~\"$node_id\", type=\"Produce\"})",
"expr": "sum by(instance) (kafka_request_time_99p_milliseconds{job=\"$cluster_id\", instance=~\"$node_id\", type=\"Produce\"})",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
Expand All @@ -1250,7 +1250,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (kafka_request_time_mean_milliseconds{job=~\"$cluster_id/.*\", instance=~\"$node_id\", type=\"Produce\"})",
"expr": "sum by(instance) (kafka_request_time_mean_milliseconds{job=\"$cluster_id\", instance=~\"$node_id\", type=\"Produce\"})",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
Expand All @@ -1267,7 +1267,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (kafka_request_time_50p_milliseconds{job=~\"$cluster_id/.*\", instance=~\"$node_id\", type=\"Produce\"})",
"expr": "sum by(instance) (kafka_request_time_50p_milliseconds{job=\"$cluster_id\", instance=~\"$node_id\", type=\"Produce\"})",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
Expand All @@ -1284,7 +1284,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (kafka_request_time_max_milliseconds{job=~\"$cluster_id/.*\", instance=~\"$node_id\", type=\"Produce\"})",
"expr": "sum by(instance) (kafka_request_time_max_milliseconds{job=\"$cluster_id\", instance=~\"$node_id\", type=\"Produce\"})",
"fullMetaSearch": false,
"hide": true,
"includeNullMetadata": true,
Expand Down Expand Up @@ -1389,7 +1389,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (kafka_request_time_99p_milliseconds{job=~\"$cluster_id/.*\", instance=~\"$node_id\", type=\"Fetch\"})",
"expr": "sum by(instance) (kafka_request_time_99p_milliseconds{job=\"$cluster_id\", instance=~\"$node_id\", type=\"Fetch\"})",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
Expand All @@ -1406,7 +1406,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (kafka_request_time_mean_milliseconds{job=~\"$cluster_id/.*\", instance=~\"$node_id\", type=\"Fetch\"})",
"expr": "sum by(instance) (kafka_request_time_mean_milliseconds{job=\"$cluster_id\", instance=~\"$node_id\", type=\"Fetch\"})",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
Expand All @@ -1423,7 +1423,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (kafka_request_time_50p_milliseconds{job=~\"$cluster_id/.*\", instance=~\"$node_id\", type=\"Fetch\"})",
"expr": "sum by(instance) (kafka_request_time_50p_milliseconds{job=\"$cluster_id\", instance=~\"$node_id\", type=\"Fetch\"})",
"fullMetaSearch": false,
"hide": false,
"includeNullMetadata": true,
Expand All @@ -1440,7 +1440,7 @@
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "sum by(instance) (kafka_request_time_max_milliseconds{job=~\"$cluster_id/.*\", instance=~\"$node_id\", type=\"Fetch\"})",
"expr": "sum by(instance) (kafka_request_time_max_milliseconds{job=\"$cluster_id\", instance=~\"$node_id\", type=\"Fetch\"})",
"fullMetaSearch": false,
"hide": true,
"includeNullMetadata": true,
Expand Down Expand Up @@ -1473,6 +1473,7 @@
"name": "datasource",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
Expand All @@ -1488,7 +1489,7 @@
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(job)",
"definition": "label_values(jvm_cpu_count,job)",
"hide": 0,
"includeAll": false,
"label": "Cluster Id",
Expand All @@ -1497,43 +1498,11 @@
"options": [],
"query": {
"qryType": 1,
"query": "label_values(job)",
"query": "label_values(jvm_cpu_count,job)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 2,
"regex": "/(?<value>[^\"]+)\\//",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {
"selected": true,
"text": [
"All"
],
"value": [
"$__all"
]
},
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(job)",
"hide": 0,
"includeAll": true,
"label": "Node Type",
"multi": true,
"name": "node_type",
"options": [],
"query": {
"qryType": 1,
"query": "label_values(job)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 2,
"regex": "/\\/(?<value>[^\"]+)/",
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
Expand All @@ -1552,7 +1521,7 @@
"type": "prometheus",
"uid": "${datasource}"
},
"definition": "label_values(instance)",
"definition": "label_values(jvm_cpu_count,instance)",
"hide": 0,
"includeAll": true,
"label": "Node Id",
Expand All @@ -1561,7 +1530,7 @@
"options": [],
"query": {
"qryType": 1,
"query": "label_values(instance)",
"query": "label_values(jvm_cpu_count,instance)",
"refId": "PrometheusVariableQueryEditor-VariableQuery"
},
"refresh": 2,
Expand All @@ -1580,6 +1549,6 @@
"timezone": "",
"title": "Broker Metrics",
"uid": "e97dc219-c0c7-4bbe-9616-cdafb3451a3b",
"version": 5,
"version": 11,
"weekStart": ""
}
Loading