wiki:rrdtool

Version 4 (modified by krit, 3 years ago) (diff)

--

RRDtool

You want to fetch the 15 minute (900s/60s = 15 mins) average data for the last hour. You might try -r=resolution, -s start -1h(one hour from Now)

rrdtool fetch data.rrd  AVERAGE -r 900 -s -1h

Then convert time epoch time to human readable

[krit@mini tmp]$ date -d @1629298800
Wed 18 Aug 2021 10:00:00 PM +07

Convert date from epoch time to human readable format

OMD[monitor@501264b41d2d]:~/var/log$ awk -F"[][]" '{cmd="date -d@" $2;cmd |getline $2; close(cmd)}1' naemon.log 

Here we set a shell command date -d@$2 to a variable called cmd. Then with cmd |getline $2 the awk reads a line and pass second field value to the cmd we open it, then we need close the command we opened via pipe, so we used close(cmd)