[rrd-users] rrd dbi syntx
John Stile
john at stilen.com
Mon Mar 31 05:25:29 CEST 2014
I am having a hard time finding the syntax for using a dbi with rrdtool
graph.
Command:
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
Table: echo 'describe temperature' | mysql -u'thermal' -p'thermal' -D
'thermal'
Field Type Null Key Default Extra
date timestamp NO PRI CURRENT_TIMESTAMP
cpuPhy int(11) NO 0
cpu0 int(11) NO 0
cpu1 int(11) NO 0
cpu2 int(11) NO 0
cpu3 int(11) NO 0
disk0 int(11) NO 0
disk1 int(11) NO 0
disk2 int(11) NO 0
disk3 int(11) NO 0
board0 int(11) NO 0
board1 int(11) NO 0
The column 'date' is of type timestamp.
I am using gentoo Linux with rrdtool-1.4.8 and mysql-5.1.70.
eix rrdtool
[I] net-analyzer/rrdtool
Available versions: 1.4.7-r1 (~)1.4.7-r2 1.4.8 {dbi doc +graph lua perl python rrdcgi ruby static-libs tcl tcpd PYTHON_TARGETS="python2_7"}
Installed versions: 1.4.8(03:07:05 PM 03/30/2014)(dbi graph perl python rrdcgi static-libs tcpd -doc -lua -ruby -tcl PYTHON_TARGETS="python2_7")
Homepage: http://oss.oetiker.ch/rrdtool/
Description: A system to store and display time-series data
eix -I mysql
[I] dev-db/mysql
Available versions: [M]4.0.27-r1 [M]4.1.22-r1 [M]5.0.96 5.1.70 ~5.5.32 {berkdb big-tables cluster +community debug embedded extraengine jemalloc latin1 max-idx-128 minimal pbxt (+)perl profiling raid selinux ssl static systemtap tcmalloc test xtradb}
Installed versions: 5.1.70(09:15:54 PM 03/22/2014)(community perl ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal -pbxt -profiling -selinux -static -test -xtradb)
Homepage: http://www.mysql.com/
Description: A fast, multi-threaded, multi-user SQL database server.
More information about the rrd-users
mailing list