From: Ben C. <Be...@cl...> - 2004-05-28 14:08:35
|
Swarup, I am glad you have it working. It will add hosts as and when it finds data for them. The reasons it=20 has not added all hosts can only be that there is not yet any data for th= em. You will want to run 'perfparse' frequently. I find that once every ten=20 minutes is good. You will find a file 'perfparse.sh' which should have=20 been moved into nagios/bin. Run this from the cron every ten minutes. This will add lost of data. The main reason for perfparse is to have a=20 permanent record of your network. My database of about one months has=20 3.6 million records in the perfdata_service_bin file, and the whole=20 database is about 4.5 Gb in size. My best advise is to allow lots of=20 room, or store data for just a few hosts, or use a long check frequency=20 within Nagios. Also use Nagios to check on the size of this disk. You=20 also may want to control the MySQL logs, they grow much faster than the=20 data they log. At least disks are cheep at the moment. A 120Gb disk capable of holding=20 two years of our data is less than $100. (=A375 here in UK.) There is not yet any method of deleting from this database. If you wish=20 to delete, then you will have to manually. Using 'mysql', enter=20 something like: DELETE FROM perfdata_service_bin WHERE ctime < NOW() - INTERVAL 30 DAYS; DELETE FROM perfdata_service_raw WHERE ctime < NOW() - INTERVAL 30 DAYS; If you don't use the 'raw' data, which is not used by any of PerfParse,=20 then simply enter: DELETE FROM perfdata_service_raw; Or, if you just want to delete data from a specific host, enter: DELETE FROM perfdata_service_bin WHERE host =3D 'host_name' AND ctime <=20 NOW() - INTERVAL 30 DAYS; You can add any of these commands into perfparse.sh. Eg: echo "DELETE FROM perfdata_service_raw;" | mysql -u user -ppass -D=20 database -h hostname Deleting the MySQL logs is simple. Find the data or log directory and=20 enter: # rm database-bin.0* # rm access.log Where 'database' is the name of your host, which may be changed in my.cfg. DO NOT EVER delete database-bin.index !!!! These features will be added to the product at some time in the (near)=20 future. Regards, Ben. PS, I have posted this reply to perfparse-users mailing list for the=20 interest of other users. |