How to retrieve max timestamp into message?


#1

We want our alert messages to contain the most recent timestamp of the data points that were processed. How do we retrieve that? We’ve tried

var youngestDataPoint = data
        |max('Time')
                .as ('youngestDataPoint')
        |log().prefix('youngestDataPoint').level('DEBUG')

and a few variations – ‘time’ ‘tmax’ – but they all seem to come up blank.

Is there a way to grab that?

(Ideally, we’d like to grab the range of timestamps of the datapoints, so the minimum, too. But the max would be good for starters.)

Any help would be appreciated. Thanks.