Slackbot
06/28/2023, 9:48 AMJulian Reyes
06/28/2023, 3:13 PMSergio Ferragut
06/28/2023, 8:14 PMJulian Reyes
06/29/2023, 8:34 AMapiVersion: 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:
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):
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:
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:
- name: druid_emitter_statsd_dimensionMapPath
value: "/opt/druid/conf/druid/metrics-dimensions.json"
Hope it helps!Sergio Ferragut
06/29/2023, 4:45 PM