dnskr opened a new pull request, #6580: URL: https://github.com/apache/kyuubi/pull/6580
# :mag: Description ## Issue References ๐ <!-- Append the issue number after #. If there is no issue for you to link create one or --> <!-- If there are no issues to link, please provide details here. --> This pull request fixes https://github.com/apache/kyuubi/issues/6565 ## Describe Your Solution ๐ง - Fixed misleading `kyuubi.metrics` properties in `charts/kyuubi/templates/kyuubi-configmap.yaml`. - Fixed condition to create `PodMonitor`, `ServiceMonitor` and `PrometheusRule`. - Move metrics related properties to `metrics` property tree. ## Types of changes :bookmark: <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan ๐งช #### Disabled metrics - prometheus port is not renderred ```shell helm template kyuubi charts/kyuubi --set metrics.enabled=false \ -s templates/kyuubi-statefulset.yaml \ -s templates/kyuubi-headless-service.yaml ``` #### JMX reporter only - prometheus port is not renderred ```shell helm template kyuubi charts/kyuubi --set metrics.reporters="JMX" \ -s templates/kyuubi-statefulset.yaml \ -s templates/kyuubi-headless-service.yaml ``` #### Default properties - prometheus port is renderred in StatefulSet and Headless Service ```shell helm template kyuubi charts/kyuubi -s templates/kyuubi-statefulset.yaml \ -s templates/kyuubi-headless-service.yaml ``` #### Default properties - PodMonitor is not renderred ```shell helm template kyuubi charts/kyuubi -s templates/kyuubi-podmonitor.yaml ``` #### Default properties - ServiceMonitor is not renderred ```shell helm template kyuubi charts/kyuubi -s templates/kyuubi-servicemonitor.yaml ``` #### Default properties - PrometheusRule is not renderred ```shell helm template kyuubi charts/kyuubi -s templates/kyuubi-alert.yaml ``` #### Enabled metrics, PodMonitor, ServiceMonitor, PrometheusRule, PROMETHEUS reporter and port set to 9999 ```shell helm template kyuubi charts/kyuubi --set metrics.enabled=true \ --set metrics.reporters="PROMETHEUS\, JMX" \ --set metrics.prometheusPort=9999 \ --set metrics.podMonitor.enabled=true \ --set metrics.serviceMonitor.enabled=true \ --set metrics.prometheusRule.enabled=true \ -s templates/kyuubi-statefulset.yaml \ -s templates/kyuubi-headless-service.yaml \ -s templates/kyuubi-configmap.yaml \ -s templates/kyuubi-podmonitor.yaml \ -s templates/kyuubi-servicemonitor.yaml \ -s templates/kyuubi-alert.yaml ``` #### Install the chart and test Prometheus endpoint ```shell helm install kyuubi charts/kyuubi --set metrics.enabled=true \ --set metrics.reporters="PROMETHEUS\, JMX" \ --set metrics.prometheusPort=9999 ... kyuubi@kyuubi-0:/opt/kyuubi$ curl 127.0.0.1:9999/metrics # HELP kyuubi_buffer_pool_mapped_count Generated from Dropwizard metric import (metric=kyuubi.buffer_pool.mapped.count, type=com.codahale.metrics.jvm.JmxAttributeGauge) # TYPE kyuubi_buffer_pool_mapped_count gauge kyuubi_buffer_pool_mapped_count 0.0 # HELP kyuubi_gc_MarkSweepCompact_time Generated from Dropwizard metric import (metric=kyuubi.gc.MarkSweepCompact.time, type=com.codahale.metrics.jvm.GarbageCollectorMetricSet$$Lambda$227/1493158871) # TYPE kyuubi_gc_MarkSweepCompact_time gauge kyuubi_gc_MarkSweepCompact_time 91.0 ... ``` --- # Checklist ๐ <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For additional commands, e-mail: notifications-h...@kyuubi.apache.org