Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support uploading workflow logs from child devices #3303

Open
reubenmiller opened this issue Dec 17, 2024 · 0 comments
Open

Support uploading workflow logs from child devices #3303

reubenmiller opened this issue Dec 17, 2024 · 0 comments
Labels
idea ideas/opportunities/feature requests which need to be further investigated before implementation theme:childdevices Theme: Child device related topics theme:workflows

Comments

@reubenmiller
Copy link
Contributor

Is your feature request related to a problem? Please describe.

thin-edge.io supports automatically uploading the associated workflow log file on failure via the following setting:

c8y.operations.auto_log_upload=on-failure

Currently this feature has the limitation that it only works on the main device, as the tedge-mapper-c8y reads the command's .logPath property, and checks if the paths exists (on the main device), then uploads it. When an operation is sent to a child device which is running the tedge-agent, the log file referenced in the operation only exists on the child device, and is not accessible to the tedge-mapper-c8y. Below is an example of an operation sent to the child device with the reference to the .logPath which the mapper does not have access to:

[te/device/child02///cmd/shell_execute/c8y-mapper-42785332] {"@version":"f787c5d1a37d27d6d19fd6b9dffea6449e2ec46e6caa35cf1fdb76c7be2773f0","c8y-mapper":{"on_fragment":"c8y_Command","output":"${.payload.result}"},"command":"exit 1","logPath":"/var/log/tedge/agent/workflow-shell_execute-c8y-mapper-42785332.log","reason":"shell_execute.sh returned exit code 1","status":"failed"}

Describe the solution you'd like

thin-edge.io should support a way for child devices to send their log files so that the tedge-mapper-c8y can upload them to Cumulocity. A logical fit would be using the File Transfer Service for this, but for that to work, the tedge-mapper-c8y should inject a property which includes the URL where log files can be uploaded to from the child device.

Describe alternatives you've considered

Additional context

@reubenmiller reubenmiller added idea ideas/opportunities/feature requests which need to be further investigated before implementation theme:childdevices Theme: Child device related topics theme:workflows labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea ideas/opportunities/feature requests which need to be further investigated before implementation theme:childdevices Theme: Child device related topics theme:workflows
Projects
None yet
Development

No branches or pull requests

1 participant