miroslavmasaryk | aa5f0fa | 2023-03-20 10:21:36 +0100 | [diff] [blame] | 1 | {{/* |
| 2 | # Copyright (c) 2023 Deutsche Telekom |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License.. |
| 15 | */}} |
| 16 | lowercaseOutputName: true |
| 17 | rules: |
| 18 | # Special cases and very specific rules |
| 19 | - pattern: kafka.server<type=(.+), name=(.+), clientId=(.+), topic=(.+), partition=(.*)><>Value |
| 20 | name: kafka_server_$1_$2 |
| 21 | type: GAUGE |
| 22 | labels: |
| 23 | clientId: "$3" |
| 24 | topic: "$4" |
| 25 | partition: "$5" |
| 26 | - pattern: kafka.server<type=(.+), name=(.+), clientId=(.+), brokerHost=(.+), brokerPort=(.+)><>Value |
| 27 | name: kafka_server_$1_$2 |
| 28 | type: GAUGE |
| 29 | labels: |
| 30 | clientId: "$3" |
| 31 | broker: "$4:$5" |
| 32 | - pattern: kafka.server<type=(.+), cipher=(.+), protocol=(.+), listener=(.+), networkProcessor=(.+)><>connections |
| 33 | name: kafka_server_$1_connections_tls_info |
| 34 | type: GAUGE |
| 35 | labels: |
| 36 | cipher: "$2" |
| 37 | protocol: "$3" |
| 38 | listener: "$4" |
| 39 | networkProcessor: "$5" |
| 40 | - pattern: kafka.server<type=(.+), clientSoftwareName=(.+), clientSoftwareVersion=(.+), listener=(.+), networkProcessor=(.+)><>connections |
| 41 | name: kafka_server_$1_connections_software |
| 42 | type: GAUGE |
| 43 | labels: |
| 44 | clientSoftwareName: "$2" |
| 45 | clientSoftwareVersion: "$3" |
| 46 | listener: "$4" |
| 47 | networkProcessor: "$5" |
| 48 | - pattern: "kafka.server<type=(.+), listener=(.+), networkProcessor=(.+)><>(.+):" |
| 49 | name: kafka_server_$1_$4 |
| 50 | type: GAUGE |
| 51 | labels: |
| 52 | listener: "$2" |
| 53 | networkProcessor: "$3" |
| 54 | - pattern: kafka.server<type=(.+), listener=(.+), networkProcessor=(.+)><>(.+) |
| 55 | name: kafka_server_$1_$4 |
| 56 | type: GAUGE |
| 57 | labels: |
| 58 | listener: "$2" |
| 59 | networkProcessor: "$3" |
| 60 | # Some percent metrics use MeanRate attribute |
| 61 | # Ex) kafka.server<type=(KafkaRequestHandlerPool), name=(RequestHandlerAvgIdlePercent)><>MeanRate |
| 62 | - pattern: kafka.(\w+)<type=(.+), name=(.+)Percent\w*><>MeanRate |
| 63 | name: kafka_$1_$2_$3_percent |
| 64 | type: GAUGE |
| 65 | # Generic gauges for percents |
| 66 | - pattern: kafka.(\w+)<type=(.+), name=(.+)Percent\w*><>Value |
| 67 | name: kafka_$1_$2_$3_percent |
| 68 | type: GAUGE |
| 69 | - pattern: kafka.(\w+)<type=(.+), name=(.+)Percent\w*, (.+)=(.+)><>Value |
| 70 | name: kafka_$1_$2_$3_percent |
| 71 | type: GAUGE |
| 72 | labels: |
| 73 | "$4": "$5" |
| 74 | # Generic per-second counters with 0-2 key/value pairs |
| 75 | - pattern: kafka.(\w+)<type=(.+), name=(.+)PerSec\w*, (.+)=(.+), (.+)=(.+)><>Count |
| 76 | name: kafka_$1_$2_$3_total |
| 77 | type: COUNTER |
| 78 | labels: |
| 79 | "$4": "$5" |
| 80 | "$6": "$7" |
| 81 | - pattern: kafka.(\w+)<type=(.+), name=(.+)PerSec\w*, (.+)=(.+)><>Count |
| 82 | name: kafka_$1_$2_$3_total |
| 83 | type: COUNTER |
| 84 | labels: |
| 85 | "$4": "$5" |
| 86 | - pattern: kafka.(\w+)<type=(.+), name=(.+)PerSec\w*><>Count |
| 87 | name: kafka_$1_$2_$3_total |
| 88 | type: COUNTER |
| 89 | # Generic gauges with 0-2 key/value pairs |
| 90 | - pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+), (.+)=(.+)><>Value |
| 91 | name: kafka_$1_$2_$3 |
| 92 | type: GAUGE |
| 93 | labels: |
| 94 | "$4": "$5" |
| 95 | "$6": "$7" |
| 96 | - pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+)><>Value |
| 97 | name: kafka_$1_$2_$3 |
| 98 | type: GAUGE |
| 99 | labels: |
| 100 | "$4": "$5" |
| 101 | - pattern: kafka.(\w+)<type=(.+), name=(.+)><>Value |
| 102 | name: kafka_$1_$2_$3 |
| 103 | type: GAUGE |
| 104 | # Emulate Prometheus 'Summary' metrics for the exported 'Histogram's. |
| 105 | # Note that these are missing the '_sum' metric! |
| 106 | - pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+), (.+)=(.+)><>Count |
| 107 | name: kafka_$1_$2_$3_count |
| 108 | type: COUNTER |
| 109 | labels: |
| 110 | "$4": "$5" |
| 111 | "$6": "$7" |
| 112 | - pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.*), (.+)=(.+)><>(\d+)thPercentile |
| 113 | name: kafka_$1_$2_$3 |
| 114 | type: GAUGE |
| 115 | labels: |
| 116 | "$4": "$5" |
| 117 | "$6": "$7" |
| 118 | quantile: "0.$8" |
| 119 | - pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.+)><>Count |
| 120 | name: kafka_$1_$2_$3_count |
| 121 | type: COUNTER |
| 122 | labels: |
| 123 | "$4": "$5" |
| 124 | - pattern: kafka.(\w+)<type=(.+), name=(.+), (.+)=(.*)><>(\d+)thPercentile |
| 125 | name: kafka_$1_$2_$3 |
| 126 | type: GAUGE |
| 127 | labels: |
| 128 | "$4": "$5" |
| 129 | quantile: "0.$6" |
| 130 | - pattern: kafka.(\w+)<type=(.+), name=(.+)><>Count |
| 131 | name: kafka_$1_$2_$3_count |
| 132 | type: COUNTER |
| 133 | - pattern: kafka.(\w+)<type=(.+), name=(.+)><>(\d+)thPercentile |
| 134 | name: kafka_$1_$2_$3 |
| 135 | type: GAUGE |
| 136 | labels: |
| 137 | quantile: "0.$4" |