Suggested VRULE code mod

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
andy

Suggested VRULE code mod

Post by andy »

This diff to rrd_functions.php allows you to specify, e.g. -24:00 in the VRULE Value to draw a line at 24 hours ago.

Replace in the VRULE section:

$value = date("U", mktime($value_array[0],$value_array[1],0));

with:

if($value_array[0] < 0) {
$value = date("U") - (-3600*$value_array[0]) - 60*$value_array[1];
} else {
$value = date("U", mktime($value_array[0],$value_array[1],0));
}
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

People should be able to find it easier here.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests