From: Arnar T. <ar...@ca...> - 2004-09-01 18:09:33
|
Just installed PerfParse ( version 0.100.1 ) and no data is put into 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 fully compatable with PerfParse ) in /usr/local/nagios/var/serviceperf.log getting : 1094062001 rex HTTP HTTP OK HTTP/1.1 200 OK - 4746 bytes in 0.531 seconds OK time=3D0.531222s;;;0.000000 size=3D4746B;;;0 but nothing is entered into the database for PerfParse, is the output 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 ??? --=20 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 ---------------------- |
From: Ben C. <Be...@cl...> - 2004-09-02 07:43:47
|
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 'perfparse -r' and return me the output from the run. Can you also check your drop file, which I see is /tmp/perfparse.drop. 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 into 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 = "perfmon" > DB_Name = "perfmon" > DB_Pass = "perfmon123" > DB_Host = "localhost" > Drop_File = "/tmp/perfparse.drop" > Service_Log = "/usr/local/nagios/var/serviceperf.log" > Host_Log = "/usr/local/nagios/var/hostperf.log" > Dummy_Hostname = "dummy" > Delete_Service_Log = "No" > Delete_Host_Log = "No" > Nagios_Lock = "/usr/local/nagios/var/nagios.lock" > Lock_File = "/var/lock/perfparse.lock" > Be_Silent = "no" > Do_Report = "no" > Accept_Odd_Chars_in_Label = "no" > Default_user_permissions_Policy = "rw" > Default_user_permissions_Host_groups = "rw" > > > I am using the check_http plugin ( which to my understanding is fully > compatable with PerfParse ) > > in /usr/local/nagios/var/serviceperf.log getting : > 1094062001 rex HTTP HTTP OK HTTP/1.1 200 OK - 4746 bytes in > 0.531 seconds OK time=0.531222s;;;0.000000 size=4746B;;;0 > > but nothing is entered into the database for PerfParse, is the output 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 ??? > > > |
From: Arnar T. <ar...@ca...> - 2004-09-02 08:45:03
|
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 the serviceperf.log file ? file permissions for serviceperf.log are : rw-rw-r-- 1 nagios nagios 737105 Sep 2 08:36 serviceperf.log 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 response time, black70 returns 192.168.106.70 OK =20 time=3D0.407424s;;;0.000000 1094114444 rex.caa.is FTP FTP OK - 0.038 second response time on port 21 [220 ready, dude (vsFTPd 1.1.0: beat me, break me)] =20 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, >=20 > You should be getting data. >=20 > Can you do two things for me? >=20 > Can you wait until you have a good sized log file. Then run 'perfparse= =20 > -r' and return me the output from the run. >=20 > Can you also check your drop file, which I see is /tmp/perfparse.drop.=20 > This might give you some reason why you have no data. >=20 > Regards, Ben >=20 >=20 >=20 > Arnar Thorarinsson wrote: >=20 > > Just installed PerfParse ( version 0.100.1 ) and no data is put into = the > > mysql database. > >=20 > > Running Nagios 1.2 on a redhat 9 system. > > when running /usr/local/nagios/bin/perfparse I get no output > >=20 > >=20 > > /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" > >=20 > >=20 > > I am using the check_http plugin ( which to my understanding is fully > > compatable with PerfParse ) > >=20 > > in /usr/local/nagios/var/serviceperf.log getting : > > 1094062001 rex HTTP HTTP OK HTTP/1.1 200 OK - 4746 bytes= in > > 0.531 seconds OK time=3D0.531222s;;;0.000000 size=3D4746B;;;0 > >=20 > > but nothing is entered into the database for PerfParse, is the output= in > > the serviceperf.log not correct ? > >=20 > > After initial installation of PerfParse are all the tables in the > > database suppost to be empty ? > > what am I missing here ??? > >=20 > >=20 > >=20 --=20 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 ---------------------- |
From: Ben C. <Ben...@ro...> - 2004-09-03 08:12:20
|
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 the 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 find 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 the code when running. Using this, and a little trial/error, it's possible to find the line it stops at. Eg, in the main() use: int main(int argc, char **argv) { char*config_file_name=NULL; tStart = time(NULL); sProgName = argv[0]; config_file_name = parse_arg_basic(argc, argv); DL; /* Get default settings */ conf = 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 you program stops. If you can give us any feedback here, this would be very much appreciated. 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 the > serviceperf.log file ? > > file permissions for serviceperf.log are : > rw-rw-r-- 1 nagios nagios 737105 Sep 2 08:36 serviceperf.log > example lines from serviceperf.log: > > 1094114364 kerf-2621-a PING PING OK - Packet loss = 0%, RTA > = 1.36 ms OK > 1094114404 pax.caa.is DNS DNS OK: 0.407 seconds response > time, black70 returns 192.168.106.70 OK > time=0.407424s;;;0.000000 > 1094114444 rex.caa.is FTP FTP OK - 0.038 second response > time on port 21 [220 ready, dude (vsFTPd 1.1.0: beat me, break me)] > OK time=0.037926s;0.000000;0.000000;0.000000;10.000000 > 1094114494 rex.caa.is PING PING OK - Packet loss = 0%, RTA > = 0.23 ms OK > 1094114534 kerf-2621-b PING PING OK - Packet loss = 0%, RTA > = 1.17 ms OK > 1094114584 pax.caa.is PING FPING OK - 192.168.106.12 > (loss=0%, rta=79.500000 ms) OK loss=0%;50;75;0;100 > rta=0.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 'perfparse >>-r' and return me the output from the run. >> >>Can you also check your drop file, which I see is /tmp/perfparse.drop. >>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 into 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 = "perfmon" >>>DB_Name = "perfmon" >>>DB_Pass = "perfmon123" >>>DB_Host = "localhost" >>>Drop_File = "/tmp/perfparse.drop" >>>Service_Log = "/usr/local/nagios/var/serviceperf.log" >>>Host_Log = "/usr/local/nagios/var/hostperf.log" >>>Dummy_Hostname = "dummy" >>>Delete_Service_Log = "No" >>>Delete_Host_Log = "No" >>>Nagios_Lock = "/usr/local/nagios/var/nagios.lock" >>>Lock_File = "/var/lock/perfparse.lock" >>>Be_Silent = "no" >>>Do_Report = "no" >>>Accept_Odd_Chars_in_Label = "no" >>>Default_user_permissions_Policy = "rw" >>>Default_user_permissions_Host_groups = "rw" >>> >>> >>>I am using the check_http plugin ( which to my understanding is fully >>>compatable with PerfParse ) >>> >>>in /usr/local/nagios/var/serviceperf.log getting : >>>1094062001 rex HTTP HTTP OK HTTP/1.1 200 OK - 4746 bytes in >>>0.531 seconds OK time=0.531222s;;;0.000000 size=4746B;;;0 >>> >>>but nothing is entered into the database for PerfParse, is the output 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 ??? >>> >>> >>> |
From: Arnar T. <ar...@ca...> - 2004-09-07 18:09:32
Attachments:
perfparse.c
perfparse.cfg
|
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 = 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 the > 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 find > 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 the > code when running. Using this, and a little trial/error, it's possible > to find the line it stops at. > > Eg, in the main() use: > > int main(int argc, char **argv) > { > char*config_file_name=NULL; > tStart = time(NULL); > sProgName = argv[0]; > config_file_name = parse_arg_basic(argc, argv); > > DL; > > /* Get default settings */ > conf = 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 you > program stops. > > If you can give us any feedback here, this would be very much appreciated. > > 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 the > > serviceperf.log file ? > > > > file permissions for serviceperf.log are : > > rw-rw-r-- 1 nagios nagios 737105 Sep 2 08:36 serviceperf.log > > example lines from serviceperf.log: > > > > 1094114364 kerf-2621-a PING PING OK - Packet loss = 0%, RTA > > = 1.36 ms OK > > 1094114404 pax.caa.is DNS DNS OK: 0.407 seconds response > > time, black70 returns 192.168.106.70 OK > > time=0.407424s;;;0.000000 > > 1094114444 rex.caa.is FTP FTP OK - 0.038 second response > > time on port 21 [220 ready, dude (vsFTPd 1.1.0: beat me, break me)] > > OK time=0.037926s;0.000000;0.000000;0.000000;10.000000 > > 1094114494 rex.caa.is PING PING OK - Packet loss = 0%, RTA > > = 0.23 ms OK > > 1094114534 kerf-2621-b PING PING OK - Packet loss = 0%, RTA > > = 1.17 ms OK > > 1094114584 pax.caa.is PING FPING OK - 192.168.106.12 > > (loss=0%, rta=79.500000 ms) OK loss=0%;50;75;0;100 > > rta=0.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 'perfparse > >>-r' and return me the output from the run. > >> > >>Can you also check your drop file, which I see is /tmp/perfparse.drop. > >>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 into 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 = "perfmon" > >>>DB_Name = "perfmon" > >>>DB_Pass = "perfmon123" > >>>DB_Host = "localhost" > >>>Drop_File = "/tmp/perfparse.drop" > >>>Service_Log = "/usr/local/nagios/var/serviceperf.log" > >>>Host_Log = "/usr/local/nagios/var/hostperf.log" > >>>Dummy_Hostname = "dummy" > >>>Delete_Service_Log = "No" > >>>Delete_Host_Log = "No" > >>>Nagios_Lock = "/usr/local/nagios/var/nagios.lock" > >>>Lock_File = "/var/lock/perfparse.lock" > >>>Be_Silent = "no" > >>>Do_Report = "no" > >>>Accept_Odd_Chars_in_Label = "no" > >>>Default_user_permissions_Policy = "rw" > >>>Default_user_permissions_Host_groups = "rw" > >>> > >>> > >>>I am using the check_http plugin ( which to my understanding is fully > >>>compatable with PerfParse ) > >>> > >>>in /usr/local/nagios/var/serviceperf.log getting : > >>>1094062001 rex HTTP HTTP OK HTTP/1.1 200 OK - 4746 bytes in > >>>0.531 seconds OK time=0.531222s;;;0.000000 size=4746B;;;0 > >>> > >>>but nothing is entered into the database for PerfParse, is the output 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ðja Arnar Þórarinsson Tölvunarfræðingur Kerfisdeild Sími : 569 4289 GSM : 861 2871 ---------------------- Flugmálastjórn Íslands Reykjavíkurflugvöllur 121 Reykjavík http://www.caa.is ---------------------- |
From: Ben C. <Be...@cl...> - 2004-09-08 08:20:17
|
New version 0.100.4 Some users are complaining about strange messages in the graph and slow response. This is with respect to an attempt to get the graph image to calculate the stats, then display them on the calling cgi code. This seems not to work with proxy servers and other as yet unknown factors. This is a release which does not display graph statistics until we have worked out a working model for this. Please keep the excellent feed back coming in! Regards, Ben. |
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/ - |
From: Arnar T. <ar...@ca...> - 2004-09-08 10:19:40
|
actually no but changing the Lock_File path from /var/lock/perfparse.lock to /usr/local/nagios/var/perfparse.lock does solve my problem and perfparse is now crunching my data :) Its always something simple isnt it ;) thx for your help all now onto the next business of setting up a bunch of passive checks On Wed, 2004-09-08 at 07:36, Yves Mettier wrote: > Check your config file. > Lock_File=perfparse.lock > Nagios_Lock=nagios.lock > > If you set Lock_File as nagios.lock, perfparse will never run while nagios 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 = 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 the > >> 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 find > >> 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 the > >> code when running. Using this, and a little trial/error, it's possible > >> to find the line it stops at. > >> > >> Eg, in the main() use: > >> > >> int main(int argc, char **argv) > >> { > >> char*config_file_name=NULL; > >> tStart = time(NULL); > >> sProgName = argv[0]; > >> config_file_name = parse_arg_basic(argc, argv); > >> > >> DL; > >> > >> /* Get default settings */ > >> conf = 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 you > >> program stops. > >> > >> If you can give us any feedback here, this would be very much appreciated. > >> > >> 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 the > >> > serviceperf.log file ? > >> > > >> > file permissions for serviceperf.log are : > >> > rw-rw-r-- 1 nagios nagios 737105 Sep 2 08:36 serviceperf.log > >> > example lines from serviceperf.log: > >> > > >> > 1094114364 kerf-2621-a PING PING OK - Packet loss = 0%, RTA > >> > = 1.36 ms OK > >> > 1094114404 pax.caa.is DNS DNS OK: 0.407 seconds response > >> > time, black70 returns 192.168.106.70 OK > >> > time=0.407424s;;;0.000000 > >> > 1094114444 rex.caa.is FTP FTP OK - 0.038 second response > >> > time on port 21 [220 ready, dude (vsFTPd 1.1.0: beat me, break me)] > >> > OK time=0.037926s;0.000000;0.000000;0.000000;10.000000 > >> > 1094114494 rex.caa.is PING PING OK - Packet loss = 0%, RTA > >> > = 0.23 ms OK > >> > 1094114534 kerf-2621-b PING PING OK - Packet loss = 0%, RTA > >> > = 1.17 ms OK > >> > 1094114584 pax.caa.is PING FPING OK - 192.168.106.12 > >> > (loss=0%, rta=79.500000 ms) OK loss=0%;50;75;0;100 > >> > rta=0.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 'perfparse > >> >>-r' and return me the output from the run. > >> >> > >> >>Can you also check your drop file, which I see is /tmp/perfparse.drop. > >> >>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 into 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 = "perfmon" > >> >>>DB_Name = "perfmon" > >> >>>DB_Pass = "perfmon123" > >> >>>DB_Host = "localhost" > >> >>>Drop_File = "/tmp/perfparse.drop" > >> >>>Service_Log = "/usr/local/nagios/var/serviceperf.log" > >> >>>Host_Log = "/usr/local/nagios/var/hostperf.log" > >> >>>Dummy_Hostname = "dummy" > >> >>>Delete_Service_Log = "No" > >> >>>Delete_Host_Log = "No" > >> >>>Nagios_Lock = "/usr/local/nagios/var/nagios.lock" > >> >>>Lock_File = "/var/lock/perfparse.lock" > >> >>>Be_Silent = "no" > >> >>>Do_Report = "no" > >> >>>Accept_Odd_Chars_in_Label = "no" > >> >>>Default_user_permissions_Policy = "rw" > >> >>>Default_user_permissions_Host_groups = "rw" > >> >>> > >> >>> > >> >>>I am using the check_http plugin ( which to my understanding is fully > >> >>>compatable with PerfParse ) > >> >>> > >> >>>in /usr/local/nagios/var/serviceperf.log getting : > >> >>>1094062001 rex HTTP HTTP OK HTTP/1.1 200 OK - 4746 bytes in > >> >>>0.531 seconds OK time=0.531222s;;;0.000000 size=4746B;;;0 > >> >>> > >> >>>but nothing is entered into the database for PerfParse, is the output 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ðja > > Arnar Þórarinsson > > > > Tölvunarfræðingur > > Kerfisdeild > > Sími : 569 4289 > > GSM : 861 2871 > > ---------------------- > > Flugmálastjórn Íslands > > Reykjavíkurflugvöllur > > 121 Reykjavík > > http://www.caa.is > > ---------------------- > > -- Kveðja Arnar Þórarinsson Tölvunarfræðingur Kerfisdeild Sími : 569 4289 GSM : 861 2871 ---------------------- Flugmálastjórn Íslands Reykjavíkurflugvöllur 121 Reykjavík http://www.caa.is ---------------------- |