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 ??? >>> >>> >>> |