Re: [Nagios-devel] [PATCH] ndoutils 1.4b7: missing table clearout

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] [PATCH] ndoutils 1.4b7: missing table clearout

Post by Guest »


--Apple-Mail-67-93972091
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bit


On 22 Apr 2009, at 10:17, Duncan Ferguson wrote:
>
> I will look through the tables to see if I can see any others
> affected in the same way as the contactgroups table, though, and
> include those in a new patch.

Updated patch attached - extra runtime tables for clear out are:

NDO2DB_DBTABLE_SERVICECONTACTGROUPS
NDO2DB_DBTABLE_HOSTCONTACTGROUPS
NDO2DB_DBTABLE_HOSTESCALATIONCONTACTGROUPS
NDO2DB_DBTABLE_SERVICEESCALATIONCONTACTGROUPS


--Apple-Mail-67-93972091
Content-Disposition: attachment;
filename=ndoutils_truncate_tables.patch
Content-Type: application/octet-stream; x-unix-mode=0644;
name="ndoutils_truncate_tables.patch"
Content-Transfer-Encoding: 7bit

diff -ur ndoutils-1.4b7.orig/src/dbhandlers.c ndoutils-1.4b7/src/dbhandlers.c
--- ndoutils-1.4b7.orig/src/dbhandlers.c 2009-04-21 14:04:07.000000000 +0000
+++ ndoutils-1.4b7/src/dbhandlers.c 2009-04-22 09:44:48.000000000 +0000
@@ -686,6 +686,10 @@
ndo2db_db_clear_table(idi,ndo2db_db_tablenames[NDO2DB_DBTABLE_HOSTCONTACTS]);
ndo2db_db_clear_table(idi,ndo2db_db_tablenames[NDO2DB_DBTABLE_SERVICES]);
ndo2db_db_clear_table(idi,ndo2db_db_tablenames[NDO2DB_DBTABLE_SERVICECONTACTS]);
+ ndo2db_db_clear_table(idi,ndo2db_db_tablenames[NDO2DB_DBTABLE_SERVICECONTACTGROUPS]);
+ ndo2db_db_clear_table(idi,ndo2db_db_tablenames[NDO2DB_DBTABLE_HOSTCONTACTGROUPS]);
+ ndo2db_db_clear_table(idi,ndo2db_db_tablenames[NDO2DB_DBTABLE_HOSTESCALATIONCONTACTGROUPS]);
+ ndo2db_db_clear_table(idi,ndo2db_db_tablenames[NDO2DB_DBTABLE_SERVICEESCALATIONCONTACTGROUPS]);

/* flag all objects as being inactive */
ndo2db_set_all_objects_as_inactive(idi);

--Apple-Mail-67-93972091
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
Content-Transfer-Encoding: 7bit



Duncs

--
Duncan Ferguson
Senior Developer


--Apple-Mail-67-93972091
Content-Disposition: inline;
filename=image001.gif
Content-Type: image/gif;
x-unix-mode=0666;
name="image001.gif"
Content-Transfer-Encoding: base64

R0lGODlhZAAhALMAAAAAAP///2gziYxlpbadxtXH3kAEauni7kujB4PATdfrxejz3rbalfT28vr6
+v///yH5BAEAAA8ALAAAAABkACEAAAT/MMhJq7046827/2AojuNBDChKHGTrvpQjGHRtCAML73y2
MI0AAUcoDma0gqPH7C0QiESgsawMaYSm9vWMVi+OAXZLHjESii9GLNBdDoWCGwyfWxoLhWLRyfNj
egpBGgdqGw0zAxIFOBJXNQIEhgEHSDcFFgsJUJwJDBYMCIKbUIOanFBoAZpSE4htHwQ3QQWzYjdH
SLATlbhIkhOhqQmkUYMSm2dRnkvCy8UMCl4SDrW7HQ1JAdaJSksNV7sOsoqOkcGpgt/CCcfQDfAB
7OoS7FET4zcgYQZZtTQDJiG6UWXGHCoSunzKtKlVAFILJUhDEJHCqWkSxJT7oHEbwAy9/7IEEKPk
QsNJEqH8IXXsIUYLE9tN6Aii4z9MGPgFFHLJggMoCjQkQ3ZvQpegGU7ONLCxAz9/+jRYG/SrZUxi
WLMSKzoUnUMM0r7KEgBiINSmbwwuvSHSwURUcFG1SvYlVAKUE8J+OaDNwz8W1jbwNTCnwK1yYRco
Xsx48SC6Xjc8kUmNZgea1vAuIlhh3AxJEzVbgJySMtiXPPt1kGUA500Nlq1EBaoh2oSuCWknLUrh
Fs4M/zb+I4vh9YVsApqhpjBxJcUKSi/ENMSvH8p8TCn8YzqJUfZFhaM2SCUdCoMquCWMXx7grWlq
DW5FKgAPzqMBLa2xIUDFgQkayW0mAJp91XyWVzr9/ZCKO89VEBMQDjigIEXsBeCZDZawZUFgt9xg
yU4SHCAfEmh1kYpcLaVnlFyo6AEFIScIoMsAK1wQGCW54PIbPkPMEAlKygyDFD4KqIJBkFGct4on
HDjQwAEH9IfXja6IRo2VV+KFJTVckkFlGWD28GWYZLowZplohnBmmmxysGabcNoYVZx0YvCkHXXm
2aWeL0QAADs=

--Apple-Mail-67-93972091
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bit




Opsera Limited | Unit 69 Suttons Business Park
Reading | Berkshire | RG6 1AZ | UK

Phone: +44 (0) 845 057 7887
Mobile: +44 (0) 7968 148 748
Skype: duncan_j_ferguson Email: [email protected]
www.opsera.com

Opsera Limited is registered in the UK under Company Number 5396532.
Our registered office is Gorse View, Horsell Rise, Woking, Surrey,
GU21 4RB.


--Apple-Mail-67-93972091--





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked