Offline Cache of Fluent-Bit Metrics

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

To address the issue of inconsistent metric uploads and HTTP 400 errors with Fluent Bit on your Toradex device running Torizon, please consider the following steps:

  1. Ensure Proper Data Formatting: The HTTP 400 error suggests a missing required field, likely a timestamp. Verify that all metrics include a properly formatted timestamp. Fluent Bit requires certain fields, such as ‘date’ or ‘timestamp’, to be present in the data sent to Torizon Cloud.

  2. Review Configuration: Check your Fluent Bit configuration to ensure all input plugins are set to store data on the filesystem when offline. Confirm that storage.type is set to filesystem for each input.

  3. Check Buffering and Storage Settings: Ensure the storage path (/var/log/flb-storage/) is correctly configured and has enough space to store offline data. Adjust storage.backlog.mem_limit and storage.total_limit_size settings to accommodate the data volume generated while offline.

  4. Analyze Error Logs: Review Fluent Bit logs for additional errors or warnings that might explain why certain metrics are not cached or uploaded. Compare the configuration of input plugins for CPU and memory metrics with those that are working, like thermal and TCP.

  5. Test and Validate: After making changes, test the configuration by disconnecting the device, generating data, and reconnecting to see if all metrics upload. Use the stdout output plugin to verify the data processed by Fluent Bit.

  6. Format Custom Metrics Correctly: If you have custom metrics, ensure they are formatted correctly and include all necessary fields. Use the nest filter to structure the data as required by Torizon Cloud.

By ensuring all metrics are correctly formatted and include necessary fields, and by verifying your Fluent Bit configuration, you should achieve consistent metric uploads to Torizon Cloud after offline periods.

I hope this helps resolve your issue. If you have further questions, feel free to ask.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Torizon API returns 403 since today.