how to get serilog logs in fluent-bit #9029
Unanswered
NamanGajjar26
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
there are i am use asp .net core mvc in serilog there are configer in program.cs
Log.Logger = new LoggerConfiguration()
.WriteTo.File("/var/log/containers/myopenseach.log", rollingInterval: RollingInterval.Day)
.CreateLogger();
and pass this this message from controller
Log.Information("custommvc");
how to get this log message in fluent-bit this mvc project deployed in kubernetes using docker container
i try to configer like this
config:
service: |
[SERVICE]
Daemon Off
Flush 1
Log_Level debug
Parsers_File /fluent-bit/etc/parsers.conf
Parsers_File /fluent-bit/etc/conf/custom_parsers.conf
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port {{ .Values.metricsPort }}
Health_Check On
https://docs.fluentbit.io/manual/pipeline/inputs
inputs: |
[INPUT]
Name tail
Path /var/log/containers/.log
multiline.parser docker, cri
Tag kube.
Mem_Buf_Limit 5MB
Parser docker_no_time
https://docs.fluentbit.io/manual/pipeline/filters
filters: |
[FILTER]
Name kubernetes
Match kube.*
Kube_URL https://kubernetes.default:443
tls.verify Off
Merge_Log On
Keep_Log Off
K8S-Logging.Parser On
K8S-Logging.Exclude On
https://docs.fluentbit.io/manual/pipeline/outputs opensearch-cluster-master-headless.default.svc.cluster.local
outputs: |
[OUTPUT]
Name http
Match kube.*
Host data-prepper
Port 2021
Format json
URI /log/ingest
https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/classic-mode/upstream-servers
This configuration is deprecated, please use
extraFiles
instead.upstream: {}
https://docs.fluentbit.io/manual/pipeline/parsers
customParsers: |
[PARSER]
Name docker_no_time
Format json
Time_Keep Off
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
and i am use opensearch data-prepper and send logs to open-search and see this logs in open-search dashboard
but there are not get serilog log message how to get using fluent-bit
Beta Was this translation helpful? Give feedback.
All reactions