RE: Multiple graphs with different datatypes on s ame page. UPDATED for 1.0.5!
Edmonds, Alan <Alan.Edmonds <at> t-mobile.net>
2004-09-02 10:34:34 GMT
I haven't tried this patch, but I will.
What my guys do here is create some TWiki pages of the graphs grouped they way they like them.
The graphs are also hyperlinked to the actual Cricket page. One way to solve it.....
Alan
> -----Original Message-----
> From: cricket-users-admin <at> lists.sourceforge.net
> [mailto:cricket-users-admin <at> lists.sourceforge.net]On Behalf Of
> Crombleholme, Roy
> Sent: 02 September 2004 10:26
> To: 'Earl Miles'; cricket-users <at> lists.sourceforge.net;
> cricket-developers <at> lists.sourcefourge.net
> Subject: RE: [cricket-users] Multiple graphs with different
> datatypes on
> s ame page. UPDATED for 1.0.5!
>
>
> Hey thanks a lot,
>
> This should be a feature incorporated into cricket - its so
> helpful to be
> able to view a quick summary on one page.
>
> The navigation of cricket is one of the only problems with it
> ( and the lack
> of summaries of course ) but now I can get my main graphs all
> on one page.
>
> If cricket-lists had stars to give I'd give you one!!
>
> I didn't have any problems integrating my old data. Did you
> install on the
> same OS? I know that RRD's created on Solaris for instance
> will not work on
> linux. To get round this I had to dump my RRD's to XML files
> on the solaris
> box and restore from the XML to RRD on my linux box. Maybe
> that could work
> for you.
>
> Oh and by the way, thanks for the patch ;)
>
> Roy
>
> -----Original Message-----
> From: Earl Miles [mailto:merlin <at> logrus.com]
> Sent: 02 September 2004 02:49
> To: cricket-users <at> lists.sourceforge.net;
> cricket-developers <at> lists.sourcefourge.net
> Subject: [cricket-users] Multiple graphs with different
> datatypes on same
> page. UPDATED for 1.0.5!
>
> I got my cricket installation upgraded (though I can't seem
> to get it to
> accept my historical data; it generates new graphs just fine,
> but when I
> copy the old data in I get blank graphs. I haven't played
> with it much yet.)
>
> I have recreated my patch for the 1.0.5 release. Here is a summary:
>
> I've created a small patch to grapher.cgi in the 1.0.5
> version that will let you create summary graphs; all that needs to
> exist is a view for every graph. The patch adds a "targets-views"
> value that works exactly like targets-short-desc and
> targets-long-desc: a comma separated list of values that maps to each
> target.
>
> I hope those who've been looking for the ability to generate summary
> pages find this patch helpful.
>
> The summary graph I'm using looks like this:
>
> --- cut here ---
> # This file exists in its own directory under cricket-config,
> # which I creatively call "overview".
>
> target --default--
> directory-desc = "Overview of important graphs"
> order = "1000"
>
> target overview
> short-desc = "Throughput and Ping Times"
> target-name = "General Overview"
>
> targets = "/router-interfaces/atm-vc_1;
> /latency/1-hop;/latency/2-hop;
> /latency/3-hop;/latency/1-hop;
> /latency/2-hop;/latency/3-hop"
> targets-views =
> "("octets","latency","latency","latency","loss","loss","
> loss")"
> targets-long-desc = "("DSL traffic",
> "Latency over DSL",
> "Latency to ISP Gateway",
> "Latency to NSP",
> "PacketLoss over DSL",
> "PacketLoss at ISP Gateway",
> "PacketLoss at NSP")"
>
> --- cut here ---
>
> As you can see, it's quite simple. Here is the patch. Save it as
> a file named something like: summaries.patch
>
> patch grapher.cgi summaries.patch
>
> --- cut here ---
>
> 440a441,447
> > # Load 'targets-views' Merlin's Patch
> > my ( <at> targetsViews);
> > my ($targetsViews) = $targRef->{'targets-views'};
> > if (defined($targetsViews)) {
> > <at> targetsViews = Eval($targetsViews);
> > }
> > # end Merlin's Patch
> 575a583,589
> > # Merlin's Patch
> > # if a targets-view set, use it.
> > if ((defined($targetsViews[$i])) &&
> > ($targetsViews[$i] ne '')) {
> > $gQ->param('view', $targetsViews[$i]);
> > }
> > # end Merlin's Patch
> 834c848,861
> < foreach $item (sort <at> dirs) {
> ---
> > # Begin Merlin's Patch
> > <at> dirs = sort {
> > my($ordera, $orderb);
> >
> > $ordera = $targs->{$a}->{'order'};
> > $ordera = 0 unless defined($ordera);
> > $orderb = $targs->{$b}->{'order'};
> > $orderb = 0 unless defined($orderb);
> > # sort reverse of "order", then in forward
> alphanumeric order
> > $orderb <=> $ordera || $a cmp $b;
> > } <at> dirs;
> >
> > foreach $item ( <at> dirs) {
> > # End Merlin's Patch
> 1378c1405,1433
> < my($range) = $gQ->param('range');
> ---
> > # Begin Merlin's Patch
> > # if there's no dslist, try to pull it from the view
> if we were
> sent one.
> > my($ttype) = lc($targRef->{'target-type'});
> > my($ttRef) = $gCT->configHash($name, 'targettype',
> $ttype, $targRef);
> >
> > if ((not defined($dslist)) or ($dslist eq '')) {
> > # copied straight from where we try to generate
> the dslist in
> generate HTML (270)
> > # this should probably be a sub instead.
> > my($v);
> > my($view) = lc($gQ->param('view'));
> > Error($view);
> > foreach $v (split(/\s*,\s*/, $ttRef->{'view'})) {
> > # views are like this: "cpu: cpu1load cpu5load"
> > my($vname, $dss) = split(/\s*:\s*/, $v, 2);
> > if ($view eq lc($vname)) {
> > # parse view name for HoltWinters special tag
> > $enableHoltWinters = 1 if ($view =~ /HoltWinters/);
> > $dslist = $dss;
> > # make it comma-separated
> > $dslist =~ s/\s*$//;
> > $dslist =~ s/\s+/,/g;
> > }
> > }
> > if (! $dslist) {
> > Error("Failed to get dslist from view name.");
> > }
> > }
> > # End Merlin's Patch
> > my($range) = $gQ->param('range');
> 1459,1460c1514,1517
> < my($ttype) = lc($targRef->{'target-type'});
> < my($ttRef) = $gCT->configHash($name, 'targettype',
> $ttype, $targRef);
> ---
> > # Merlin's Patch (Removed)
> > # my($ttype) = lc($targRef->{'target-type'});
> > # my($ttRef) = $gCT->configHash($name, 'targettype', $ttype,
> $targRef);
> > # End Merlin's Patch
> --- cut here ---
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
> _______________________________________________
> cricket-users mailing list
> cricket-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cricket-users
>
>
> ********************
> This e-mail contains information intended for the addressee only.
> It may be confidential and may be the subject of legal and/or
> professional privilege.
> If you are not the addressee you are not authorised to
> disseminate, distribute, copy or use this e-mail or any
> attachment to it
> The content may be personal or contain personal opinions and
> unless specifically stated or followed up in writing, the
> content cannot be taken to form a contract or to be an
> expression of the County Council's position.
> LCC reserves the right to monitor all incoming and outgoing email
> LCC has taken reasonable steps to ensure that outgoing
> communications do not contain malicious software and it is
> your responsibility to carry out any checks on this email
> before accepting the email and opening attachments.
> ********************
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
> _______________________________________________
> cricket-users mailing list
> cricket-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cricket-users
>
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_idP47&alloc_id808&op=click