39 lines
934 B
YAML
39 lines
934 B
YAML
data_dir: /data
|
|
# Don't keep metrics indefinitly if they are not updated anymore
|
|
expire_metrics_secs: 60
|
|
|
|
sources:
|
|
metrics-vector:
|
|
type: internal_metrics
|
|
|
|
sinks:
|
|
loki:
|
|
type: loki
|
|
inputs: ["transform_nomad_alloc_*"]
|
|
endpoint: http://127.0.0.1:3100
|
|
encoding:
|
|
codec: text
|
|
labels:
|
|
namespace: "{{ .nomad.namespace }}"
|
|
job: "{{ .nomad.job_name }}"
|
|
group: "{{ .nomad.group_name }}"
|
|
task: "{{ .nomad.task_name }}"
|
|
host: "{{ .nomad.node_name }}"
|
|
alloc: "{{ .nomad.alloc }}"
|
|
buffer:
|
|
type: disk
|
|
max_size: 268435488
|
|
remove_label_fields: true
|
|
|
|
prometheus:
|
|
type: prometheus_exporter
|
|
inputs: ["metrics-vector"]
|
|
address: 0.0.0.0:${NOMAD_ALLOC_PORT_metrics}
|
|
tls:
|
|
enabled: true
|
|
crt_file: /secrets/metrics.bundle.pem
|
|
key_file: /secrets/metrics.bundle.pem
|
|
ca_file: /local/monitoring.ca.pem
|
|
verify_certificate: true
|
|
|