If you wish to access the RRDTool data programmatically from PHP, then you have 
two options.

If you just want a few set values, you could call rrdtool using the PRINT 
directive to output text on stdout, and capture that, though you then have to 
parse the captured text.

If you want to access the entire data series, then you could call 'rrdtool 
fetch' or 'rrdtool xport' to obtain the data; also, you could install the PHP 
RRDtool library, and then access it directly from the PHP code rather than 
having to fork off a separate process and catch the output.  This might be the 
most efficient way to achieve what you want.

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
[email protected]<mailto:[email protected]>
Ph: +64 9 373 7599 ext 86487

________________________________
From: [email protected] 
[[email protected]] on behalf of Md. 
Ali Ahsan Rana [[email protected]]
Sent: Saturday, 21 June 2014 4:28 p.m.
To: [email protected]
Subject: [rrd-users] Assign RRDGraph DEF variables to external variable?

Hello EveryOne,

I am constructing and executing rrdgraph command from php. A sample is as 
follows:

$series = "DEF:'test'='$rrd_dir/test.rrd':'sum':AVERAGE "
             ."LINE2:test#00FF00:'Test Graph' "

Now, I want the rrd variable 'test' to be assigned to an external php variable 
so that I can use that value for other task. How I can achieve this please?

Regards
Rana
_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply via email to