please...cactiquery....

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
kkkuri
Posts: 3
Joined: Mon Oct 11, 2004 5:53 am

please...cactiquery....

Post by kkkuri »

i used cactiquery...


fetch /data/rra/traffic_in_17.rrd LAST -r 300 -s 1101682800 -e 101769200

1101765000: 1.4982062190e+05 7.7725431900e+05
1101765300: 4.0888450831e+05 6.8752439535e+05
1101765600: 6.7533670221e+05 7.7368871834e+05
1101765900: 7.4005192949e+05 1.4666454930e+06
1101766200: 6.4371410963e+05 1.2038065781e+06
1101766500: 6.2071521937e+05 8.5479126197e+05
1101766800: 6.3486517767e+05 9.2145285996e+05
1101767100: 6.1609035880e+05 8.4788688372e+05
1101767400: 6.2107568002e+05 9.7023164686e+05
1101767700: 6.5192366118e+05 1.3320130494e+06
1101768000: 1.5613678405e+05 1.3076960299e+06
1101768300: 9.2639598502e+04 1.4723348817e+06
1101768600: 2.1706926411e+05 1.1560407117e+06
1101768900: 6.1394912957e+05 6.4601641528e+05
1101769200: 4.8293344289e+05 6.3729875605e+05


but....cacti...query.

Empty data found for given period

for ($i=0;$i<count($regexps);$i++) {
$fetch_array["values"][$i] = array();
/* match the regexp against the rrdtool fetch output to get a mantisa and
exponent for each line */
if (preg_match_all($regexps[$i], $output, $matches)) {
for ($j=0;($j < count($matches[1])); $j++) {
$timestamp = $matches[0][$j];
$timestamp = date('d/M/Y H:i:s',$timestamp);
$line = ($matches[1][$j] * (pow(10,(float)$matches[2][$j])));
$fetch_array["values"][$i][$j] = ($line * 1);
if(isset($timestamp))
{
$fetch_array["timestamp"][$i][$j] = $timestamp;
}
}
} else {
print "<td align='center' colspan='0'>\n";
print "<strong>Empty data found for given period</strong>\n";
print "</td>\n";
return;
}


....

a solvable problem ?

please.....

source rrd.php


apache1.33 + php4.3.9+mysql3.58 used...
cacti0.85a
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests