Pod logs are bigger that 1 Kb in VIP Authentication Hub
search cancel

Pod logs are bigger that 1 Kb in VIP Authentication Hub

book

Article ID: 383503

calendar_today

Updated On:

Products

VIP Authentication Hub

Issue/Introduction


Running VIP Authentication Hub, how to truncate the pods logs to 1024 characters?

The OCP sends the output of every pod to the corporate logstash collector.

The size of the log sent to the logstash is greater than 2kb in 90% of the cases.

The internal collector discards messages larger than 1 kb, thus there's almost no logs to observe in the Kibana tool.

 

Resolution


Manually modify the filter section of the fluentbit pod to remove a key from the FILTER section:

In this sample, ssp namespace is "ssp1".

So, to illustrate, let's remove the clientId field.

# kubectl edit cm -n ssp1 ssp-infra-config

add:    [FILTER]
        Name record_modifier
        Match ssp_log
        Remove_key clientId

save and exit;

Restart all of the fluent-bit pods to have them read the new config:

# kubectl delete pod -n ssp1 -l app.kubernetes.io/name=fluent-bit

and check that all of the fluent-bit pods started.

Check also the logs of fluent-bit by using:

# kubectl  logs -n ssp1 -l app.kubernetes.io/name=fluent-bit -f --max-log-requests=10

<2024-12-05 ju.> :: patrick dussault : Initial Publication