[icinga-checkins] icinga.org: icinga-core/rbartels/1.3: idoutils: do not clear host|service status tables on core restart/reload ( inspired by Opsview) #1106

git at icinga.org git at icinga.org
Sat Jan 29 02:14:44 CET 2011


Module: icinga-core
Branch: rbartels/1.3
Commit: d8be7c8476dd93694578a662cdd5ed96e16be5ef
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=d8be7c8476dd93694578a662cdd5ed96e16be5ef

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Wed Jan 19 14:57:15 2011 +0100

idoutils: do not clear host|service status tables on core restart/reload (inspired by Opsview) #1106

fixes #1106

---

 Changelog                        |    1 +
 module/idoutils/src/dbhandlers.c |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Changelog b/Changelog
index 8953727..38389c7 100644
--- a/Changelog
+++ b/Changelog
@@ -34,6 +34,7 @@ ENHANCEMENTS
 * idoutils: add cfg option to enable/disable oci errors to syslog through error handler #1060
 * idoutils: add dbversion upgrade scripts for 1.3 #633
 * idoutils: add dbversion check in ido2db and print error to syslog in case of non-matching #633
+* idoutils: do not clear host|service status tables on core restart/reload (inspired by Opsview) #1106
 
 * contrib: bring daemonchk.cgi building into shape (Elan Ruusamäe) #1051
 
diff --git a/module/idoutils/src/dbhandlers.c b/module/idoutils/src/dbhandlers.c
index 35608af..106032e 100644
--- a/module/idoutils/src/dbhandlers.c
+++ b/module/idoutils/src/dbhandlers.c
@@ -1323,9 +1323,11 @@ int ido2db_handle_processdata(ido2db_idi *idi) {
 		if(ido2db_db_settings.clean_realtime_tables_on_core_startup==IDO_TRUE){ /* only if desired */
 
 			/* clear realtime data */
+			/* don't clear necessary status tables on restart/reload of the core, as Icinga Web
+			   won't show any data then */
 			ido2db_db_clear_table(idi, ido2db_db_tablenames[IDO2DB_DBTABLE_PROGRAMSTATUS]);
-			ido2db_db_clear_table(idi, ido2db_db_tablenames[IDO2DB_DBTABLE_HOSTSTATUS]);
-			ido2db_db_clear_table(idi, ido2db_db_tablenames[IDO2DB_DBTABLE_SERVICESTATUS]);
+			/* ido2db_db_clear_table(idi, ido2db_db_tablenames[IDO2DB_DBTABLE_HOSTSTATUS]); */
+			/* ido2db_db_clear_table(idi, ido2db_db_tablenames[IDO2DB_DBTABLE_SERVICESTATUS]); */
 			ido2db_db_clear_table(idi, ido2db_db_tablenames[IDO2DB_DBTABLE_CONTACTSTATUS]);
 			ido2db_db_clear_table(idi, ido2db_db_tablenames[IDO2DB_DBTABLE_TIMEDEVENTQUEUE]);
 			ido2db_db_clear_table(idi, ido2db_db_tablenames[IDO2DB_DBTABLE_COMMENTS]);





More information about the icinga-checkins mailing list