-
Notifications
You must be signed in to change notification settings - Fork 72
New CLI command to collect diagnostic logs in one step #3412
Copy link
Copy link
Closed
Labels
ideaideas/opportunities/feature requests which need to be further investigated before implementationideas/opportunities/feature requests which need to be further investigated before implementation
Milestone
Description
Is your feature request related to a problem? Please describe.
Introduce a new CLI command to collect all the diagnostic logs in one step so that we can support users to report bugs or questions easily.
Describe the solution you'd like
The first idea is to create a new CLI subcommand tedge logs.
tedge logs [--output-dir <DIR>]It collects
output of mqtt-logger (need to mask JWT token values)refer to comment- operation logs under
/var/log/tedge/agent/* message cacheContents of the entity store, GET by HTTP API call. (/etc/tedge/.tedge-mapper-c8y/entity_store.jsontedge http get /tedge/entity-store/v1/entities)- tedge-mapper and tedge-agent logs (journalctl. how to do if the device is not using systemd)
- mosquitto log (if using mosquitto)
- and more?
and zips them, then outputs to the target directory.
Describe alternatives you've considered
Alternatively we can create a community plugin to collect logs.
Additional context
A good reference of the type of logs is what we collect in our system tests.
https://github.com/thin-edge/thin-edge.io/blob/main/tests/RobotFramework/libraries/ThinEdgeIO/ThinEdgeIO.py#L162
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ideaideas/opportunities/feature requests which need to be further investigated before implementationideas/opportunities/feature requests which need to be further investigated before implementation