for helm, has anyone turned on jmx exporters for ...
# all-things-deployment
b
for helm, has anyone turned on jmx exporters for frontend? I'm getting a bunch of error messages in the jmx pod (I only removed the comments in the FE values.yaml) Also, jmx exporter has disappeared from gms's values.yaml? Then what will be our options for monitoring gms pod
b
hey, @better-orange-49102, jmx exporter as a sidecar never worked. The java agent in the pod does work. I've seen similar problems when I didn't run helm upgrade and the files from the old helm chart was still cached on disk.
try deleting the already built charts and run
helm dependency build
b
So I shd point Prometheus to the front end pod directly? Is there an env to enable?
I'm currently trying out 0.2.104 iirc
b
Copy code
{{- if and .Values.serviceMonitor.create .Values.global.datahub.monitoring.enablePrometheus -}}
apiVersion: <http://monitoring.coreos.com/v1|monitoring.coreos.com/v1>
kind: ServiceMonitor
metadata:
  name: {{ printf "%s-%s" .Release.Name "datahub-frontend" }}
  labels:
    {{- include "datahub-frontend.labels" . | nindent 4 }}
  {{- with .Values.serviceMonitor.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  endpoints:
  - port: jmx
    relabelings:
    - separator: /
      sourceLabels:
      - namespace
      - pod
      targetLabel: instance
  selector:
    matchLabels:
      <http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: Helm
      <http://app.kubernetes.io/name|app.kubernetes.io/name>: datahub-frontend
{{- end -}}
this service monitor should work.
can get you rendered version if you want. also will opensource this.
b
Hmm I'm not sure if I can create a service monitor... Only have limited rights to the cluster
this is the port where it exposed.
you can set prometheus to scrape this endpoint
b
Hmm I need to check it tml in office network. Thanks for the pointers 🙏
b
I can add that port to the service itself, so you can scrape it from there.
b
I need to check out what's my version doing... Because I cannot upgrade to latest yet
How about gms then? Is it the same as FE?
maybe i got it wrong yesterday, but i am only able to scrape metrics from port 4318 from GMS. For FE... nothing. I used the env variables from docker-compose.monitoring to enable the scraping in GMS, as
alues.global.datahub.monitoring.enablePrometheus .Values.global.datahub.monitoring.enableJMXPort
have no effect
b
let me check FE, also opensourcing the serviceMonitors.
hey @better-orange-49102, it's not merged yet, but here the ServiceMonitor based monitoring as a PR https://github.com/acryldata/datahub-helm/pull/181
serviceMonitor CRMs needs to be installed