Commit 2215a488 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Merge branch 'dev' into 'master'

Acepta todos los logs, añade host variable

See merge request redmic-project/log/fluent-bit!8
parents 8b62633f 88252c6c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
LOG_LEVEL=info
INPUT_TAG_PREFIX=docker.
LOKI_HOST=loki
EMPTY_LABEL_VALUE=none

PORT=24224
+15 −8
Original line number Diff line number Diff line
@@ -8,18 +8,25 @@
[FILTER]
	name rewrite_tag
	match ${INPUT_TAG_PREFIX}*
	rule $container_name ^\/([^_]+)_([^.]+)\.(\d+)\.(.*)$ loki.$1.$2.$3.$4 false
	rule $container_name ^\/([^_]+)_([^.]+)\.([^.]+)\.(.*)$ docker-swarm.$1.$2.$3.$4 false

[FILTER]
	name record_modifier
	match loki.*
	remove_key source
	remove_key container_name
	name rewrite_tag
	match ${INPUT_TAG_PREFIX}*
	rule $container_name ^\/(.*)$ docker-container.$1 false

[OUTPUT]
	name loki
	match loki.*
	host loki
	match docker-swarm.*
	host ${LOKI_HOST}
	labels stack_name=$TAG[1], service_name=$TAG[1]_$TAG[2], slot=$TAG[3], container_name=$TAG[1]_$TAG[2].$TAG[3].$TAG[4]
	label_keys $container_id
	drop_single_key true
	remove_keys container_id, container_name, source

[OUTPUT]
	name loki
	match docker-container.*
	host ${LOKI_HOST}
	labels stack_name=${EMPTY_LABEL_VALUE}, service_name=${EMPTY_LABEL_VALUE}, slot=${EMPTY_LABEL_VALUE}, container_name=$TAG
	label_keys $container_id
	remove_keys container_id, container_name, source
+2 −0
Original line number Diff line number Diff line
@@ -6,6 +6,8 @@ services:
    environment:
      LOG_LEVEL:
      INPUT_TAG_PREFIX:
      LOKI_HOST:
      EMPTY_LABEL_VALUE:
    networks:
      log-net:
    ports: