Re: Way to sort RRD like top talkers
Cricket <[email protected]> Tue, 07 Aug 2007 16:58:38 -0300
| Newsgroups | gmane.network.cricket.user |
|---|---|
| Message-ID | <[email protected]> |
Does MRTG graph is based on rrdtool ? what about cucti ? Cricket is good because you give the OID and get the rrd based graph at once. I found it having config tree is a very use full feature, however it is defecult to understand and customize it ... lol I tried again but here is the out put, it can not find the Cricket modules: Fetching with LWP: ftp://cpan.sunsite.ualberta.ca/pub/CPAN/modules/03modlist.data.gz Going to read /root/.cpan/sources/modules/03modlist.data.gz Going to write /root/.cpan/Metadata Warning: Cannot install Bundle::CricketPrereq, don't know what it is. Try the command i /Bundle::CricketPrereq/ to find objects with matching identifiers. *************************************************************************************** cpan> i /Bundle::CricketPrereq/ CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Database was generated on Tue, 07 Aug 2007 17:48:05 GMT No objects found of any type for argument /Bundle::CricketPrereq/ cpan> ******************************************************************************************* Nicolas Royo wrote: > ? > Glad to see that youve got it working > Regarding that perl cpan module, i just installed it typing perl -I. > -MCPAN -e 'install Bundle::CricketPrereq' > i supposed it is something related to paths and locations, since i > have it in /usr/share/cricket/lib > have tried running the perl-relocate script? (dunno if has something > to do, but it wont broke it!) > i have a curious question......what are you using cricket for? > im using it to poll over 3500 objects in my network (is far quicker > than cacti, but i recently discovered rtg, what a promissing script!) > anyways, cricket have gave me lot of flexibility in order to monitor > almost every client in my network (ISP) > cheers, > Nicolas > > > ------------------------------------------------------------------------ > *De:* Cricket [mailto:[email protected]] > *Enviado el:* mar 07/08/2007 13:18 > *Para:* Nicolas Royo > *Asunto:* Re: [cricket-users] Way to sort RRD like top talkers > > Hi Nicolas, > > Thanks for all your help. > the File.pm you provided is kind of much shorter than mine, > may be you are using previous version of Cricket. > > I just change following line on File.pm and it worked. > > /if ($v eq "0001" || $v eq "0002") {/ > /to > if ($v eq "0001" || $v eq "0002" || $v eq "0003") {/ > > > however I have another question, > in tutorial, we suppose to be able to install all related perl modules > through following command > but I got not found !!!!!! > > % cd cricket/lib > % perl -I. -MCPAN -e 'install Bundle::CricketPrereq' > > > could you able to do so ? > > in my case becasue all the perl scripts was giving me error for missing > .pm files, so > I added use lib "path_to_my_perl_lib" > > any way thanks for your help. > if it was not you, I was stuck with RPM installation. > > > Cheers > > / /// > > > > Nicolas Royo wrote: > > ? > > Mmmm cant figure it out! > > lets try this...... > > backup your old file.pm > > and use mine attached in this text, then tell me how did it worked out > > for you > > ps: dont forget to maintaing same file attributes. > > ================================================ > > # -*-perl-*- > > # Cricket: a configuration, polling and data display wrapper for RRD > files > > # > > # Copyright (C) 1998 Jeff R. Allen and WebTV Networks, Inc. > > # > > # This program is free software; you can redistribute it and/or modify > > # it under the terms of the GNU General Public License as published by > > # the Free Software Foundation; either version 2 of the License, or > > # (at your option) any later version. > > # > > # This program is distributed in the hope that it will be useful, > > # but WITHOUT ANY WARRANTY; without even the implied warranty of > > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > # GNU General Public License for more details. > > # > > # You should have received a copy of the GNU General Public License > > # along with this program; if not, write to the Free Software > > # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. > > use Common::Log; > > $main::gDSFetch{'file'} = \&fileFetch; > > sub fileFetch { > > # This procedure is passed a REFERENCE to an array of file datasources. > > # The line consists of "index:line-num:shell command" > > # > > # There can and will be spaces in the shell command. If line-num > > # is missing it is assumed to be the first output line. > > # > > # VERY IMPORTANT: The index MUST be returned with the corresponding > value, > > # otherwise it'll get put back into the wrong spot in the RRD. > > my($dsList, $name, $target) = @_; > > my(@results, %files); > > my($line); > > foreach $line (@{$dsList}) { > > my(@components) = split(/:/, $line, 3); > > my($index, $lineno, $file); > > if ($#components+1 == 3) { > > ($index, $lineno, $file) = @components; > > } elsif ($#components == 1) { > > ($index, $file) = @components; > > $lineno = 0; > > } else { > > Error("Malformed datasource source: $line."); > > return (); > > } > > push(@{ $files{$file} }, "$index:$lineno"); > > } > > my($file, $ilRef, $il); > > while (($file, $ilRef) = each %files) { > > Info("Reading data from $file for " . > > $target->{'auto-target-name'}); > > if (open(F, "<$file")) { > > my(@lines); > > chomp(@lines = <F>); > > close(F); > > while ($il = shift @{ $ilRef } ) { > > my($index, $lineno) = split(/:/, $il, 2); > > if (defined($lines[$lineno])) { > > push @results, "$index:$lines[$lineno]"; > > } else { > > push @results, "$index:U"; > > } > > } > > } else { > > Error("Could not fetch data for " . > > $target->{'auto-target-name'} . > > " from file $file: $!."); > > } > > } > > return @results; > > } > > 1; > > # Local Variables: > > # mode: perl > > # indent-tabs-mode: nil > > # tab-width: 4 > > # perl-indent-level: 4 > > # End: > > ================================== > > > > ------------------------------------------------------------------------ > > *De:* Cricket [mailto:[email protected]] > > *Enviado el:* vie 03/08/2007 16:02 > > *Para:* Nicolas Royo > > *Asunto:* Re: [cricket-users] Way to sort RRD like top talkers > > > > I am using 1.2.23 > > > > rrdtool -v > > RRDtool 1.2.23 Copyright 1997-2007 by Tobias Oetiker <[email protected]> > > > > some people are suggesting to change some line in File.pm, > > and I don't know if I should change the File.pm located at cricket/lib > > or the original File.pm. > > > > Thanks for help > > > > > > Nicolas Royo wrote: > > > ? > > > Hi there again > > > > > > i think thats a issue related to and old rrdtool version > > > what version are you using by the way? (im using 1.2.19) > > > > > > > > > > ------------------------------------------------------------------------ > > > *De:* Cricket [mailto:[email protected]] > > > *Enviado el:* vie 03/08/2007 15:41 > > > *Para:* Nicolas Royo > > > *CC:* [email protected] > > > *Asunto:* Re: [cricket-users] Way to sort RRD like top talkers > > > > > > Hi Nicolas, > > > > > > I downloaded the tar file and followed the instruction. > > > now I get empty graph with following error: > > > > > > Current values not available: RRD file version 0003 not supported on > > > this arch. > > > > > > I know that I should modify File.pm, but want to make sure what is > > > recommended. > > > here is the related link: > > > > > > http://osdir.com/ml/network.cricket.user/2005-05/msg00033.html > > > > > > Thanks for help > > > > > > > > > Nicolas Royo wrote: > > > > cant figure it out, sorry > > > > i never need a patch for nothing > > > > my tips and experience are installing with apt-get (debian) and in > > > > centos untar´ing the latest release. > > > > where are your rrds being creating? at cricket-data or at > > > > usr/lib/cricket (this is defined in your defaults config file) > > > > the error gif not founding throwing to you i assumed is because > > you´ve > > > > made a BAD ln > > > > I have never used systemperf, i use cricket to monitor my routers > > > > switches and ups > > > > > > > > maybe you can post where do you get the original install readme > guide > > > > from? > > > > ive used this guide without no problem: > > > > http://cricket.sourceforge.net/support/doc/beginner.html > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > *De:* Cricket [mailto:[email protected]] > > > > *Enviado el:* mar 31/07/2007 0:15 > > > > *Para:* Nicolas Royo > > > > *CC:* [email protected] > > > > *Asunto:* Re: [cricket-users] Way to sort RRD like top talkers > > > > > > > > Hi Nicolas, > > > > > > > > yes , cricket-config.pl is well configured , because I am able to do > > > > compile and run the collector command. > > > > but grapher.cgi shows nothing unless "Current values not > available: " > > > > > > > > my directory structure is as follow: > > > > [root@babak cricket]# pwd > > > > /usr/lib/cricket > > > > [root@babak cricket]# ls > > > > config cricket cricket-data public_html sample-config > > > > > > > > > > > > > > > > here is the error_log output, > > > > > > > > line 1500 in grapher.cgi is as follow which I changed it because I > > saw a > > > > bug fix in internet: > > > > 1495 $lasttime = scalar(localtime(RRDs::last($rrd))); > > > > 1496 > > > > 1497 # use the dslist to create a set of defs/cdefs > > > > 1498 > > > > 1499 my($ds); > > > > 1500 foreach $ds (split(/,/, $dslist)) { > > > > 1501 $ds = lc($ds); > > > > > > > > > > > > > > > > [root@babak cricket]# tail /var/log/httpd/error_log > > > > [Mon Jul 30 23:49:08 2007] [error] [client 192.168.1.246] > [30-Jul-2007 > > > > 23:49:08*] No graph to make?, referer: > > > > > > > > > > http://192.168.1.20/cricket/grapher.cgi/systemperf/systemperf/hr_sys?view=Processes > > > > [Mon Jul 30 23:49:08 2007] [error] [client 192.168.1.246] Use of > > > > uninitialized value in localtime at > > > > /usr/lib/cricket/cricket/www/cgi/grapher.cgi line 1495., referer: > > > > > > > > > > http://192.168.1.20/cricket/grapher.cgi/systemperf/systemperf/hr_sys?view=Processes > > > > [Mon Jul 30 23:49:08 2007] [error] [client 192.168.1.246] Use of > > > > uninitialized value in split at > > > > /usr/lib/cricket/cricket/www/cgi/grapher.cgi line 1500., referer: > > > > > > > > > > http://192.168.1.20/cricket/grapher.cgi/systemperf/systemperf/hr_sys?view=Processes > > > > [Mon Jul 30 23:49:08 2007] [error] [client 192.168.1.246] > [30-Jul-2007 > > > > 23:49:08*] No graph to make?, referer: > > > > > > > > > > http://192.168.1.20/cricket/grapher.cgi/systemperf/systemperf/hr_sys?view=Processes > > > > [Mon Jul 30 23:49:08 2007] [error] [client 192.168.1.246] > [30-Jul-2007 > > > > 23:49:08*] Could not open > /tmp/cricket-cache/cricket-a2e4e157.png: No > > > > such file or directory, referer: > > > > > > > > > > http://192.168.1.20/cricket/grapher.cgi/systemperf/systemperf/hr_sys?view=Processes > > > > [Mon Jul 30 23:49:08 2007] [error] [client 192.168.1.246] > [30-Jul-2007 > > > > 23:49:08*] Could not open > /tmp/cricket-cache/cricket-af258888.png: No > > > > such file or directory, referer: > > > > > > > > > > http://192.168.1.20/cricket/grapher.cgi/systemperf/systemperf/hr_sys?view=Processes > > > > [Mon Jul 30 23:49:08 2007] [error] [client 192.168.1.246] > [30-Jul-2007 > > > > 23:49:08*] Could not open images/failed.gif: No such file or > > directory, > > > > referer: > > > > > > > > > > http://192.168.1.20/cricket/grapher.cgi/systemperf/systemperf/hr_sys?view=Processes > > > > [Mon Jul 30 23:49:08 2007] [error] [client 192.168.1.246] > [30-Jul-2007 > > > > 23:49:08*] Could not send failure gif: No such file or directory, > > > > referer: > > > > > > > > > > http://192.168.1.20/cricket/grapher.cgi/systemperf/systemperf/hr_sys?view=Processes > > > > [Mon Jul 30 23:49:08 2007] [error] [client 192.168.1.246] > [30-Jul-2007 > > > > 23:49:08*] Could not open images/failed.gif: No such file or > > directory, > > > > referer: > > > > > > > > > > http://192.168.1.20/cricket/grapher.cgi/systemperf/systemperf/hr_sys?view=Processes > > > > [Mon Jul 30 23:49:08 2007] [error] [client 192.168.1.246] > [30-Jul-2007 > > > > 23:49:08*] Could not send failure gif: No such file or directory, > > > > referer: > > > > > > > > > > http://192.168.1.20/cricket/grapher.cgi/systemperf/systemperf/hr_sys?view=Processes > > > > > > > > > > > > Nicolas Royo wrote: > > > > > Hi there, > > > > > > > > > > so you are using red hat? > > > > > where are your config, bin and cgi files stored? > > > > > what error you are receiving when you use grapher.cgi? > > > > > have you tried making "tail /var/log/apache/errors.log"? > > > > > is your cricket-config.pl well configured? > > > > > > > > > > regards > > > > > Nicolas > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > *De:* Cricket [mailto:[email protected]] > > > > > *Enviado el:* lun 30/07/2007 21:34 > > > > > *Para:* Nicolas Royo > > > > > *CC:* [email protected] > > > > > *Asunto:* Re: [cricket-users] Way to sort RRD like top talkers > > > > > > > > > > Hi Nicolas, > > > > > > > > > > may I ask if you had any difficulty installing cricket ? > > > > > I installed the rpm and had a lot of problem regarding directory > > > > > structure. > > > > > now every thing works unless grapher.cgi and I think it should > be a > > > > > directory structure > > > > > problem as it is trying to read rrd directory but it can not. > > > > > > > > > > > > > > > any tip ? > > > > > > > > > > Thanks > > > > > > > > > > Nicolas Royo wrote: > > > > > > Has anyone find a way for the grapher.cgi to sort targets > > according > > > > > traffic? > > > > > > > > > > > > > > > > > > > > > > > > I´m struggling with toptalkers from contrib files, > but cant > > get it > > > > > to work! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > This SF.net email is sponsored by: Splunk Inc. > > > > > > Still grepping through log files to find problems? Stop. > > > > > > Now Search log events and configuration files using AJAX and a > > > > browser. > > > > > > Download your FREE copy of Splunk now >> http://get.splunk.com/ > > > > > > _______________________________________________ > > > > > > cricket-users mailing list > > > > > > [email protected] > > > > > > https://lists.sourceforge.net/lists/listinfo/cricket-users > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/