Update of /cvsroot/nagios-db/nagios-db/neb/mysql
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7363
Modified Files:
inserter.c
Log Message:
Remove host cleanup, we'll keep archives for any deleted hosts, will provide ui for users to clean this up later. Remove current_notification, not useful.
Index: inserter.c
===================================================================
RCS file: /cvsroot/nagios-db/nagios-db/neb/mysql/inserter.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** inserter.c 27 Jan 2005 06:07:30 -0000 1.6
--- inserter.c 29 Jan 2005 03:13:01 -0000 1.7
***************
*** 238,248 ****
write_to_logs_and_console(log,NSLOG_INFO_MESSAGE,TRUE);
- /* purge any dead entries, they should have been configured = true by now */
- asprintf(&tmp,
- "delete from host where configured = false");
- // err handling
- buffer(&query_buf, tmp, ++query_buf_count);
- free(tmp);
-
/* .... and insert new config info. Start with hostgroups. */
for(groupcount=0, hg = hostgroup_list; hg ; hg = hg->next)
--- 238,241 ----
***************
*** 478,486 ****
"no_more_notifications,"
"check_type,"
! "performance_data,"
! "current_notification_number"
") VALUES ");
}
! asprintf(&tmp, "((SELECT id from host where name=%s), %s,%f,%f,%d,%d,%d,%d,%d,%s,%d,%s,%d),",
NULL_STRING(safeName),
NULL_STRING(safeHostCheckCommand),
--- 471,478 ----
"no_more_notifications,"
"check_type,"
! "performance_data"
") VALUES ");
}
! asprintf(&tmp, "((SELECT id from host where name=%s), %s,%f,%f,%d,%d,%d,%d,%d,%s,%d,%s),",
NULL_STRING(safeName),
NULL_STRING(safeHostCheckCommand),
***************
*** 494,499 ****
BOOLIFY_STRING(tmp_host->no_more_notifications),
tmp_host->check_type,
! NULL_STRING(safePerfData),
! tmp_host->current_notification_number);
if (append(&bulk_buf[BULK_HOST_CHECK], tmp, FALSE))
err_out(ERR_QUERY_BUILD);
--- 486,490 ----
BOOLIFY_STRING(tmp_host->no_more_notifications),
tmp_host->check_type,
! NULL_STRING(safePerfData));
if (append(&bulk_buf[BULK_HOST_CHECK], tmp, FALSE))
err_out(ERR_QUERY_BUILD);
***************
*** 515,523 ****
"no_more_notifications,"
"check_type,"
! "performance_data,"
! "current_notification_number"
") VALUES ");
}
! asprintf(&tmp, "((SELECT id from host where name=%s), '',0,0,0,0,0,0,0,TRUE,0,NULL,0),",
NULL_STRING(safeName));
if (append(&bulk_buf[BULK_HOST_CHECK], tmp, FALSE))
--- 506,513 ----
"no_more_notifications,"
"check_type,"
! "performance_data"
") VALUES ");
}
! asprintf(&tmp, "((SELECT id from host where name=%s), '',0,0,0,0,0,0,0,TRUE,0,NULL),",
NULL_STRING(safeName));
if (append(&bulk_buf[BULK_HOST_CHECK], tmp, FALSE))
***************
*** 677,686 ****
"no_more_notifications,"
"check_type,"
! "performance_data,"
! "current_notification_number"
") VALUES ");
}
asprintf(&tmp, "((SELECT id from service where service_description=%s and hostid=(SELECT id from host where name=%s)),"
! "%s,%f,%f,%d,%d,%d,%d,%d,%s,%d,%s,%d"
"),",
NULL_STRING(safeServiceDescription),
--- 667,675 ----
"no_more_notifications,"
"check_type,"
! "performance_data"
") VALUES ");
}
asprintf(&tmp, "((SELECT id from service where service_description=%s and hostid=(SELECT id from host where name=%s)),"
! "%s,%f,%f,%d,%d,%d,%d,%d,%s,%d,%s"
"),",
NULL_STRING(safeServiceDescription),
***************
*** 696,701 ****
BOOLIFY_STRING(tmp_service->no_more_notifications),
tmp_service->check_type,
! NULL_STRING(safePerfData),
! tmp_service->current_notification_number);
if (append(&bulk_buf[BULK_SERVICE_CHECK], tmp, FALSE))
err_out(ERR_QUERY_BUILD);
--- 685,689 ----
BOOLIFY_STRING(tmp_service->no_more_notifications),
tmp_service->check_type,
! NULL_STRING(safePerfData));
if (append(&bulk_buf[BULK_SERVICE_CHECK], tmp, FALSE))
err_out(ERR_QUERY_BUILD);
***************
*** 924,929 ****
"no_more_notifications=VALUES(no_more_notifications),"
"check_type=VALUES(check_type),"
! "performance_data=VALUES(performance_data),"
! "current_notification_number=VALUES(current_notification_number)",
TRUE))
err_out(ERR_QUERY_BUILD);
--- 912,916 ----
"no_more_notifications=VALUES(no_more_notifications),"
"check_type=VALUES(check_type),"
! "performance_data=VALUES(performance_data)",
TRUE))
err_out(ERR_QUERY_BUILD);
***************
*** 960,965 ****
"no_more_notifications=VALUES(no_more_notifications),"
"check_type=VALUES(check_type),"
! "performance_data=VALUES(performance_data),"
! "current_notification_number=VALUES(current_notification_number)",
TRUE))
err_out(ERR_QUERY_BUILD);
--- 947,951 ----
"no_more_notifications=VALUES(no_more_notifications),"
"check_type=VALUES(check_type),"
! "performance_data=VALUES(performance_data)",
TRUE))
err_out(ERR_QUERY_BUILD);
|