This is an automated email from the ASF dual-hosted git repository.
rongr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new ae55a7abf8 Catch-all Regex for JXM -> Prom Exporter (#12073)
ae55a7abf8 is described below
commit ae55a7abf83d88936507ca4771fe58825ce0adf9
Author: Prashant Pandey <[email protected]>
AuthorDate: Tue Jan 16 21:43:51 2024 +0530
Catch-all Regex for JXM -> Prom Exporter (#12073)
* jmx -> prom exporter catch-all regexes
* Keep the previous regex
* Fix incorrect capture group number
* Add regex to pinot.yml
* Remove commented lines
---
.../jmx_prometheus_javaagent/configs/broker.yml | 26 +++++++-
.../configs/controller.yml | 26 +++++++-
.../etc/jmx_prometheus_javaagent/configs/pinot.yml | 27 +++++++-
.../jmx_prometheus_javaagent/configs/server.yml | 77 +++++++---------------
4 files changed, 99 insertions(+), 57 deletions(-)
diff --git
a/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/broker.yml
b/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/broker.yml
index 04824fbb5c..ef2ab9f153 100644
--- a/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/broker.yml
+++ b/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/broker.yml
@@ -157,8 +157,7 @@ rules:
## Metrics that fit the catch-all patterns above should not be added to this
file.
## In case a metric does not fit the catch-all patterns, add them before
this comment
-
- # This is a catch-all pattern for pinot table metrics with offline/realtime
suffix.
+ # This is a catch-all pattern for pinot table metrics with offline/realtime
suffix without kafka topic
# Patterns after this line may be skipped.
- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\.(\\w+)\"?><>(\\w+)"
name: "pinot_$1_$4_$5"
@@ -166,6 +165,29 @@ rules:
labels:
table: "$2"
tableType: "$3"
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\.(\\w+)\"?><>(\\w+)"
+ name: "pinot_$1_$2_$6"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
+ partition: "$5"
+ #when there is no partition in the metric
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\\"?><>(\\w+)"
+ name: "pinot_$1_$2_$5"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
+ #This is a catch-all pattern for pinot table metrics with offline/realtime
suffix that also contain kafka topic
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\-(.+)\\-(\\w+)\"?><>(\\w+)"
+ name: "pinot_$1_$2_$7"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
+ topic: "$5"
+ partition: "$6"
# This is a catch-all pattern for pinot table metrics. Patterns after this
line may be skipped.
- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)\"?><>(\\w+)"
name: "pinot_$1_$3_$4"
diff --git
a/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/controller.yml
b/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/controller.yml
index e86243dfc1..c5c9809d2e 100644
--- a/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/controller.yml
+++ b/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/controller.yml
@@ -219,8 +219,7 @@ rules:
## Metrics that fit the catch-all patterns above should not be added to this
file.
## In case a metric does not fit the catch-all patterns, add them before
this comment
-
- # This is a catch-all pattern for pinot table metrics with offline/realtime
suffix.
+ # This is a catch-all pattern for pinot table metrics with offline/realtime
suffix without kafka topic
# Patterns after this line may be skipped.
- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\.(\\w+)\"?><>(\\w+)"
name: "pinot_$1_$4_$5"
@@ -228,6 +227,29 @@ rules:
labels:
table: "$2"
tableType: "$3"
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\.(\\w+)\"?><>(\\w+)"
+ name: "pinot_$1_$2_$6"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
+ partition: "$5"
+ #This is a catch-all pattern for pinot table metrics with offline/realtime
suffix that also contain kafka topic
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\-(.+)\\-(\\w+)\"?><>(\\w+)"
+ name: "pinot_$1_$2_$7"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
+ topic: "$5"
+ partition: "$6"
+ #when there is no partition in the metric
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\\"?><>(\\w+)"
+ name: "pinot_$1_$2_$5"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
# This is a catch-all pattern for pinot table metrics. Patterns after this
line may be skipped.
- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)\"?><>(\\w+)"
name: "pinot_$1_$3_$4"
diff --git a/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/pinot.yml
b/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/pinot.yml
index 1c435be787..6fc787cee9 100644
--- a/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/pinot.yml
+++ b/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/pinot.yml
@@ -503,7 +503,7 @@ rules:
## Metrics that fit the catch-all patterns above should not be added to this
file.
## In case a metric does not fit the catch-all patterns, add them before
this comment
- # This is a catch-all pattern for pinot table metrics with offline/realtime
suffix.
+ # This is a catch-all pattern for pinot table metrics with offline/realtime
suffix without topic or partition info
# Patterns after this line may be skipped.
- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\.(\\w+)\"?><>(\\w+)"
name: "pinot_$1_$4_$5"
@@ -511,6 +511,31 @@ rules:
labels:
table: "$2"
tableType: "$3"
+ # This is a catch-all pattern for pinot table metrics with offline/realtime
suffix without topic but containing partition
+ # Patterns after this line may be skipped.
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\.(\\w+)\"?><>(\\w+)"
+ name: "pinot_$1_$2_$6"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
+ partition: "$5"
+ # This is a catch-all pattern for pinot table metrics with offline/realtime
suffix with topic and partition
+ # Patterns after this line may be skipped.
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\-(.+)\\-(\\w+)\"?><>(\\w+)"
+ name: "pinot_$1_$2_$7"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
+ topic: "$5"
+ partition: "$6"
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\\"?><>(\\w+)"
+ name: "pinot_$1_$2_$5"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
# This is a catch-all pattern for pinot table metrics. Patterns after this
line may be skipped.
- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)\"?><>(\\w+)"
name: "pinot_$1_$3_$4"
diff --git
a/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/server.yml
b/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/server.yml
index 5e63275923..2ec4b39f16 100644
--- a/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/server.yml
+++ b/docker/images/pinot/etc/jmx_prometheus_javaagent/configs/server.yml
@@ -31,14 +31,6 @@ rules:
tableType: "$2"
topic: "$3"
partition: "$4"
-- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.highestStreamOffsetConsumed.([^\\.]*?)_(OFFLINE|REALTIME)\\-(.+)\\-(\\w+)\"><>(\\w+)"
- name: "pinot_server_highestStreamOffsetConsumed_$5"
- cache: true
- labels:
- table: "$1"
- tableType: "$2"
- topic: "$3"
- partition: "$4"
- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.lastRealtimeSegment(\\w+)Seconds.([^\\.]*?)_(OFFLINE|REALTIME)\\-(.+)\\-(\\w+)\"><>(\\w+)"
name: "pinot_server_lastRealtimeSegment$1Seconds_$6"
cache: true
@@ -50,21 +42,6 @@ rules:
- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.llcControllerResponse(\\w+)\"><>(\\w+)"
name: "pinot_server_llcControllerResponse_$1_$2"
cache: true
-- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.llcPartitionConsuming.([^\\.]*?)_(OFFLINE|REALTIME)\\-(.+)\\-(\\w+)\"><>(\\w+)"
- name: "pinot_server_llcPartitionConsuming_$5"
- cache: true
- labels:
- table: "$1"
- tableType: "$2"
- topic: "$3"
- partition: "$4"
-- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.realtimeIngestionDelayMs.([^\\.]*?)_(OFFLINE|REALTIME)\\.(\\w+)\"><>(\\w+)"
- name: "pinot_server_realtimeIngestionDelayMs_$4"
- cache: true
- labels:
- table: "$1"
- tableType: "$2"
- partition: "$3"
- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.llcSimultaneousSegmentBuilds\"><>(\\w+)"
name: "pinot_server_llcSimultaneousSegmentBuilds_$1"
cache: true
@@ -112,44 +89,17 @@ rules:
cache: true
labels:
table: "$1"
-- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.numResizes.([^\\.]*?)_(OFFLINE|REALTIME)\"><>(\\w+)"
- name: "pinot_server_numResizes_$3"
- cache: true
- labels:
- table: "$1"
- tableType: "$2"
- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.resizeTimeMs.([^\\.]*?)_(OFFLINE|REALTIME)\"><>(\\w+)"
name: "pinot_server_resizeTimeMs_$3"
cache: true
labels:
table: "$1"
tableType: "$2"
-- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.upsertPrimaryKeysCount.([^\\.]*?)_(OFFLINE|REALTIME).(\\w+)\"><>(\\w+)"
- name: "pinot_server_upsertPrimaryKeysCount_$4"
- cache: true
- labels:
- table: "$1"
- tableType: "$2"
- partition: "$3"
- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.version\\.(\\w+)\"?><>(\\w+)"
name: "pinot_$1_version"
cache: true
labels:
version: "$2"
-- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.upsertValidDocSnapshotCount.([^\\.]*?)_(OFFLINE|REALTIME).(\\w+)\"><>(\\w+)"
- name: "pinot_server_upsertValidDocSnapshotCount_$4"
- cache: true
- labels:
- table: "$1"
- tableType: "$2"
- partition: "$3"
-- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.upsertPrimaryKeysInSnapshotCount.([^\\.]*?)_(OFFLINE|REALTIME).(\\w+)\"><>(\\w+)"
- name: "pinot_server_upsertPrimaryKeysInSnapshotCount_$4"
- cache: true
- labels:
- table: "$1"
- tableType: "$2"
- partition: "$3"
#grpc related metrics
- pattern: "\"org.apache.pinot.common.metrics\"<type=\"ServerMetrics\",
name=\"pinot.server.grpc(.+)\"><>(\\w+)"
name: "pinot_server_grpc$1_$2"
@@ -157,8 +107,7 @@ rules:
## Metrics that fit the catch-all patterns above should not be added to this
file.
## In case a metric does not fit the catch-all patterns, add them before
this comment
-
- # This is a catch-all pattern for pinot table metrics with offline/realtime
suffix.
+ # This is a catch-all pattern for pinot table metrics with offline/realtime
suffix without the topic
# Patterns after this line may be skipped.
- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\.(\\w+)\"?><>(\\w+)"
name: "pinot_$1_$4_$5"
@@ -166,6 +115,30 @@ rules:
labels:
table: "$2"
tableType: "$3"
+#when there is partition but no topic in the metric
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\.(\\w+)\"?><>(\\w+)"
+ name: "pinot_$1_$2_$6"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
+ partition: "$5"
+#when there is partition and topic in the metric
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\-(.+)\\-(\\w+)\"?><>(\\w+)"
+ name: "pinot_$1_$2_$7"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
+ topic: "$5"
+ partition: "$6"
+#when there is no partition in the metric
+- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)_(OFFLINE|REALTIME)\\\"?><>(\\w+)"
+ name: "pinot_$1_$2_$5"
+ cache: true
+ labels:
+ table: "$3"
+ tableType: "$4"
# This is a catch-all pattern for pinot table metrics. Patterns after this
line may be skipped.
- pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?,
name=\"?pinot\\.(\\w+)\\.(\\w+)\\.(\\w+)\"?><>(\\w+)"
name: "pinot_$1_$3_$4"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]