mirror of https://github.com/Icinga/icinga2.git
db_ido: Add object_id for logentries.
see https://dev.icinga.org/issues/4754 for the extension.
This commit is contained in:
parent
bfa8cf789b
commit
732f07a83f
|
@ -819,6 +819,7 @@ CREATE TABLE IF NOT EXISTS icinga_logentries (
|
|||
logentry_data TEXT character set latin1 default '',
|
||||
realtime_data smallint default 0,
|
||||
inferred_data_extracted smallint default 0,
|
||||
object_id bigint unsigned default NULL,
|
||||
PRIMARY KEY (logentry_id)
|
||||
) ENGINE=InnoDB COMMENT='Historical record of log entries';
|
||||
|
||||
|
|
|
@ -1256,7 +1256,7 @@ void ServiceDbObject::AddLogHistory(const Service::Ptr& service, String buffer,
|
|||
fields1->Set("logentry_time", DbValue::FromTimestamp(entry_time));
|
||||
fields1->Set("entry_time", DbValue::FromTimestamp(entry_time));
|
||||
fields1->Set("entry_time_usec", entry_time_usec);
|
||||
//fields1->Set("object_id", service); // not supported in 1.x see #4754
|
||||
fields1->Set("object_id", service); // added in 1.10 see #4754
|
||||
fields1->Set("logentry_type", type);
|
||||
fields1->Set("logentry_data", buffer);
|
||||
|
||||
|
@ -1265,13 +1265,11 @@ void ServiceDbObject::AddLogHistory(const Service::Ptr& service, String buffer,
|
|||
query1.Fields = fields1;
|
||||
OnQuery(query1);
|
||||
|
||||
/*
|
||||
if (host->GetCheckService() == service) {
|
||||
//fields1->Set("object_id", host); // not supported in 1.x see #4754
|
||||
fields1->Set("object_id", host); // added in 1.10 see #4754
|
||||
query1.Fields = fields1;
|
||||
OnQuery(query1);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/* flappinghistory */
|
||||
|
@ -1466,4 +1464,4 @@ void ServiceDbObject::AddExternalCommandHistory(double time, const String& comma
|
|||
|
||||
query1.Fields = fields1;
|
||||
OnQuery(query1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue