From: Yves M. <yme...@li...> - 2004-09-08 07:36:59
|
Check your config file. Lock_File=3Dperfparse.lock Nagios_Lock=3Dnagios.lock If you set Lock_File as nagios.lock, perfparse will never run while nagio= s is running :) Yves > Ben, > > Yes I have the same versions of MySQL client library as MySQL server > (4.0.20) > > As for the manual debugging: > > > As far as I can seen perfparse stops in the function lock_or_exit: > ...snip... > i =3D open (conf->Lock_File, O_RDWR | O_CREAT, 0640); > CSDEBUG1("after open"); > CSDEBUG2(i); > if(i < 0) > { > CSDEBUG1("open failure"); > exit (EXIT_FAILURE); > } > ...snip... > > attacted is my modified perfparse.c file with debug macro and my > perfparse.cfg file. > perfparse version is 0.100.3 > > ok so perfparse cant open the lock file > lock file permissions are: > [nagios@black148 var]$ ll /usr/local/nagios/var/nagios.lock > -rw-r--r-- 1 root root 6 Sep 7 17:35 nagios.lock > > are the permissions here wrong ?? at least I dont see that. > > > > On Fri, 2004-09-03 at 08:11, Ben Clewett wrote: >> Arner, >> >> By the look of the response, it seems that the program 'perfparse' is >> crashing somewhere after loading the configuration file and before >> parsing the data. Unfortunately there is a lot of code here. >> >> Can you first check that the version of your MySQL client library is t= he >> same as your MySQL server? This can cause this problem. >> >> If not, then some heavier debugging will be needed. >> >> You can use tools like gdb if you feel confident. >> >> There is another debug, but it is manual. :) As we are all keen to fi= nd >> your problem, I ask whether you might have time to have a go? >> >> In the file perfparse/perfparse.c you can add the macro 'DB;' which >> reports the current line. If this is used, it will show the line of t= he >> code when running. Using this, and a little trial/error, it's possibl= e >> to find the line it stops at. >> >> Eg, in the main() use: >> >> int main(int argc, char **argv) >> { >> char*config_file_name=3DNULL; >> tStart =3D time(NULL); >> sProgName =3D argv[0]; >> config_file_name =3D parse_arg_basic(argc, argv); >> >> DL; >> >> /* Get default settings */ >> conf =3D conf_load(config_file_name); >> >> DL; >> >> /* Parse passed parameters: */ >> parse_arg(argc, argv); >> >> DL; >> >> /* Check the parameters */ >> check_params(argc,argv,conf); >> >> DL; >> >> /* Connect to MySQL: */ >> now_connect(TRUE); >> >> DL; >> >> This will print to the shell: >> >> 00160:HERE >> 00165:HERE >> 00170:HERE >> 00175:HERE >> 00180:HERE >> >> Using this method, it's possible to find out exactly where and when yo= u >> program stops. >> >> If you can give us any feedback here, this would be very much apprecia= ted. >> >> Regards, >> >> Ben >> >> >> >> >> >> Arnar Thorarinsson wrote: >> >> > Thats just it when I run /usr/local/nagios/bin/perfparse -r I get no >> > output, example: >> > [nagios@black148 nagios]$ /usr/local/nagios/bin/perfparse -r >> > [nagios@black148 nagios]$ >> > >> > I see no /tmp/perfparse.drop file >> > >> > Does this not suggest that perfparse never gets to actually parse th= e >> > serviceperf.log file ? >> > >> > file permissions for serviceperf.log are : >> > rw-rw-r-- 1 nagios nagios 737105 Sep 2 08:36 serviceperf.l= og >> > example lines from serviceperf.log: >> > >> > 1094114364 kerf-2621-a PING PING OK - Packet loss =3D 0%= , RTA >> > =3D 1.36 ms OK >> > 1094114404 pax.caa.is DNS DNS OK: 0.407 seconds respon= se >> > time, black70 returns 192.168.106.70 OK >> > time=3D0.407424s;;;0.000000 >> > 1094114444 rex.caa.is FTP FTP OK - 0.038 second respon= se >> > time on port 21 [220 ready, dude (vsFTPd 1.1.0: beat me, break me)] >> > OK time=3D0.037926s;0.000000;0.000000;0.000000;10.000000 >> > 1094114494 rex.caa.is PING PING OK - Packet loss =3D 0%= , RTA >> > =3D 0.23 ms OK >> > 1094114534 kerf-2621-b PING PING OK - Packet loss =3D 0%= , RTA >> > =3D 1.17 ms OK >> > 1094114584 pax.caa.is PING FPING OK - 192.168.106.12 >> > (loss=3D0%, rta=3D79.500000 ms) OK loss=3D0%;50;75;0;100 >> > rta=3D0.079500s;2.000000;5.000000;0.000000 >> > >> > can I turn some sort of debug on in perfparse ? >> > >> > >> > >> > On Thu, 2004-09-02 at 07:41, Ben Clewett wrote: >> > >> >>Dear Arnar, >> >> >> >>You should be getting data. >> >> >> >>Can you do two things for me? >> >> >> >>Can you wait until you have a good sized log file. Then run 'perfpa= rse >> >>-r' and return me the output from the run. >> >> >> >>Can you also check your drop file, which I see is /tmp/perfparse.dro= p. >> >>This might give you some reason why you have no data. >> >> >> >>Regards, Ben >> >> >> >> >> >> >> >>Arnar Thorarinsson wrote: >> >> >> >> >> >>>Just installed PerfParse ( version 0.100.1 ) and no data is put int= o the >> >>>mysql database. >> >>> >> >>>Running Nagios 1.2 on a redhat 9 system. >> >>>when running /usr/local/nagios/bin/perfparse I get no output >> >>> >> >>> >> >>>/usr/local/nagios/bin/perfparse --show_config >> >>>DB_User =3D "perfmon" >> >>>DB_Name =3D "perfmon" >> >>>DB_Pass =3D "perfmon123" >> >>>DB_Host =3D "localhost" >> >>>Drop_File =3D "/tmp/perfparse.drop" >> >>>Service_Log =3D "/usr/local/nagios/var/serviceperf.log" >> >>>Host_Log =3D "/usr/local/nagios/var/hostperf.log" >> >>>Dummy_Hostname =3D "dummy" >> >>>Delete_Service_Log =3D "No" >> >>>Delete_Host_Log =3D "No" >> >>>Nagios_Lock =3D "/usr/local/nagios/var/nagios.lock" >> >>>Lock_File =3D "/var/lock/perfparse.lock" >> >>>Be_Silent =3D "no" >> >>>Do_Report =3D "no" >> >>>Accept_Odd_Chars_in_Label =3D "no" >> >>>Default_user_permissions_Policy =3D "rw" >> >>>Default_user_permissions_Host_groups =3D "rw" >> >>> >> >>> >> >>>I am using the check_http plugin ( which to my understanding is ful= ly >> >>>compatable with PerfParse ) >> >>> >> >>>in /usr/local/nagios/var/serviceperf.log getting : >> >>>1094062001 rex HTTP HTTP OK HTTP/1.1 200 OK - 4746 byt= es in >> >>>0.531 seconds OK time=3D0.531222s;;;0.000000 size=3D4746B;;;= 0 >> >>> >> >>>but nothing is entered into the database for PerfParse, is the outp= ut in >> >>>the serviceperf.log not correct ? >> >>> >> >>>After initial installation of PerfParse are all the tables in the >> >>>database suppost to be empty ? >> >>>what am I missing here ??? >> >>> >> >>> >> >>> > -- > Kve=C3=B0ja > Arnar =C3=9E=C3=B3rarinsson > > T=C3=B6lvunarfr=C3=A6=C3=B0ingur > Kerfisdeild > S=C3=ADmi : 569 4289 > GSM : 861 2871 > ---------------------- > Flugm=C3=A1lastj=C3=B3rn =C3=8Dslands > Reykjav=C3=ADkurflugv=C3=B6llur > 121 Reykjav=C3=ADk > http://www.caa.is > ---------------------- > --=20 - Homepage - http://ymettier.free.fr - http://www.logicacmg.com - - GPG key - http://ymettier.free.fr/gpg.txt - - Maitretarot - http://www.nongnu.org/maitretarot/ - - GTKtalog - http://www.nongnu.org/gtktalog/ - |