fluent-bit

How to access logs logged in journald using fluent-bit that's inside a docker container

 ̄綄美尐妖づ 提交于 2021-02-19 07:00:13
问题 I'm using docker-compose.yml that launches my services. All services look something like this: A-service: image: A-service restart: always network_mode: host logging: driver: journald options: tag: "{{.ImageName}}/{{.Name}}/{{.ID}}" fluent-bit: image: 'bitnami/fluent-bit:latest' restart: always network_mode: host command: /fluent-bit/bin/fluent-bit -c /fluent-bit/etc/fluent-bit.conf volumes: - ./service/config/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf - type: bind source: /run/log

FluentBit - Parsing from Path_Key

China☆狼群 提交于 2021-01-29 09:23:14
问题 Currently im adding the filepath using Path_Key. I am trying to grab multiple variables that exist in the Path_key. /var/log/containers/**Application_Name**-**Application_Version**.log Is it possible to extract these values from an existing field mapping? 回答1: For extracting values for use in the Tag it is pretty straight forward, you would have an input like: [INPUT] Name tail Path /var/log/containers/*-*.log Path_Key filename Tag <appname>.<appversion> Tag_Regex /(?<appname>[^-]+)-(?

How to exclude namespace from fluent-bit logging

孤街醉人 提交于 2020-02-02 05:48:06
问题 Is there a way to exclude certain namespaces in fluet-bit? I would like to exclude certain namespaces so that fluent bit doesn't forward all logs created in those namespaces to ELK. Is there a way to do it besides adding annotation to each pod in that namespace? Im aware that you can update all of the pods annotations in a namespace via kubectl. kubectl annotate pods --namespace=pks-system --all fluentbit.io/exclude='true' 回答1: According to official Fluent Bit documentation, for the moment it

Serilog logs collected by Fluentbit to Elasticsearch in kubernetes doesnt get Json-parsed correctly

有些话、适合烂在心里 提交于 2019-12-23 12:44:13
问题 Using the EFK Stack on Kubernetes (Minikube). Have an asp.net core app using Serilog to write to console as Json. Logs DO ship to Elasticsearch, but they arrive unparsed strings , into the "log" field, this is the problem. This is the console output: { "@timestamp": "2019-03-22T22:08:24.6499272+01:00", "level": "Fatal", "messageTemplate": "Text: {Message}", "message": "Text: \"aaaa\"", "exception": { "Depth": 0, "ClassName": "", "Message": "Boom!", "Source": null, "StackTraceString": null,