charts icon indicating copy to clipboard operation
charts copied to clipboard

[Trino] JMX Exporter Service Config

Open metalshanked opened this issue 9 months ago • 1 comments

I am using the default JMX Exporter settings in the helm chart. This springs up a sidecar standalone JMX container serving the metrics at localhost:5556

For accessing these metrics outside the cluster, a service or ingress needs to be setup Is there a way to have the configs set so that it auto-creates an Ingress and/or Cluster IP, NodePort services?

Thanks!

jmx:
  coordinator: {}
  enabled: true
  exporter:
    configProperties: |-
      hostPort: localhost:{{- .Values.jmx.registryPort }}
      startDelaySeconds: 0
      ssl: false
      lowercaseOutputName: false
      lowercaseOutputLabelNames: false
      includeObjectNames: ["java.lang:type=Threading"]
      autoExcludeObjectNameAttributes: true
      excludeObjectNameAttributes:
        "java.lang:type=OperatingSystem":
          - "ObjectName"
        "java.lang:type=Runtime":
          - "ClassPath"
          - "SystemProperties"
      rules:
        - pattern: 'java\.lang<type=Threading><(.*)>ThreadCount: (.*)'
          name: java_lang_Threading_ThreadCount
          value: '$2'
          help: 'ThreadCount (java.lang<type=Threading><>ThreadCount)'
          type: UNTYPED
    enabled: true
    image: bitnami/jmx-exporter:1.0.1
    port: 5556
    pullPolicy: Always
    resources: {}
    securityContext: {}
  registryPort: 9080
  serverPort: 9081
  worker: {}

metalshanked avatar Mar 20 '25 12:03 metalshanked

Hello

I had the same problem and created my own service and ingress for jmx container.

Or, if you are using prometheus service discovery, maybe add the prometheus annotations for both worker/coordinator deployments https://github.com/trinodb/charts/blob/main/charts/trino/templates/deployment-coordinator.yaml#L15

luiscosta18 avatar Mar 27 '25 14:03 luiscosta18