-
Notifications
You must be signed in to change notification settings - Fork 56
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 publishing service telemetry data #1971
Comments
The registration of services has already been done in #2266 and the entity store now has the external ID of the services as well. So, all that is left is to send the telemetry data to that external ID, just like it's done for devices, using their external ID. For example, a measurement for a service with the external ID {
"externalSource":{
"externalId":"myDatabaseService",
"type":"c8y_Serial"
},
"type": "c8y_TemperatureMeasurement",
"time": "2023-09-29T17:57:00+05:30",
"c8y_TemperatureMeasurement": {
"T": {
"value": 20,
"unit": "C"
}
}
} The mechanism to generate payloads like this from a given The rules are the same while using SmartREST as well. Just use the external ID of the service in the topic like To generate such hierarchical topics for a service the |
Note: The suggested mqtt api in this ticket is no longer applicable and the new MQTT interface is used instead. See the system tests included in the following PR: |
QA has thoroughly checked the feature and here are the results:
|
Is your feature improvement request related to a problem? Please describe.
If a service health endpoint has been registered to thin-edge.io via the
tedge/health/{service_name}
endpoint, sending measurements totedge/measurements/{service_name}
should not result in the creation of a child device in Cumulocity.Describe the solution you'd like
A dedicated MQTT topics which allows services to publish Inventory, Measurements, Events and Alarms. This would allow services to publish additional information about the status of the service, e.g. CPU, RAM usage, additional running meta info (e.g. process ids, run command).
The new topic names could be called.
Describe alternatives you've considered
Alternatively, when the
tedge-mapper-c8y
received a message on thetedge/measurement/{service_name}
topic, it could check if the name has been registered via thetedge/health/{service_name}
endpoint, and skip register a new child logic (e.g. skip sending the topic=c8y/s/us
payload=101,{service_name},{service_name},thin-edge.io-child
Additional context
Cumulocity IoT has two different smart rest messages which involve the registration/creation of a linked entity.
Both SmartREST message templates will create a managed object with the given External Identity, however
101
will link the created managed object as achildDevice
, where as the102
message will link the device as achildAddition
. The different types of managed object links control how the managed object is treated in the UI (and other api for that matter).The text was updated successfully, but these errors were encountered: