Hey,
https://docs.fluentbit.io/manual/pipeline/outputs/stackdriver
log_name_key: The value of this field is used by the Stackdriver output plugin to extract logName from jsonPayload and set the logName field.
I'm trying to set the log_name_key field to extract container/application name. But I can't figure out which jsonPayload the doc is referring to. What should log_name_key be in order for the stackdriver logname to be the apps name?
Thinking of something like:
logging.googleapis.com/labels/k8s-pod/app
As shown in the documentation: Logs log names include resource identifiers indicating the Cloud project or other Google Cloud entity that owns the audit logs, and whether the log contains Admin Activity, Data Access, Policy Denied, or System Event audit logging data.
See this document about viewing your GKE logs, to find out your logName.
Hey Comaro,
I am aware of what log name is. My question was how to change the logName outputted to stackdriver via a custom fluent-bit.
Thanks!
Lily Li
Hi, Lily ly,
Here is a community tutorial on Customizing Fluent Bit for Google Kubernetes Engine logs.
In this tutorial, you learn how to host your own configurable Fluent Bit daemonset to send logs to Cloud Logging.
Thanks! I did follow the tutorial, I'm just wondering if there's a way to modify the log Name in stackdriver (as opposed to stdout)
Hi, Lily ly,
This is the initial question of your post:
... What should log_name_key be in order for the stackdriver logname to be the apps name?...
For this question:
... I'm just wondering if there's a way to modify the log Name in stackdriver (as opposed to stdout)...
Can you create a new post? This will help other community members having visibility into both questions as opposed to scrolling through this thread.
Maybe I was being unclear but it's the same question. I'm wondering what should the log_name_key be in the fluent-bit output plugin in order to modify the logName field in stackdriver.