...
Note that the key, cluster_name
in the above filter is configurable too. If you use a key name other than cluster_name
or clusterName
, then add the following section under logs-parser
section in your custom Kloudfuse’s values.yaml
Code Block |
---|
extraApplicationConfigskf_parsing_config: config: |- agent.properties.fluent-bit.user_defined_overrides.cloud.cluster_name = [<YOUR_CUSTOM_CLUSTER_NAME_KEY>]- remap: args: kf_cloud_cluster_name: - "$.<KEY_FOR_CLUSTER_NAME>" # must be JSONPath conditions: - matcher: "__kf_agent" value: "fluent-bit" op: "==" |
Static custom labels
To add static custom labels, please add following in the config fileuse the modify
filter. The example below adds a static custom label called tenant_name
do the following:
Code Block |
---|
[FILTER] Name modify Match * # Match everything Add tenant_name <TENANT_NAME> |
...
By default, Kloudfuse stack looks for container_name
in the Fluent Bit payload as the log source. However, this will only be populated if the Fluent Bit agent is configured with kubernetes
filter. If you want to Kloudfuse stack to use a different key as the log source, then include the following section under logs-parser
section in your custom Kloudfuse’s values.yaml
Code Block |
---|
extraApplicationConfigskf_parsing_config: config: |- - remap: agent.properties.fluent-bit.user_defined_overrides.log_source = [<YOUR_CUSTOM_LOG_SOURCE_KEY>] args: kf_source: - "$.<KEY_FOR_LOG_SOURCE>" # must be JSONPath conditions: - matcher: "__kf_agent" value: "fluent-bit" op: "==" |
Log message
Fluent Bit agent includes the log event message in log
key in the payload. However this can be overriden in the agent configuration. You can customize key which Kloudfuse stack should look for to get the log event message. To customize this setting, include the following section under logs-parser
section in your custom Kloudfuse’s values.yaml
Code Block |
---|
extraApplicationConfigskf_parsing_config: config: |- - remap: agent.properties.fluent-bit.user_defined_overrides.message = [<YOUR_CUSTOM_LOG_MESSAGE_KEY>] args: kf_msg: - "$.<MSG_KEY_FROM_AGENT_CONFIG>" # must be JSONPath conditions: - matcher: "__kf_agent" value: "fluent-bit" op: "==" |
Info |
---|
Kloudfuse stack already looks for log message with these key names in the payload: |
...
Fluent Bit supports various parsers to extract key value pairs from an unstructured log. For a full list of parsers, refer to the documentation here. By default, Kloudfuse will add all these key-value pairs to log facets, which can be filtered on the UI. Note that Kloudfuse cannot differentiate between these key-value pairs and any metadata fields, added by any filter other than kubernetes
and aws
. However, you can customize Kloudfuse stack by adding a list of prefix labels. To customize this setting, include the following section under logs-parser
section in your custom Kloudfuse’s values.yaml
Code Block |
---|
extraApplicationConfigskf_parsing_config: config: |- agent.properties.fluent-bit.tags_append_list = [<LIST_OF_CANDIDATE_TAG_KEY_PREFIXES>]- remap: args: kf_additional_tags: - "$.<PREFIX_KEY_FOR_AGENT_KV>" # must be JSONPath conditions: - matcher: "__kf_agent" value: "fluent-bit" op: "==" |
Info |
---|
|
...