1) Install RRDTool
2) Create an RRD database to store your data. This example stores two values, temperature and humidity, keeping a data point every 5 minutes (-s 300). These values will be stored every five minutes for a week (one week is 2016 five-minute steps) and every hour for three months (720 hours in three months). That creates a puny 44 kilobyte file so obviously the time spans can be much larger.
rrdtool create mylog.rrd -s 300 \
3) Now to update the database run this script every minute (i.e. cron job):
my $page = get("http://192.168.2.137/") || die "Can't read from server!";
$page =~ /Temperature:([\d\.]+)/;
my $temp = $1;
$page =~ /humidity([\d\.]+)/;
my $humidity = $1;
`rrdtool update mylog.rrd -t Temperature:Humidity N:$temp:$humidity`
4) Finally, to display the data, I prefer to use RRGrapher.cgi
. There's a "CONFIGURATION SECTION" that will need to have the directory containing your RRD file configured but that's about it. Just execute the script via your web server and it should be pretty straightforward what you need to do.