Just wondering of there is an example to transmit data to torizon.io. Something real simple to show how to use the fluit c API
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Based on the provided context, there isn’t a specific example mentioned for transmitting data to Torizon.io using the Fluent C API. However, the Torizon samples repository contains various examples that can be used as a starting point for different use cases, and it is likely that you can adapt one of these samples to fit your needs.
To get started, you can follow these steps:
-
Check the Torizon Samples Repository: Look for any existing samples that might be related to data transmission or network communication. The repository is designed to be used with the Torizon IDE Extension, which can help you set up and modify the samples.
-
Use the Torizon Cloud API: The Torizon Cloud API allows you to automate, extend, and integrate Torizon Cloud features. You can create an API client, obtain a token, and use the API endpoints to transmit data to Torizon.io. The API documentation and OpenAPI specification can guide you through the process.
-
Adapt an Existing Sample: If there is no direct example for the Fluent C API, you can adapt an existing sample that uses a similar approach. For instance, you can modify a sample that demonstrates network communication or data handling to include the Fluent C API for transmitting data.
-
Contribute Back: If you manage to create a working example, consider contributing it back to the torizon-samples repository. This can help others who might have the same requirement.
If you need more specific guidance or if there are particular aspects of the Fluent C API you are struggling with, you might want to check the issues section of the torizon-samples repository or reach out to the Toradex community for further assistance.
Please, also check if these links can help you solve your problem:
https://aur.archlinux.org/packages?do_Search=SeB%3Dnd&L=2&C=0&PP=100&O=20000&SB=v&SO=a&SeB=nd
Selectively trigger aktualizr for offline updates - check and install subcommands.
Greetings @jeffbelz,
Toradex does not provide any examples of using the Fluent-bit C API. That said there is a simple example in the Fluent-bit github repo here: fluent-bit/examples/hello_world at master · fluent/fluent-bit · GitHub
Fluent-bit also seems to have more detailed API documentation here: C Library API | Fluent Bit: Official Manual
Then, on our most recent versions of Torizon OS we have an output configured in the default fluent-bit.conf
, that sends data directly to our cloud platform: meta-toradex-torizon/recipes-extended/fluent-bit/files/fluent-bit.conf at kirkstone-6.x.y · torizon/meta-toradex-torizon · GitHub
Not sure if this helps answer your questions. If not maybe you can give a more detailed explanation on what exactly you want to accomplish?
Best Regards,
Jeremias
I’m really new to fluent bit and the cloud for torizon, and trying to get a hold of the link between lets say reading and ADC value in my application and sending that to the cloud to view. I think I have to read more into how fluent bit works.
I’ll take this guidance and see what I can figure out
While using the fluent-bit API could be an option. There is another way. In our default fluent-bit metrics, we use a script to get info about values related to EMMC health. This info then gets sent to our cloud. It’s a relatively simple bash script: meta-toradex-torizon/recipes-extended/fluent-bit/files/emmc-health at kirkstone-6.x.y · torizon/meta-toradex-torizon · GitHub
You can then see in the fluent-bit configuration file we invoke this script and send the output to the server as json: meta-toradex-torizon/recipes-extended/fluent-bit/files/fluent-bit.conf at kirkstone-6.x.y · torizon/meta-toradex-torizon · GitHub
Another option to consider if you just have an application that will spit out values.
Best Regards,
Jeremias
Yeah, after doing some reading it looks like having an fluent bit read the command line log and then set up a filter to grab the key value pairs might be the best way to go. All my data is based on events. So it could be a status message or an error message. I think I can use the stdin plugin and then a filter based on what message. that way I’m logging and send and event when I need it.
Sounds like a plan then. I assume this topic can be considered resolved then? Or are their further questions related to this point?
Best Regards,
Jeremias
I think I’m good, we can close it