>rrdtool graph >./test.png --imgformat=PNG --start=-1day --end=+0hours --width=1000 >--height=600 >"DEF:min=sql//mysql/host=127.0.0.1/dbname=thermal/username=thermal/password=thermal//temperature/date/cpu0:min:AVERAGE" > >"LINE1:min#FF0000:cpu0" > >Error: >ERROR: formatstring wrong - mysql
Second attempt at a solution, since the mysql drivers are confirmed to be present! See the documentation here http://oss.oetiker.ch/rrdtool/doc/rrdgraph_libdbi.en.html Your DEF specifies that the table to use is 'temperature', with the time coming from field 'date' and the value from field 'cpu0'. The 'date' field needs to be a UNIX timestamp, not a datetime field type. Prefix it with a '*' if it is a datetime field -- this requires RRDTool 1.4.something I believe. You've not given a table definition for your 'temperature' table, but I suspect 'date' is a datetime rather than a UNIX timestamp. Try this instead: DEF:min=sql//mysql/host=127.0.0.1/dbname=thermal/username=thermal/password=thermal//temperature/*date/cpu0:min:AVERAGE ... and this should do the necessary datetime -> timestamp conversion. Steve Steve Shipway [email protected]
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ rrd-users mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
