Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Time range per graph

 
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests
Author Message
Torsten
Guest





PostPosted: Mon May 05, 2003 8:40 am    Post subject: Time range per graph Reply with quote

Hello,

It would be nice to have a configurable timerange per graph. Then you could monitor sources over let us say 48 hours (like in MRTG). This feature should be configurable per graph not global.

Greetings
Torsten
Back to top
TiRexx
Guest





PostPosted: Tue Sep 02, 2003 9:35 am    Post subject: Reply with quote

Hello Rax, cacti - great work... with ever version beter and beter...


So, I use time range and step feature in cacti 0.6.7
to do this i self modify source

sorry my bad php...

graph.php.diff
Code:

57c57
< $sql_id = mysql_query("select id from rrd_graph where id=$graphid",$cnn_id);
---
> $sql_id = mysql_query("select * from rrd_graph where id=$graphid",$cnn_id);
65c65,66
<
---
>
> if (mysql_result($sql_id, 0, "step") == 0) {
69a71,74
>       }
>    } else {?>
>            <div align="center"><img src="graph_image.php?graphid=<?print $graphid;?>&rraid=<?print mysql_result($sql_id_rra, $i_rra, "id");?>&
>            <?
70a76,77
>
>


graph_image.php.diff
Code:

37a38,52
>
> $sql_id = mysql_query("select * from rrd_graph where id=$graphid",$cnn_id);
> if (mysql_num_rows($sql_id) == 0) {
>         print "<strong><font size=\"+1\" color=\"FF0000\">GRAPH DOES NOT EXIST</font></strong>"; exit;
>       }
>
> if (mysql_result($sql_id, 0, "step") != 0) {
>     $graph_data_array["use2"] = true;
>     $graph_data_array["graph_start"] = mysql_result($sql_id, 0, "graphstart");
>     $graph_data_array["graph_end"] = mysql_result($sql_id, 0, "graphend");
>     $graph_data_array["graph_step"] = mysql_result($sql_id, 0, "step");
>     $graph_data_array["graph_height"] = $graph_height;
>     $graph_data_array["graph_width"] = $graph_width;
> }
>


graphs.php.diff
Code:

58c58
<                       basevalue,grouping,export) values ($id,$imageformatid,\"$title\",$height,$width,
---
>                       basevalue,grouping,export,step,graphstart,graphend) values ($id,$imageformatid,\"$title\",$height,$width,
60c60
<                       $autoscaleopts,\"$rigid\",$basevalue,\"$grouping\",\"$export\")",$cnn_id);
---
>                       $autoscaleopts,\"$rigid\",$basevalue,\"$grouping\",\"$export\",$step,\"$graphstart\",\"$graphend\")",$cnn_id);
87c87
<
---
>
98a99
>
136a138,146
>
>               DrawFormItem("Step","Step.");
>               DrawFormItemTextBox("step",$sql_id,"0","");
>
>               DrawFormItem("Start","Start.");
>               DrawFormItemTextBox("graphstart",$sql_id,"","");
>
>               DrawFormItem("End","End.");
>               DrawFormItemTextBox("graphend",$sql_id,"","");


for me this is useful to viev everage trafic/per hour , month in one graph
with rrd ranges e-1w : midnight (week) , Jan 1 : Jan 1 +12month (year)

only 3 mysql fields + some not big coding = great feature

anyway big senks fo great cacti
Back to top
pestilence
Cacti User


Joined: 25 Jul 2003
Posts: 207
Location: Athens/Greece

PostPosted: Tue Sep 02, 2003 11:07 am    Post subject: Reply with quote

Check cactistoric...this is a plugin for cacti that allows you to view graphs for a certain timeperiod.
For more info check this link:
http://www.raxnet.net/board/viewtopic.php?t=1643
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group