So many people suggesting relational databases or just plain "big data" solutions. Time series databases tend to have quite unique features like interpolation of data (i.e. you can query a specific datapoint at a specific date and time for a value, and you will get an interpolated value if there is no specific sample for that data point.)
Anyway, no one has mentioned RRD tool yet: http://oss.oetiker.ch/rrdtool/
"RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data. RRDtool can be easily integrated in shell scripts, perl, python, ruby, lua or tcl applications."