Re: [Nfsen-discuss] resetting profile data size
Netflow visualisation and investigation tool
Brought to you by:
phaag
|
From: Ivan A. B. <iv...@li...> - 2006-07-19 18:34:26
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 Hrm - what you mention looks quite a gamble aswell (as I've already 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 ;) > 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/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEvnr0QQZN5jq7vncRAos7AKCPciMnGmNSoqGbJXvwF/H3FFrCcwCgmewo TVHdZmte+p5S5Ol5MTU/O38= =kKaR -----END PGP SIGNATURE----- |