This message was deleted.
# general
s
This message was deleted.
j
I have figured it out
s
Nice! Please share
j
Sure. In my helm templates I created the following ConfigMap:
Copy code
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app: druid
    release: druid
  name: druid-metrics-file
  namespace: "{{ .Values.namespace }}"
data:
  metrics-dimensions.json: |
    {{ toJson .Values.metrics | indent 4 }}
I have a
values.yaml
file with all the config, among them the metrics:
Copy code
metrics:
  query/time:
    dimensions:
      - dataSource
      - type
    type: timer
    conversionFactor: 1000
    help: Seconds taken to complete a query.
  query/bytes:
    dimensions:
      - dataSource
      - type
    type: count
    help: Number of bytes returned in query response.
...
You might ask why I have metrics as yaml in values.yaml file. Reason is https://stackoverflow.com/questions/73468386/how-to-add-json-data-in-configmap-creation-in-argocd I then added a volume in each deployments (broker, coordinator and router) as well as statefulsets (historical and middleManager):
Copy code
volumes:
        - name: metrics-conf
          configMap:
            name: druid-metrics-file
            items:
              - key: metrics-dimensions.json
                path: metrics-dimensions.json
Then you need to mount the volume:
Copy code
volumeMounts:
            - name: metrics-conf
              mountPath: /opt/druid/conf/druid/metrics-dimensions.json
              subPath: metrics-dimensions.json
              readOnly: true
And finally the env var in the container:
Copy code
- name: druid_emitter_statsd_dimensionMapPath
  value: "/opt/druid/conf/druid/metrics-dimensions.json"
Hope it helps!
🚀 1
s
Awesome, thanks for sharing.