From: Ben C. <Be...@cl...> - 2004-05-28 10:06:28
|
Swarup, I believe you do not have the library 'libmysqlclient', or this is in the wrong directory. Can you please try and locate this lib: # find / -name "libmysqlclient*" When you have the location, please edit the Makefile: LDFLAGS= -L/usr/local/lib/mysql -lmysqlclient -lm Adjust the '-L' Linkage path for that which is correct for your setup. Please let me know if this solves your problem. Regards, Ben. PS, I will would like to copy this email to the mailing list 'perfparse-users' so that other users can see these comments. Swarup Kumar wrote: > Sir, > I am trying to install perfparse on redhat enterprise. I have installed > nagios 1.2 in /usr/local/nms directory. Before compiling the perfparse, i > made the necessary PATH changes in config.h,Makefile and perfparse.cfg. > I am already using mysql and have created a database named nms with the > command supplied by u in README.txt. > I have installed Mysql 4.0.18 and running fine. > > Now when i run perfparse command to start it, gives me the following error: > > > [root@cruxonline bin]# ./perfparse > ./perfparse: error while loading shared libraries: libmysqlclient.so.10: > cannot open shared object file: No such file or directory > [root@cruxonline bin]# > > > Please help > > Thanks > > Swarup Kumar > INDIA > |
From: Ben C. <Ben...@ro...> - 2004-05-28 11:57:20
|
Swarup, Sorry but you do need to compile with --with-file-perfdata. There is no other method to get Nagios to produce the data. The following is a check-sheet of other Nagios related problems: 1. You are using the latest Nagios, 1.2. 2. You are using the latest nagios plugins. Only these produce performance data. You can check this by running one, like 'check_disk'. If you have performance data, this should reply: DISK OK - free space: / 8089 MB (22%); /boot 35 MB (76%) | /=8089MB;33312;35163;0;37014 /boot=34MB;40;42;0;45 You can see the performance data beyond the '|'. 3. You have compiled nagios with the option to produce performance data. Using the '--with-file-perfdata'. Ie: ./configure --with-file-perfdata 4. Set the permissions on the servicelog file as: -rw-rw-r-- nagios nagios ie: $ chmod 664 serviceperf.log $ chown nagios.nagios serviceperf.log 5. Check 'nagios.cfg', ensure you have these lines somewhere: process_performance_data=1 xpdfile_host_perfdata_file=/usr/local/nagios/var/hostperf.log xpdfile_host_perfdata_template=$TIMET$\t$HOSTNAME$\t$OUTPUT$\t$PERFDATA$ xpdfile_service_perfdata_file=/usr/local/nagios/var/serviceperf.log xpdfile_service_perfdata_template=$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$OUTPUT$\t$PERFDATA$ 6. In services.cfg, ensure this line is in all services you want to monitor: (Or the generic parent table.) process_perf_data 1 7. In Nagios 'Process Info' page. At the bottom of the Process Information box, ensure you have: "Performance Data Being Processed? Yes" Regard, Ben |
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. |