[rrd-users] Time stamp on graphs

Devante Vargas devantev at gmail.com
Thu Oct 8 16:21:51 CEST 2015


Hello,

I am trying to add timestamps to my graphs. I use a scheduled PowerShell
script to execute the rrdtool to generate the graphs. I typically do it in
the format of:

$CMD = "C:\path\to\rrdtool.exe"
$arg1 = "graph"
$arg2 = "graph.png"
$arg3 = "--title"
$arg4 = "Graph title"
$arg5 = "--width"
$arg6 = "400"
$arg7 = "--vertical-label"
$arg8 = "Percentage"
$arg9 = "--rigid"
$arg10 = "DEF:sload=rrdfile.rrd:load:LAST"
$arg11 = "DEF:sservers=rrdfile.rrd:servers:LAST"
$arg12 = "DEF:balanced=rrdfile.rrd:lbo:LAST"
$arg13 = "GPRINT:sservers:LAST:%4.lf\j"

& $CMD $arg1 $arg2 $arg3 $arg4 $arg5 $arg6 $arg7 $arg8 $arg9 $arg10 $arg11
$arg12 $arg13

I googled around and found someone adding *"Date\: $(date "+%F %T" | sed
's/:/\\:/g')\r" *but not sure how this would get added in the context above.

Any suggestions?

Thanks,

Devante
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20151008/e4d7865c/attachment.html>


More information about the rrd-users mailing list