I wrote a script about 10 years ago that will trim out spikes above any arbitrary level you want from MRTG log files--you can find a copy of it in the internet archive at: http://web.archive.org/web/20020806022906/buckaroo.xo.com/MRTG/fix_bad_mrtg_logs.pl
You simply call it as "fix_bad_mrtg_logs.pl 250kb filename.log filename.NEW" it'll trim out anything over the value you specify, and create a new log file; once it's done, back up your old log file: cp filename.log filename.SAV cp filename.NEW filename.log Then you can delete the images associated with the logfile, and the next time MRTG runs, it'll re-create new images based on the trimmed logfile without the spikes in them. Matt ----- Original Message ---- From: Gaurav Ghimire <[EMAIL PROTECTED]> To: "Volk,Gregory B" <[EMAIL PROTECTED]> Cc: [email protected] Sent: Wednesday, March 28, 2007 4:52:22 AM Subject: Re: [mrtg] Removing some spikes from older graphs ya i know that it can be done by scrolling down, finding the values and deleting the one it has created the spikes, but what if the spikes were not that big and were in the range of around 500 Kbs where the traffic should be around a a range of 200 kbs, it will be hard finding the spikes. so it means that i have to scroll down the log file where the timestamp difference is long and than assume that "this is the one i am looking for" and delete it right. :S any other suggestions.. > The only way I know of to do this with .log files is to open up the file > in vi/notepad and manually page down through the file, find the bad data > point, and change it to zero or something. This kind of thing is a > little easier to fix with RRD files because you can dump the file to > XML, change the MAX value, and then restore it with range checking on. > If you set the MAX value below the spike, but above the typical > (correct) maximums, this will effectively chop anything above MAX out. > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Gaurav Ghimire > Sent: Wednesday, March 28, 2007 6:23 AM > To: [email protected] > Subject: [mrtg] Removing some spikes from older graphs > > Dear all, > > Thanks for every help I had got in here till now and now i need one more > hehe :D, > > What stuck me now is we had some really big spikes in the logs, and > mistakenly it was left and no body removed it from the .log files and > now the spikes arent in the day graph but are in the week, month and > yearly graph so I want to know that is there any way I can remove them > from the month and other graphs? .....pleasae its very urgent > > Awaiting reply, > -- > Gaurav Ghimire > Support Dept. > Subisu Cablenet Pvt. Ltd. > Baluwatar, Kathmandu. > > _______________________________________________ > mrtg mailing list > [email protected] > https://lists.oetiker.ch/cgi-bin/listinfo/mrtg > -- Gaurav Ghimire Support Dept. Subisu Cablenet Pvt. Ltd. Baluwatar, Kathmandu. _______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg ____________________________________________________________________________________ Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 _______________________________________________ mrtg mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
