--- apiVersion: 1 datasources: {{ range nomadService 1 (env "NOMAD_ALLOC_ID") "prometheus" -}} - name: Prometheus url: http://{{ .Address }}:{{ .Port }} type: prometheus access: proxy isDefault: true version: 1 {{- end }}