[Docker] - timestamps and data messages

39 views
Skip to first unread message

EDUARDO PRASNIEWSKI

unread,
Apr 7, 2023, 9:18:10 PM4/7/23
to Sentilo
Hi there!

I'm currently working with Sentilo 2.0 and faced some issues which have been already discussed here at the forum and I'm running with the official Sentilo docker images.

Here's my trouble: the sentilo-agent-activity-monitor image is sending the timestamp as a text field. At the github repository the template mapping is set correctly, but I couldn't find a way to configure the template (or even find the file) using the docker image. Besides that, the field message even set to be a numerical field at the sensor configuration is sending the data as a string.

To solve these problems I chose to use Logstash as the middleware instead of the sentilo-agent-activity-monitor, which allowed me to connect to Redis pub/sub and filter the data.

As I'm fresh using the platform, there might be some mistake by my text, so be free to point me them and tell me how I could deal with .


Sentilo IO

unread,
Apr 11, 2023, 7:56:38 AM4/11/23
to Sentilo
Dear friend,

The timestamp field format is correct. Sentilo always send it as String, because it is part of a document, not a typed parameter. So, in this way, the template mapping is correct. Remember that templates are only applied at index creation time. So then you can try changing all formats as you need after the creation. In the other hand, you can change it from the original project module, but this option is not possible with Docker images at the moment.

Regarding the message field, you're right, Sentilo always stores its data in String (text) format. Keep in mind that this field is a multi-purpose content field, so String is the best approach for it. You can change its format in the Catalog Web Application. For example, you can use the number format for the data, and it only applies to how the webapp shows the data. Or you can set it as JSON format, and the webapp will try to show the message data as a "pretty formatted json document map". Or if number format is selected, then it will try to show you it in graphical scale format (lines graph).

Please visit the official Sentilo's documentation page regarding notifications message format: https://sentilo.readthedocs.io/en/latest/api_docs/services/subscription/subscription.html?highlight=message#notifications

We hope now you have the correct data format knowledge.

Feel free to contact us if you have more doubts about it.


Best regards,
Sentilo Team.
Reply all
Reply to author
Forward
0 new messages