Re: [Nfsen-discuss] resetting profile data size
Netflow visualisation and investigation tool
Brought to you by:
phaag
|
From: Peter H. <ha...@sw...> - 2006-07-20 06:36:19
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Ivan, - -------- Original Message -------- From: "Ivan A. Beveridge" <iv...@li...> To: ha...@sw... Subject: Re:[Nfsen-discuss] resetting profile data size Date: Wed Jul 19 2006 20:33:25 GMT+0200 (CEST) > Hi Peter, > > On 19/07/2006 15:15, Peter Haag wrote: > >>> That's true. Up to current releases, rebuilding a profile means rebuilding the profile from available data and recreating the RRD DBs. This updates all stats in profile.dat, so your profile reflects, >>> what's on the disk. >>> >>>>> Hacking the profile.dat may be a solution but, if there is a >>>>> better/cleaner way it would be good, as I'll be documenting it for >>>>> others to know. >>> Well - if you ask for a "clean" way .... but I assume you want to have your problem solved, "hacking" is most probably the better word ... >>> >>> Without any warranty: >>> 1. To be a kind of save, backup the rrd files in question - one never knows .. >>> 2. in module libexec/NfProfile.pm: >>> comment line 804, reading: NfSenRRD::SetupRRD(... >>> This line number is valid for snapshot-20060412 >>> This prevents the setup of new RRD DBs >>> 3. rebuild the profile >>> In the next update cycle, you will see massive error messages in the log file, where RRD >>> complains about new timeslot is older than most recent timeslot. These are complaining messages only >>> and do not really harm. >>> 4. Uncomment line 804 in NfProfile.pm >>> >>> Note: you do not need to reload NfSen, as profile rebuilding is done by the process you start. >>> >>> If anythings fails and the profile ends up totally screwed up, you can savely copy back the saved RRD DBs .. > > I am curious - will this (profile rebuild) will recreate the PROFILE / > PROFILEDATA directory structure? If so I may just document a: > * lock all profiles > * copy all rrds aside > * rebuild all profiles > * copy all rrds back > * unlock all profiles This will work as well - however, I would do it rather profile by profile, otherwise if you lock all profiles at once, the gap in the graph is bigger than absolutely required, or in other words: foreach profile do: lock profile copy all rrds aside rebuild profile copy all rrds back unlock profile > > Hrm - what you mention looks quite a gamble aswell (as I've already well - gamble is more luck than knowledge. I would not say that with my methode :) > recreated the directory heirarchy and got it running again). I think > what I'll try/do is: > * lock profile > * du -sb $PROFILEDATA/live > * change the "size" in profile.dat to be that value > * unlock profile > * whistle and hide if it all goes tits-up ;) It's like Perl - "there is always more than one way to do it" :) - Peter > > >>> I konw, it's cold comfort, but future releases will have better profile expiring/rebuilding capabilities. > > Nope - this is fine .. I know ways to get round the issue. To know that > the problem/fix has been considered for a future version is great - it's > evolution. We can't think of all possible problems to guard against for > code/systems that we design ... but I seem to be finding cunning new > ways to break things ;) > > Cheers > > > Ivan > -- > Ivan Beveridge > <iv...@li...> http://www.linx.net/ - ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Nfsen-discuss mailing list Nfs...@li... https://lists.sourceforge.net/lists/listinfo/nfsen-discuss - -- _______ SWITCH - The Swiss Education and Research Network ______ Peter Haag, Security Engineer, Member of SWITCH CERT PGP fingerprint: D9 31 D5 83 03 95 68 BA FB 84 CA 94 AB FC 5D D7 SWITCH, Limmatquai 138, CH-8001 Zurich, Switzerland E-mail: pet...@sw... Web: http://www.switch.ch/security -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iQCVAwUBRL8kWv5AbZRALNr/AQKUBAQAkSKkNTMbd0D6zZaqocPMMDKbrsNkiw+B v2qIANyEqEuJBrm6meTFMAYQNWcXPh0yKUgdFWoE0mopU2XTB2GWaRXBoLLwYuVs d1LKx78gy6W+ur3ZGJDohZSerqwlhqWrM1k7NPNdnlcLrfSy7SyB0FN6s3Ue1NIz kslhbJ/fdAQ= =thn1 -----END PGP SIGNATURE----- |