Hi, So, we have to discover the commands we have to do for rrdtool produce these graphs at midnight, for example, in a separated folder. Will be something like is descripted at http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/tutorial/rrdtutorial.html :
rrdtool graph speed.gif \ --start 920804400 --end 920808000 \ DEF:myspeed=test.rrd:speed:AVERAGE \ LINE2:myspeed#FF0000 Maybe there are better examples at 14all.cgi and routers2.cgi, but to find and understand them, we must understand Perl,what I don't do yet. :( but don't get sad. Try contact with the author of the site http://www.geocities.com/mrtgutil/screenshot.html . He perhaps can help more than me. Regards Davi -----Mensagem original----- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviada em: quinta-feira, 25 de dezembro de 2003 08:47 Para: Davi de Paula Cabral - DATAPREVRJ; rrd-users@list.ee.ethz.ch Assunto: Re: [rrd-users] ENC: MRTG Archiver Hi, Archiving means by storing MRTG graphs of each router interfaces on a daily basis. The script given below stores .log files in 'today' folder & creates its tar ball. Is there anyway to create graphs using these same .log files. We want to store MRTG graphs('Daily' graph) in 'today' folder & also create a tar ball for later use. How do we. rgds, Hardik ----- Original Message ----- From: "Davi de Paula Cabral - DATAPREVRJ" <[EMAIL PROTECTED]> To: <rrd-users@list.ee.ethz.ch> Sent: Tuesday, December 23, 2003 7:32 PM Subject: [rrd-users] ENC: MRTG Archiver What do you mean by "archiving"? I made a script that runs every midnight, reading the last 24 hours data of the RRD databases, then putting data on CSV files , zipping them and storing in separated folders. Everybody, feel free for criticize. The "grep" part can be not necessary if you use dots as decimal indicator; here in brazil we use commas; and dots we use for thousand, million and so on. The "today" folder stores the last information, without "zipping", ready for use. Why starting "now - 60s" and ending "now - 86220"? My MRTG runs every minute. I can't run script at 00:00 because at this time is already another day, right? If I want to close a day I have to work at this end, not at the start of the following day. so I work at 23:59. But I have no warranty that at 23:59 the corresponding fields of RRD databases have data. So, I extract 60 seconds and start working with 23:58 data. And the start? Well, 24h = 86400. Each day has 24h, right? Not exactly. If "now" is 23:58, I can't take 23:58 yesterday. I will take 00:00, that is 86400 - 120 = 86280 seconds. But remember, I've already subtracted 60 secods, but now I subtract 86220. See below: -------------------------- #!/bin/sh ennd=$(date +%s) ennd=$(( ennd - 60 )) starrt=$(( ennd - 86220 )) todday=$(date +%d-%B-%Y) path=/var/ftp/logsmrtg/$todday original=/var/ftp/logsmrtg/today mkdir $path rm -f $originais/*.* cd /var/www/html for databases in *.rrd; do rrdtool fetch ${databases} AVERAGE --start $starrt --end $ennd > $path/a${databases}.log done for databases in *.rrd; do grep ':' $path/a${databases}.log | sed -e 's/: / /' | sed -e 's/\./,/' | sed -e 's/\./,/' | tac > $original/${databases}.log done rm -f $path/*.* cd $original rename .rrd.log .log *.rrd.log unix2dos -q *.log chmod 755 *.* tar -cf $path/${todday}.tar . gzip -rvq $path/${todday}.tar chmod 755 $path/*.* -------------------------------- I hope confusion will help. Davi -*-*-*-*-*-*-*-*- -----Mensagem original----- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviada em: terca-feira, 23 de dezembro de 2003 02:04 Para: rrd-users@list.ee.ethz.ch Assunto: [rrd-users] MRTG Archiver Hello all, I've been trying to cofigure MRTG archiever on my RedHat linux box. The script mrtg-archiver seems to be using the HTML file for individual targets generated inside the WorkDir. ------------------------------------------------------ if(open(HTMLFILE, "$WorkDir/$target.html")) { ------------------------------------------------------ We r using RRD-Tool & 14all.cgi, which does not generate the HTML files in the WorkDir. It only generates files like <target>-daily.png, daily.s-i.png, -monthly.png, .rrd, -weekly.png, -yearly.png for each target. In this case how do we archive our MRTG. Pl suggest. rgds, Hardik Pandya GNFC Ltd. India. -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi