From: Cook, G. <GW...@ma...> - 2004-08-25 19:55:56
|
per...@li... wrote: > I have been watching this post becasue I too am experiencing this > problem. It's been about 1 month since I've started collection > performance statistics and I'd like to do some cleanup. I > cannot create > deletion policies due to the "Cannot add or update a child row: a > foreign key constraint fails" error. > Any ideas on how to rectify this. I also ran the ./perfparse-db-tool > --update to see whether it would correct the problem. It > didn't change > anything. I have Version 0.99.05. Schema Version 0.12 >=20 > Thanks in advance > Tim I believe that this bug was fixed in Version 0.99.08, but it might have been 0.99.09. Either way, you should definitely be using the latest stable version -> 0.99.09. I thought that I saw someone else post about this issue and say that the version upgrade did not fix it for them. However, they did not mention if they ran 'perfparse-db-tool --update' after upgrading PerfParse. Everyone needs to realize something very important: With new versions, there are changes to the PerfParse code and there are sometimes changes made to the MySQL DB as well. You need to use the perfparse-db-tool to update your DB with each upgrade. This tool will be installed in your '<path_to>/nagios/bin/' directory, run it with the '--update' argument to ensure that DB changes are made properly. Garry W. Cook, CCNA Network Infrastructure Manager MACTEC, Inc. - http://www.mactec.com/ 303.308.6228 (Office) - 720.220.1862 (Mobile) |
From: James O. <jo...@re...> - 2004-08-25 21:08:11
|
Upgrading to 0.99.09 didn't fix this problem for me. Nor did running perfparse-db-tool --update. James -----Original Message----- From: Tim Brazil [mailto:br...@se...] Sent: Wednesday, August 25, 2004 1:39 PM Cc: per...@li... Subject: Re: [Perfparse-users] re: deletion policys Thanks Garry I updated to 0.99.09, ran ./perfparse-db-tool --update and it fixed my problem. Tim Cook, Garry wrote: >per...@li... wrote: > > >>I have been watching this post becasue I too am experiencing this >>problem. It's been about 1 month since I've started collection >>performance statistics and I'd like to do some cleanup. I >>cannot create >>deletion policies due to the "Cannot add or update a child row: a >>foreign key constraint fails" error. >>Any ideas on how to rectify this. I also ran the ./perfparse-db-tool >>--update to see whether it would correct the problem. It >>didn't change >>anything. I have Version 0.99.05. Schema Version 0.12 >> >>Thanks in advance >>Tim >> >> > >I believe that this bug was fixed in Version 0.99.08, but it might have >been 0.99.09. Either way, you should definitely be using the latest >stable version -> 0.99.09. >I thought that I saw someone else post about this issue and say that the >version upgrade did not fix it for them. However, they did not mention >if they ran 'perfparse-db-tool --update' after upgrading PerfParse. > >Everyone needs to realize something very important: >With new versions, there are changes to the PerfParse code and there are >sometimes changes made to the MySQL DB as well. You need to use the >perfparse-db-tool to update your DB with each upgrade. This tool will be >installed in your '<path_to>/nagios/bin/' directory, run it with the >'--update' argument to ensure that DB changes are made properly. > >Garry W. Cook, CCNA >Network Infrastructure Manager >MACTEC, Inc. - http://www.mactec.com/ >303.308.6228 (Office) - 720.220.1862 (Mobile) > > >------------------------------------------------------- >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 >_______________________________________________ >Perfparse-users mailing list >Per...@li... >https://lists.sourceforge.net/lists/listinfo/perfparse-users > > ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Perfparse-users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perfparse-users |
From: Tim B. <br...@se...> - 2004-08-25 21:43:14
|
Hi James The only other thing I did was changed to the newer sample version perfparse.cfg. Here are some thoughts... Did you see any "upgrade" output from ./perfparse-db-tool --update when you ran it indicating something actually happened? Is the binary from perfparse-db-tool the new one that was built with 0.99.09. I initially didn't "configure" correctly which "make install"ed perfparse-db-tool to the wrong directory (/usr/local/bin) which left the older version of perfparse-db-tool in place under /usr/local/nagios/bin Tim James Ochs wrote: > Upgrading to 0.99.09 didn't fix this problem for me. Nor did running > perfparse-db-tool --update. > > James > > -----Original Message----- > From: Tim Brazil [mailto:br...@se...] > Sent: Wednesday, August 25, 2004 1:39 PM > Cc: per...@li... > Subject: Re: [Perfparse-users] re: deletion policys > > Thanks Garry > I updated to 0.99.09, ran ./perfparse-db-tool --update and it fixed my > problem. > > Tim > > Cook, Garry wrote: > > >per...@li... wrote: > > > > > >>I have been watching this post becasue I too am experiencing this > >>problem. It's been about 1 month since I've started collection > >>performance statistics and I'd like to do some cleanup. I > >>cannot create > >>deletion policies due to the "Cannot add or update a child row: a > >>foreign key constraint fails" error. > >>Any ideas on how to rectify this. I also ran the ./perfparse-db-tool > >>--update to see whether it would correct the problem. It > >>didn't change > >>anything. I have Version 0.99.05. Schema Version 0.12 > >> > >>Thanks in advance > >>Tim > >> > >> > > > >I believe that this bug was fixed in Version 0.99.08, but it might have > >been 0.99.09. Either way, you should definitely be using the latest > >stable version -> 0.99.09. > >I thought that I saw someone else post about this issue and say that the > >version upgrade did not fix it for them. However, they did not mention > >if they ran 'perfparse-db-tool --update' after upgrading PerfParse. > > > >Everyone needs to realize something very important: > >With new versions, there are changes to the PerfParse code and there are > >sometimes changes made to the MySQL DB as well. You need to use the > >perfparse-db-tool to update your DB with each upgrade. This tool will be > >installed in your '<path_to>/nagios/bin/' directory, run it with the > >'--update' argument to ensure that DB changes are made properly. > > > >Garry W. Cook, CCNA > >Network Infrastructure Manager > >MACTEC, Inc. - http://www.mactec.com/ > >303.308.6228 (Office) - 720.220.1862 (Mobile) > > > > > >------------------------------------------------------- > >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > >_______________________________________________ > >Perfparse-users mailing list > >Per...@li... > >https://lists.sourceforge.net/lists/listinfo/perfparse-users > > > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Perfparse-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-users > |
From: Wilson P. J. <wp....@te...> - 2004-08-26 16:01:35
|
Hi all. I've observed my nagios restart every perfparse.sh run. I use perfparse-0.99.07 [26-08-2004 12:35:00] Nagios 1.2 starting... (PID=12443) [26-08-2004 12:35:00] Caught SIGHUP, restarting... Is this ok? If so, why is needed nagios restarting? I'm trying to figure out why my nagios stops working after few hours and I'd like to know if this "nagios restarting" has some relation to "nagios stopping". When nagios stops its checks, it always has a zombie process. Regards, Wilson |
From: Yves M. <yme...@li...> - 2004-08-26 16:58:54
|
> Hi all. > > I've observed my nagios restart every perfparse.sh run. I use > perfparse-0.99.07 > > [26-08-2004 12:35:00] Nagios 1.2 starting... (PID=3D12443) > [26-08-2004 12:35:00] Caught SIGHUP, restarting... > > Is this ok? If so, why is needed nagios restarting? If you are using --delete* option, yes, perfparse sends some SIGHUP signa= l to nagios to ask for restart and use a new serviceperf.log file. Otherwise, nothing to see with perfparse. > I'm trying to figure out why my nagios stops working after few hours an= d I'd > like to know if this "nagios restarting" has some relation to "nagios > stopping". perfparse does not ask nagios to stop, but only to start writing to a new serviceperf.log file, which also mean restarting, but not stopping. In your log, strange that nagios starts and restarts at the same time. SI= GHUP caught by change at that time ? > When nagios stops its checks, it always has a zombie process. How long do they live ? (just asking for if others can help :) Yves > > Regards, > > Wilson > > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Perfparse-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-users > > --=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: Wilson P. J. <wp....@te...> - 2004-08-26 18:18:36
|
>> Hi all. >> >> I've observed my nagios restart every perfparse.sh run. I use >> perfparse-0.99.07 >> >> [26-08-2004 12:35:00] Nagios 1.2 starting... (PID=12443) >> [26-08-2004 12:35:00] Caught SIGHUP, restarting... >> >> Is this ok? If so, why is needed nagios restarting? > If you are using --delete* option, yes, perfparse sends some SIGHUP signal > to nagios to ask for restart and use a new serviceperf.log file. Otherwise, > nothing to see with perfparse. Yes. I use --delete (default into perfparse.sh). Is there any advantage or disadvantage using this option? The problem I see restarting nagios every 10 minutes (in my case with pp), is that nagios log grows too much, since I get around 700 services and hosts alerts saying "OK". (I monitor 100 hosts and 600 services). >> I'm trying to figure out why my nagios stops working after few hours and >> I'd like to know if this "nagios restarting" has some relation to "nagios >> stopping". > perfparse does not ask nagios to stop, but only to start writing to a new > serviceperf.log file, which also mean restarting, but not stopping. > In your log, strange that nagios starts and restarts at the same time. > SIGHUP caught by change at that time ? Every 10 minutes I get the same situation: [26-08-2004 14:40:11] SERVICE ALERT: bbrdcsrv1;RADIUS;OK;HARD;1; Radius.exe: Running [26-08-2004 14:40:11] SERVICE ALERT: bbrdcsrv1;Drive_C;OK;HARD;1;C::\ - total: 2.93 Gb - used: 1.07 Gb (36%) - free 1.87 Gb (64%) [26-08-2004 14:40:11] HOST ALERT: bbrdcsrv1;UP;HARD;1;(Host assumed to be up) [26-08-2004 14:40:11] SERVICE ALERT: bbr002363sis;HTTP;OK;HARD;1;HTTP OK HTTP/1.1 200 OK - 3970 bytes in 0.316 seconds [26-08-2004 14:40:11] HOST ALERT: bbr002363sis;UP;HARD;1;(Host assumed to be up) [26-08-2004 14:40:01] Nagios 1.2 starting... (PID=12443) [26-08-2004 14:40:01] Caught SIGHUP, restarting... [26-08-2004 14:39:41] SERVICE ALERT: bbrsrdir1;Drive_E;WARNING;SOFT;5;E::\ - total: 19.53 Gb - used: 19.00 Gb (97%) - free 0.53 Gb (3%) [26-08-2004 14:39:41] SERVICE ALERT: spossra;PING;CRITICAL;SOFT;1;PING CRITICAL - Packet loss = 0%, RTA = 20.24 ms [26-08-2004 14:39:31] SERVICE ALERT: rjo1601a;CPU5m-Cisco;WARNING;SOFT;3;SNMP WARNING - *32* As you can see "Caught SIGHUP, restarting..." and "Nagios 1.2 restarting..." at the same time. And then, nagios starts to log the 700 "OK". >> When nagios stops its checks, it always has a zombie process. > How long do they live ? (just asking for if others can help :) nagios runs from 2 to 6 hours, then stops checking: Process Status Information Process Status: WARNING Check Command Output: Nagios problem: located 14 processes, status log updated 260136 seconds ago So, with ps -aux I see a nagios <defunct> process. If I don't killall -9 nagios, the defunct process remain for days and nagios doesn't check anything. I don't know how to trouble this situation. Could anybody help me? > Yves >> >> Regards, >> >> Wilson >> >> > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Perfparse-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-users > > -- - 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/ - ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ Perfparse-users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perfparse-users |
From: Yves M. <yme...@li...> - 2004-08-27 08:09:20
|
> The problem I see restarting nagios every 10 minutes (in my case with p= p), > is that nagios log grows too much, since I get around 700 services and = hosts > alerts saying "OK". (I monitor 100 hosts and 600 services). Garry said that with a lot of hosts and services, you sometimes need to f= lush the logs (and rotate them or compress them or anything...). I agree with him. I'm working on something that will allow to send the data without the nee= d to restart nagios every 10 minutes. But I suggest that you do it every 24h anyways. = It can also fix nagios problems when you compiled the embedded perl interpreter in nagios= , and refresh the state of the services... but this is beyond our subject :) Here is some suggestion before we release the new version with such a fea= ture (not soon): 1/ Use perfparse every 10 minutes without --delete* options. This will se= nd the perf data. 2/ Use perfparse every 24 hours *with* the --delete option. This will emp= ty the perf log (and send the perf data). I'm interested in how many lines you get in such a file in 24h, the size = of the file, and the size when you compress it with gzip -9. I can see what priorities to set on my developments :) Yves (main contributor on perfparse) --=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: Wilson P. J. <wp....@te...> - 2004-08-27 14:15:48
|
> > But I suggest that you do it every 24h anyways. > It can also fix > nagios problems when you compiled the embedded perl interpreter in nagios, > and refresh > the state of the services... but this is beyond our subject :) > > Here is some suggestion before we release the new version with such a > feature (not soon): > 1/ Use perfparse every 10 minutes without --delete* options. This will > send the perf data. > 2/ Use perfparse every 24 hours *with* the --delete option. This will > empty the perf log > (and send the perf data). > > I'm interested in how many lines you get in such a file in 24h, the size > of the file, > and the size when you compress it with gzip -9. > I can see what priorities to set on my developments :) > [Wilson Pires Jr] Yves, as I said in other message, the restarting problem was solved by changing use_retained_program_state from 0 to 1. Even maintaining --delete every 10 minutes. Even though, if you want the information (lines and size), I can change the policy and send the information to you. Let me know if you want it. > |
From: James O. <jo...@re...> - 2004-08-26 17:52:15
|
I'm still having this issue. Does anyone know what the foreign key that it is referring to is? Or how to find out? Here's the latest output: [jochs@mon-01 bin]$ [jochs@mon-01 bin]$ ./perfparse-db-tool --update [jochs@mon-01 bin]$ ./perfparse-db-purge -r "UPDATE perfdata_service_metric SET bin_delete_policy_name = 'Bin Default' WHERE bin_delete_policy_type = 'template' AND bin_delete_policy_name IS NULL" failed: Cannot add or update a child row: a foreign key constraint fails [jochs@mon-01 bin]$ ./perfparse-db-purge --show_config DB_User = "nagios" DB_Name = "nagios" DB_Pass = "n4g10s" DB_Host = "127.0.0.1" 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" [jochs@mon-01 bin]$ -----Original Message----- From: Tim Brazil [mailto:br...@se...] Sent: Wednesday, August 25, 2004 2:43 PM To: James Ochs Cc: per...@li... Subject: Re: [Perfparse-users] re: deletion policys Hi James The only other thing I did was changed to the newer sample version perfparse.cfg. Here are some thoughts... Did you see any "upgrade" output from ./perfparse-db-tool --update when you ran it indicating something actually happened? Is the binary from perfparse-db-tool the new one that was built with 0.99.09. I initially didn't "configure" correctly which "make install"ed perfparse-db-tool to the wrong directory (/usr/local/bin) which left the older version of perfparse-db-tool in place under /usr/local/nagios/bin Tim James Ochs wrote: > Upgrading to 0.99.09 didn't fix this problem for me. Nor did running > perfparse-db-tool --update. > > James > > -----Original Message----- > From: Tim Brazil [mailto:br...@se...] > Sent: Wednesday, August 25, 2004 1:39 PM > Cc: per...@li... > Subject: Re: [Perfparse-users] re: deletion policys > > Thanks Garry > I updated to 0.99.09, ran ./perfparse-db-tool --update and it fixed my > problem. > > Tim > > Cook, Garry wrote: > > >per...@li... wrote: > > > > > >>I have been watching this post becasue I too am experiencing this > >>problem. It's been about 1 month since I've started collection > >>performance statistics and I'd like to do some cleanup. I > >>cannot create > >>deletion policies due to the "Cannot add or update a child row: a > >>foreign key constraint fails" error. > >>Any ideas on how to rectify this. I also ran the ./perfparse-db-tool > >>--update to see whether it would correct the problem. It > >>didn't change > >>anything. I have Version 0.99.05. Schema Version 0.12 > >> > >>Thanks in advance > >>Tim > >> > >> > > > >I believe that this bug was fixed in Version 0.99.08, but it might have > >been 0.99.09. Either way, you should definitely be using the latest > >stable version -> 0.99.09. > >I thought that I saw someone else post about this issue and say that the > >version upgrade did not fix it for them. However, they did not mention > >if they ran 'perfparse-db-tool --update' after upgrading PerfParse. > > > >Everyone needs to realize something very important: > >With new versions, there are changes to the PerfParse code and there are > >sometimes changes made to the MySQL DB as well. You need to use the > >perfparse-db-tool to update your DB with each upgrade. This tool will be > >installed in your '<path_to>/nagios/bin/' directory, run it with the > >'--update' argument to ensure that DB changes are made properly. > > > >Garry W. Cook, CCNA > >Network Infrastructure Manager > >MACTEC, Inc. - http://www.mactec.com/ > >303.308.6228 (Office) - 720.220.1862 (Mobile) > > > > > >------------------------------------------------------- > >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > >_______________________________________________ > >Perfparse-users mailing list > >Per...@li... > >https://lists.sourceforge.net/lists/listinfo/perfparse-users > > > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Perfparse-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perfparse-users > |
From: Ben C. <Be...@cl...> - 2004-08-27 07:29:41
|
James, I need some information from your MySQL. Can you start the MySQL shell (mysql -u nagios -pnagios -D nagios) and enter: mysql> select * from perfdata_delete_policy; This should produce at least this: +-------------+---------------+ | policy_name | delete_policy | +-------------+---------------+ | Always | 30 | | Bin Default | 30 | +-------------+---------------+ Which will have different values in the second column. Let me know and we can go from there. Ben James Ochs wrote: > I'm still having this issue. Does anyone know what the foreign key that > it is referring to is? Or how to find out? Here's the latest output: > > > > [jochs@mon-01 bin]$ > [jochs@mon-01 bin]$ ./perfparse-db-tool --update > [jochs@mon-01 bin]$ ./perfparse-db-purge -r > "UPDATE perfdata_service_metric SET bin_delete_policy_name = 'Bin > Default' WHERE bin_delete_policy_type = 'template' AND > bin_delete_policy_name IS NULL" failed: > > Cannot add or update a child row: a foreign key constraint fails > [jochs@mon-01 bin]$ ./perfparse-db-purge --show_config > DB_User = "nagios" > DB_Name = "nagios" > DB_Pass = "n4g10s" > DB_Host = "127.0.0.1" > 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" > [jochs@mon-01 bin]$ > > -----Original Message----- > From: Tim Brazil [mailto:br...@se...] > Sent: Wednesday, August 25, 2004 2:43 PM > To: James Ochs > Cc: per...@li... > Subject: Re: [Perfparse-users] re: deletion policys > > Hi James > > The only other thing I did was changed to the newer sample version > perfparse.cfg. > > Here are some thoughts... > Did you see any "upgrade" output from ./perfparse-db-tool --update when > you ran it indicating something actually happened? > Is the binary from perfparse-db-tool the new one that was built with > 0.99.09. > I initially didn't "configure" correctly which "make install"ed > perfparse-db-tool to the wrong directory (/usr/local/bin) which left > the older version of perfparse-db-tool in place under > /usr/local/nagios/bin > > Tim > > James Ochs wrote: > > > Upgrading to 0.99.09 didn't fix this problem for me. Nor did running > > perfparse-db-tool --update. > > > > James > > > > -----Original Message----- > > From: Tim Brazil [mailto:br...@se...] > > Sent: Wednesday, August 25, 2004 1:39 PM > > Cc: per...@li... > > Subject: Re: [Perfparse-users] re: deletion policys > > > > Thanks Garry > > I updated to 0.99.09, ran ./perfparse-db-tool --update and it fixed my > > problem. > > > > Tim > > > > Cook, Garry wrote: > > > > >per...@li... wrote: > > > > > > > > >>I have been watching this post becasue I too am experiencing this > > >>problem. It's been about 1 month since I've started collection > > >>performance statistics and I'd like to do some cleanup. I > > >>cannot create > > >>deletion policies due to the "Cannot add or update a child row: a > > >>foreign key constraint fails" error. > > >>Any ideas on how to rectify this. I also ran the ./perfparse-db-tool > > >>--update to see whether it would correct the problem. It > > >>didn't change > > >>anything. I have Version 0.99.05. Schema Version 0.12 > > >> > > >>Thanks in advance > > >>Tim > > >> > > >> > > > > > >I believe that this bug was fixed in Version 0.99.08, but it might have > > >been 0.99.09. Either way, you should definitely be using the latest > > >stable version -> 0.99.09. > > >I thought that I saw someone else post about this issue and say that > the > > >version upgrade did not fix it for them. However, they did not mention > > >if they ran 'perfparse-db-tool --update' after upgrading PerfParse. > > > > > >Everyone needs to realize something very important: > > >With new versions, there are changes to the PerfParse code and there > are > > >sometimes changes made to the MySQL DB as well. You need to use the > > >perfparse-db-tool to update your DB with each upgrade. This tool > will be > > >installed in your '<path_to>/nagios/bin/' directory, run it with the > > >'--update' argument to ensure that DB changes are made properly. > > > > > >Garry W. Cook, CCNA > > >Network Infrastructure Manager > > >MACTEC, Inc. - http://www.mactec.com/ > > >303.308.6228 (Office) - 720.220.1862 (Mobile) > > > > > > > > >------------------------------------------------------- > > >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > > >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > > >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > > >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > > >_______________________________________________ > > >Perfparse-users mailing list > > >Per...@li... > > >https://lists.sourceforge.net/lists/listinfo/perfparse-users > > > > > > > > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > > _______________________________________________ > > Perfparse-users mailing list > > Per...@li... > > https://lists.sourceforge.net/lists/listinfo/perfparse-users > > > |
From: James O. <jo...@re...> - 2004-08-27 21:08:14
|
The table was empty prior to this: mysql> insert into perfdata_delete_policy ( 'Always' , '90' ) ; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''Always' , '90' )' at line 1 mysql> insert into perfdata_delete_policy values ( 'Always' , '90' ) ; Query OK, 1 row affected (0.12 sec) mysql> insert into perfdata_delete_policy values ( 'Bin Default' , '90' ) ; Query OK, 1 row affected (0.57 sec) mysql> select * from perfdata_delete_policy -> ; +-------------+---------------+ | policy_name | delete_policy | +-------------+---------------+ | Always | 90 | | Bin Default | 90 | +-------------+---------------+ 2 rows in set (0.00 sec) mysql> quit Bye And now I get: [root@mon-01 bin]# ./perfparse-db-tool --reset_host_delete_policy mon-01 "UPDATE perfdata_host SET raw_delete_policy_type = 'template', bin_delete_policy_type = 'template', raw_delete_policy_name = 'Raw Default', bin_delete_policy_name = 'Bin Default' WHERE host_name = 'mon-01'" failed: Cannot add or update a child row: a foreign key constraint fails [root@mon-01 bin]# ./perfparse-db-purge -r "UPDATE perfdata_service SET raw_delete_policy_name = 'Raw Default' WHERE raw_delete_policy_type = 'template' AND raw_delete_policy_name IS NULL" failed: Cannot add or update a child row: a foreign key constraint fails [root@mon-01 bin]# -----Original Message----- From: Ben Clewett [mailto:Be...@cl...] Sent: Friday, August 27, 2004 12:33 AM To: James Ochs; 'per...@li...' Subject: Re: [Perfparse-users] re: deletion policys James, I need some information from your MySQL. Can you start the MySQL shell (mysql -u nagios -pnagios -D nagios) and enter: mysql> select * from perfdata_delete_policy; This should produce at least this: +-------------+---------------+ | policy_name | delete_policy | +-------------+---------------+ | Always | 30 | | Bin Default | 30 | +-------------+---------------+ Which will have different values in the second column. Let me know and we can go from there. Ben James Ochs wrote: > I'm still having this issue. Does anyone know what the foreign key that > it is referring to is? Or how to find out? Here's the latest output: > > > > [jochs@mon-01 bin]$ > [jochs@mon-01 bin]$ ./perfparse-db-tool --update > [jochs@mon-01 bin]$ ./perfparse-db-purge -r > "UPDATE perfdata_service_metric SET bin_delete_policy_name = 'Bin > Default' WHERE bin_delete_policy_type = 'template' AND > bin_delete_policy_name IS NULL" failed: > > Cannot add or update a child row: a foreign key constraint fails > [jochs@mon-01 bin]$ ./perfparse-db-purge --show_config > DB_User = "nagios" > DB_Name = "nagios" > DB_Pass = "n4g10s" > DB_Host = "127.0.0.1" > 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" > [jochs@mon-01 bin]$ > > -----Original Message----- > From: Tim Brazil [mailto:br...@se...] > Sent: Wednesday, August 25, 2004 2:43 PM > To: James Ochs > Cc: per...@li... > Subject: Re: [Perfparse-users] re: deletion policys > > Hi James > > The only other thing I did was changed to the newer sample version > perfparse.cfg. > > Here are some thoughts... > Did you see any "upgrade" output from ./perfparse-db-tool --update when > you ran it indicating something actually happened? > Is the binary from perfparse-db-tool the new one that was built with > 0.99.09. > I initially didn't "configure" correctly which "make install"ed > perfparse-db-tool to the wrong directory (/usr/local/bin) which left > the older version of perfparse-db-tool in place under > /usr/local/nagios/bin > > Tim > > James Ochs wrote: > > > Upgrading to 0.99.09 didn't fix this problem for me. Nor did running > > perfparse-db-tool --update. > > > > James > > > > -----Original Message----- > > From: Tim Brazil [mailto:br...@se...] > > Sent: Wednesday, August 25, 2004 1:39 PM > > Cc: per...@li... > > Subject: Re: [Perfparse-users] re: deletion policys > > > > Thanks Garry > > I updated to 0.99.09, ran ./perfparse-db-tool --update and it fixed my > > problem. > > > > Tim > > > > Cook, Garry wrote: > > > > >per...@li... wrote: > > > > > > > > >>I have been watching this post becasue I too am experiencing this > > >>problem. It's been about 1 month since I've started collection > > >>performance statistics and I'd like to do some cleanup. I > > >>cannot create > > >>deletion policies due to the "Cannot add or update a child row: a > > >>foreign key constraint fails" error. > > >>Any ideas on how to rectify this. I also ran the ./perfparse-db-tool > > >>--update to see whether it would correct the problem. It > > >>didn't change > > >>anything. I have Version 0.99.05. Schema Version 0.12 > > >> > > >>Thanks in advance > > >>Tim > > >> > > >> > > > > > >I believe that this bug was fixed in Version 0.99.08, but it might have > > >been 0.99.09. Either way, you should definitely be using the latest > > >stable version -> 0.99.09. > > >I thought that I saw someone else post about this issue and say that > the > > >version upgrade did not fix it for them. However, they did not mention > > >if they ran 'perfparse-db-tool --update' after upgrading PerfParse. > > > > > >Everyone needs to realize something very important: > > >With new versions, there are changes to the PerfParse code and there > are > > >sometimes changes made to the MySQL DB as well. You need to use the > > >perfparse-db-tool to update your DB with each upgrade. This tool > will be > > >installed in your '<path_to>/nagios/bin/' directory, run it with the > > >'--update' argument to ensure that DB changes are made properly. > > > > > >Garry W. Cook, CCNA > > >Network Infrastructure Manager > > >MACTEC, Inc. - http://www.mactec.com/ > > >303.308.6228 (Office) - 720.220.1862 (Mobile) > > > > > > > > >------------------------------------------------------- > > >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > > >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > > >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > > >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > > >_______________________________________________ > > >Perfparse-users mailing list > > >Per...@li... > > >https://lists.sourceforge.net/lists/listinfo/perfparse-users > > > > > > > > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > > _______________________________________________ > > Perfparse-users mailing list > > Per...@li... > > https://lists.sourceforge.net/lists/listinfo/perfparse-users > > > |
From: Ben C. <be...@cl...> - 2004-08-30 08:40:26
|
James, I am glad you are making progress. Odd, these tables should be automatically created when you use the CGI deletion policy editor. Can you tell me what version you are using and whether you have used the CGI deletion policy tools? Secondly, it looks like I forgot to give you one, please enter: mysql> insert into perfdata_delete_policy values ( 'Raw Default' , '90' ) ; See if that finally fixes things! Ben James Ochs wrote: > The table was empty prior to this: > > mysql> insert into perfdata_delete_policy ( 'Always' , '90' ) ; > ERROR 1064: You have an error in your SQL syntax. Check the manual that > corresponds to your MySQL server version for the right syntax to use > near ''Always' , '90' )' at line 1 > > mysql> insert into perfdata_delete_policy values ( 'Always' , '90' ) ; > Query OK, 1 row affected (0.12 sec) > > mysql> insert into perfdata_delete_policy values ( 'Bin Default' , '90' ) ; > Query OK, 1 row affected (0.57 sec) > > mysql> select * from perfdata_delete_policy > -> ; > +-------------+---------------+ > | policy_name | delete_policy | > +-------------+---------------+ > | Always | 90 | > | Bin Default | 90 | > +-------------+---------------+ > 2 rows in set (0.00 sec) > > mysql> quit > Bye > > And now I get: > > [root@mon-01 bin]# ./perfparse-db-tool --reset_host_delete_policy mon-01 > "UPDATE perfdata_host SET raw_delete_policy_type = 'template', > bin_delete_policy_type = 'template', raw_delete_policy_name = 'Raw > Default', bin_delete_policy_name = 'Bin Default' WHERE host_name = > 'mon-01'" failed: > > Cannot add or update a child row: a foreign key constraint fails > [root@mon-01 bin]# ./perfparse-db-purge -r > "UPDATE perfdata_service SET raw_delete_policy_name = 'Raw Default' > WHERE raw_delete_policy_type = 'template' AND raw_delete_policy_name IS > NULL" failed: > > Cannot add or update a child row: a foreign key constraint fails > [root@mon-01 bin]# > > -----Original Message----- > From: Ben Clewett [mailto:Be...@cl...] > Sent: Friday, August 27, 2004 12:33 AM > To: James Ochs; 'per...@li...' > Subject: Re: [Perfparse-users] re: deletion policys > > James, > > I need some information from your MySQL. Can you start the MySQL shell > (mysql -u nagios -pnagios -D nagios) and enter: > > mysql> select * from perfdata_delete_policy; > > This should produce at least this: > > +-------------+---------------+ > | policy_name | delete_policy | > +-------------+---------------+ > | Always | 30 | > | Bin Default | 30 | > +-------------+---------------+ > > Which will have different values in the second column. > > Let me know and we can go from there. > > Ben > > > > James Ochs wrote: > > > I'm still having this issue. Does anyone know what the foreign key that > > it is referring to is? Or how to find out? Here's the latest output: > > > > > > > > [jochs@mon-01 bin]$ > > [jochs@mon-01 bin]$ ./perfparse-db-tool --update > > [jochs@mon-01 bin]$ ./perfparse-db-purge -r > > "UPDATE perfdata_service_metric SET bin_delete_policy_name = 'Bin > > Default' WHERE bin_delete_policy_type = 'template' AND > > bin_delete_policy_name IS NULL" failed: > > > > Cannot add or update a child row: a foreign key constraint fails > > [jochs@mon-01 bin]$ ./perfparse-db-purge --show_config > > DB_User = "nagios" > > DB_Name = "nagios" > > DB_Pass = "n4g10s" > > DB_Host = "127.0.0.1" > > 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" > > [jochs@mon-01 bin]$ > > > > -----Original Message----- > > From: Tim Brazil [mailto:br...@se...] > > Sent: Wednesday, August 25, 2004 2:43 PM > > To: James Ochs > > Cc: per...@li... > > Subject: Re: [Perfparse-users] re: deletion policys > > > > Hi James > > > > The only other thing I did was changed to the newer sample version > > perfparse.cfg. > > > > Here are some thoughts... > > Did you see any "upgrade" output from ./perfparse-db-tool --update when > > you ran it indicating something actually happened? > > Is the binary from perfparse-db-tool the new one that was built with > > 0.99.09. > > I initially didn't "configure" correctly which "make install"ed > > perfparse-db-tool to the wrong directory (/usr/local/bin) which left > > the older version of perfparse-db-tool in place under > > /usr/local/nagios/bin > > > > Tim > > > > James Ochs wrote: > > > > > Upgrading to 0.99.09 didn't fix this problem for me. Nor did running > > > perfparse-db-tool --update. > > > > > > James > > > > > > -----Original Message----- > > > From: Tim Brazil [mailto:br...@se...] > > > Sent: Wednesday, August 25, 2004 1:39 PM > > > Cc: per...@li... > > > Subject: Re: [Perfparse-users] re: deletion policys > > > > > > Thanks Garry > > > I updated to 0.99.09, ran ./perfparse-db-tool --update and it > fixed my > > > problem. > > > > > > Tim > > > > > > Cook, Garry wrote: > > > > > > >per...@li... wrote: > > > > > > > > > > > >>I have been watching this post becasue I too am experiencing this > > > >>problem. It's been about 1 month since I've started collection > > > >>performance statistics and I'd like to do some cleanup. I > > > >>cannot create > > > >>deletion policies due to the "Cannot add or update a child row: a > > > >>foreign key constraint fails" error. > > > >>Any ideas on how to rectify this. I also ran the > ./perfparse-db-tool > > > >>--update to see whether it would correct the problem. It > > > >>didn't change > > > >>anything. I have Version 0.99.05. Schema Version 0.12 > > > >> > > > >>Thanks in advance > > > >>Tim > > > >> > > > >> > > > > > > > >I believe that this bug was fixed in Version 0.99.08, but it > might have > > > >been 0.99.09. Either way, you should definitely be using the latest > > > >stable version -> 0.99.09. > > > >I thought that I saw someone else post about this issue and say that > > the > > > >version upgrade did not fix it for them. However, they did not > mention > > > >if they ran 'perfparse-db-tool --update' after upgrading PerfParse. > > > > > > > >Everyone needs to realize something very important: > > > >With new versions, there are changes to the PerfParse code and there > > are > > > >sometimes changes made to the MySQL DB as well. You need to use the > > > >perfparse-db-tool to update your DB with each upgrade. This tool > > will be > > > >installed in your '<path_to>/nagios/bin/' directory, run it with the > > > >'--update' argument to ensure that DB changes are made properly. > > > > > > > >Garry W. Cook, CCNA > > > >Network Infrastructure Manager > > > >MACTEC, Inc. - http://www.mactec.com/ > > > >303.308.6228 (Office) - 720.220.1862 (Mobile) > > > > > > > > > > > >------------------------------------------------------- > > > >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank > Media > > > >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > > > >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > > > >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > > > >_______________________________________________ > > > >Perfparse-users mailing list > > > >Per...@li... > > > >https://lists.sourceforge.net/lists/listinfo/perfparse-users > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank > Media > > > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > > > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > > > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > > > _______________________________________________ > > > Perfparse-users mailing list > > > Per...@li... > > > https://lists.sourceforge.net/lists/listinfo/perfparse-users > > > > > > |
From: Tim B. <br...@se...> - 2004-08-25 20:39:18
|
Thanks Garry I updated to 0.99.09, ran ./perfparse-db-tool --update and it fixed my problem. Tim Cook, Garry wrote: >per...@li... wrote: > > >>I have been watching this post becasue I too am experiencing this >>problem. It's been about 1 month since I've started collection >>performance statistics and I'd like to do some cleanup. I >>cannot create >>deletion policies due to the "Cannot add or update a child row: a >>foreign key constraint fails" error. >>Any ideas on how to rectify this. I also ran the ./perfparse-db-tool >>--update to see whether it would correct the problem. It >>didn't change >>anything. I have Version 0.99.05. Schema Version 0.12 >> >>Thanks in advance >>Tim >> >> > >I believe that this bug was fixed in Version 0.99.08, but it might have >been 0.99.09. Either way, you should definitely be using the latest >stable version -> 0.99.09. >I thought that I saw someone else post about this issue and say that the >version upgrade did not fix it for them. However, they did not mention >if they ran 'perfparse-db-tool --update' after upgrading PerfParse. > >Everyone needs to realize something very important: >With new versions, there are changes to the PerfParse code and there are >sometimes changes made to the MySQL DB as well. You need to use the >perfparse-db-tool to update your DB with each upgrade. This tool will be >installed in your '<path_to>/nagios/bin/' directory, run it with the >'--update' argument to ensure that DB changes are made properly. > >Garry W. Cook, CCNA >Network Infrastructure Manager >MACTEC, Inc. - http://www.mactec.com/ >303.308.6228 (Office) - 720.220.1862 (Mobile) > > >------------------------------------------------------- >SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media >100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 >Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. >http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 >_______________________________________________ >Perfparse-users mailing list >Per...@li... >https://lists.sourceforge.net/lists/listinfo/perfparse-users > > |