In Waylay, we store stream data in the time series database as soon as it arrives. Sometimes, you want to tap into that stream and add additional metrics based on the stream data content (to produce derived metrics etc…) or to enrich these data with some other information.
This is one simple example using Waylay storeMessage
actuator to store these newly produced metrics:
In this example, we used a transformer like this;
{
foo: $${nodes.stream_1.rawData.stream.temperature} + 1
}
, so for the same resource this rule stores a new metric foo
with a value that is incremented by one for a given stream temperature value.