diff options
-rw-r--r-- | ansible/roles/alloy/templates/config.alloy.j2 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ansible/roles/alloy/templates/config.alloy.j2 b/ansible/roles/alloy/templates/config.alloy.j2 index 23b2ec0..aecf34c 100644 --- a/ansible/roles/alloy/templates/config.alloy.j2 +++ b/ansible/roles/alloy/templates/config.alloy.j2 @@ -17,7 +17,18 @@ local.file_match "match_{{ extra.name }}" { loki.source.file "log_{{ extra.name }}" { targets = local.file_match.match_{{ extra.name }}.targets + forward_to = [loki.process.ansible_{{ extra.name }}.receiver] +} + +loki.process "ansible_{{ extra.name }}" { forward_to = [loki.write.pydis_gateway.receiver] + + stage.static_labels { + values = { + job = "ansible_{{ extra.name }}", + log_name = "{{ extra.name }}", + } + } } {% endfor %} |