File tree Expand file tree Collapse file tree 2 files changed +20
-8
lines changed
Expand file tree Collapse file tree 2 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ Retrieve logs with time filters (timestamps in seconds since epoch):
258258sudo /usr/share/tedge/log-plugins/docker get tedge-agent --since 1696250000 --until 1696260000
259259```
260260
261- ## Dynamic log type discovery
261+ ## Refresh Supported Log Types
262262
263263To ensure that any newly installed services or log sources are immediately available for log collection,
264264` tedge-agent ` automatically reloads the plugins and refreshes the supported log types on the following events:
@@ -268,9 +268,12 @@ To ensure that any newly installed services or log sources are immediately avail
268268* A new software is installed with the agent (via the ` software_update ` command)
269269* A new configuration is installed or updated with the agent (via the ` config_update ` command)
270270
271- If the new software or configuration is installed/updated externally, and not via ` tedge-agent ` ,
272- a refresh can be triggered by just touching the plugin configuration file:
271+ A refresh can also be triggered manually by sending a sync signal to the agent as follows:
273272
274273```
275- touch /etc/tedge/plugins /tedge-log-plugin.toml
274+ tedge mqtt pub te/device/main/service /tedge-agent/signal/sync_log_upload '{}'
276275```
276+
277+ The agent reacts to all these events by gathering the latest supported log types from all the installed plugins
278+ by invoking the ` list ` command on them,
279+ and publishes the aggregated types to the ` te/device/main///cmd/log_upload ` meta topic.
Original file line number Diff line number Diff line change @@ -712,9 +712,10 @@ Where the signal segments are describe as follows:
712712
713713The following table details some example signal types which are supported by %%te%%.
714714
715- | Signal Type | Example Topic |
716- | -------------| -------------------------------|
717- | sync | ` te/<identifier>/signal/sync ` |
715+ | Signal Type | Example Topic |
716+ | -----------------| ------------------------------------------|
717+ | sync | ` te/<identifier>/signal/sync ` |
718+ | sync_log_upload | ` te/<identifier>/signal/sync_log_upload ` |
718719
719720The signal would be interpreted differently based on the target entity.
720721
@@ -725,14 +726,22 @@ We plan to add support for more signal types in the future.
725726
726727### Examples: With default device/service topic semantics
727728
728- #### Signal to a service
729+ #### Signal to the Cumulocity mapper service
729730
730731Signal to request the supported operations of the ` tedge-mapper-c8y ` service:
731732
732733``` sh te2mqtt formats=v1
733734tedge mqtt pub te/device/main/service/tedge-mapper-c8y/signal/sync ' {}'
734735```
735736
737+ #### Signal to the agent service
738+
739+ Signal to refresh the ` log_upload ` command metadata (supported log types) of the ` tedge-agent ` service:
740+
741+ ``` sh te2mqtt formats=v1
742+ tedge mqtt pub te/device/main/service/tedge-agent/signal/sync_log_upload ' {}'
743+ ```
744+
736745## Health check
737746
738747Services can publish their health status as follows:
You can’t perform that action at this time.
0 commit comments