Every tech geek has his/her preferred tools and one of mine is without doubt Tobi Oetiker’s MRTG (Multi Router Traffic Grapher), which I’ve used to make pretty trend lines of much more than routers or traffic.
MRTG is a Perl program that grabs some measurement values (typically via SNMP) and plots them as time series. It creates ‘daily’, ‘weekly’, ‘monthly’ and ‘yearly’ graphs and the HTML page that shows the graphs and some min/max/average statistics to accompany the graphs. You’ve probably seen the typical MRTG output images before:
But MRTG can do more than just SNMP. In fact MRTG can plot any trend, as long as it gets its input in the form of 4 text lines:
[I value] [O Value] [uptime] [server name]
The I value becomes the green bar graph, the O value becomes the blue line, and the rest is only used to generate the following line in the generated HTML pages:
The statistics were last updated Tuesday, 13 October 2015 at 10:40, at which time ‘[server name]’ had been up for [uptime].