dnskr opened a new issue, #6565: URL: https://github.com/apache/kyuubi/issues/6565
### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) ### Search before asking - [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues. ### What would you like to be improved? Current monitoring configuration in the Helm chart seems to be inconsistent and not convenient to use. ### Inconsistency Property `monitoring.prometheus.enabled` is used for `kyuubi.metrics.enabled` which seems to be confusing, because metrics can be enabled without `PROMETHEUS` reporter. Also using `monitoring.prometheus.enabled` in `PrometheusRule`, `ServiceMonitor` and `PodMonitor` conditions is redundant, because having `PROMETHEUS` in `metricsReporters` is enough for the check. ### Bug The following conditions check if `metricsReporters` equal to `PROMETHEUS`: https://github.com/apache/kyuubi/blob/8f37390a66d75f686e35a6ba214923e7de99a9cf/charts/kyuubi/templates/kyuubi-alert.yaml#L18 https://github.com/apache/kyuubi/blob/8f37390a66d75f686e35a6ba214923e7de99a9cf/charts/kyuubi/templates/kyuubi-podmonitor.yaml#L18 https://github.com/apache/kyuubi/blob/8f37390a66d75f686e35a6ba214923e7de99a9cf/charts/kyuubi/templates/kyuubi-servicemonitor.yaml#L18 However, `metricsReporters` is used to initialize `kyuubi.metrics.reporters` which is [a comma-separated list for all metrics reporters](https://kyuubi.readthedocs.io/en/master/configuration/settings.html#metrics:~:text=A%20comma%2Dseparated%20list%20for%20all%20metrics%20reporters). I.e. `metricsReporters` can be also `PROMETHEUS,CONSOLE`, `JMX,PROMETHEUS,CONSOLE` etc. The implementation should consider such cases in the conditions and check if `PROMETHEUS` included into the comma-separated list. The command renders `PrometheusRule`: ```shell helm template kyuubi charts/kyuubi --set prometheusRule.enabled=true --set metricsReporters="PROMETHEUS" --show-only templates/kyuubi-alert.yaml ``` These commands also should render `PrometheusRule`: ```shell helm template kyuubi charts/kyuubi --set prometheusRule.enabled=true --set metricsReporters="JMX\,PROMETHEUS" --show-only templates/kyuubi-alert.yaml helm template kyuubi charts/kyuubi --set prometheusRule.enabled=true --set metricsReporters="PROMETHEUS\,CONSOLE" --show-only templates/kyuubi-alert.yaml helm template kyuubi charts/kyuubi --set prometheusRule.enabled=true --set metricsReporters="JMX\,PROMETHEUS\,CONSOLE" --show-only templates/kyuubi-alert.yaml ``` ### How should we improve? Fix the bug and change values structure, for instance to the following: ```yaml metrics: # Use for kyuubi.metrics.enabled value enabled: true # Use for kyuubi.metrics.reporters value reporters: PROMETHEUS # Use for kyuubi.metrics.prometheus.port value and for the chart templates prometheusPort: 10019 # Move inside "metrics" tree to keep monitoring related configs together podMonitor: enabled: false ... # Move inside "metrics" tree to keep monitoring related configs together serviceMonitor: enabled: false ... # Move inside "metrics" tree to keep monitoring related configs together prometheusRule: enabled: false ... ``` ### Are you willing to submit PR? - [X] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to improve. - [ ] No. I cannot submit a PR at this time. -- 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.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