mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
parent
7cb68fba76
commit
d94ba0939c
2 changed files with 4 additions and 4 deletions
|
|
@ -79,7 +79,7 @@ func StartHistoryWorkers(super *supervisor.Supervisor) {
|
|||
func notificationHistoryWorker(super *supervisor.Supervisor) {
|
||||
statements := []string{
|
||||
`REPLACE INTO notification_history (id, environment_id, endpoint_id, object_type, host_id, service_id, notification_id, type,` +
|
||||
"event_time, state, previous_hard_state, author, `text`, users_notified)" +
|
||||
"send_time, state, previous_hard_state, author, `text`, users_notified)" +
|
||||
`VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)`,
|
||||
`REPLACE INTO history (id, environment_id, endpoint_id, object_type, host_id, service_id, notification_history_id,` +
|
||||
`state_history_id, downtime_history_id, comment_history_id, flapping_history_id, event_type, event_time)` +
|
||||
|
|
@ -98,7 +98,7 @@ func notificationHistoryWorker(super *supervisor.Supervisor) {
|
|||
utils.DecodeHexIfNotNil(values["service_id"]),
|
||||
utils.EncodeChecksum(values["notification_id"].(string)),
|
||||
utils.NotificationTypesToDbEnumString[values["type"].(string)],
|
||||
values["event_time"],
|
||||
values["send_time"],
|
||||
values["state"],
|
||||
values["previous_hard_state"],
|
||||
values["author"],
|
||||
|
|
@ -124,7 +124,7 @@ func notificationHistoryWorker(super *supervisor.Supervisor) {
|
|||
emptyID,
|
||||
emptyUUID[:],
|
||||
values["event_type"],
|
||||
values["event_time"],
|
||||
values["send_time"],
|
||||
}
|
||||
|
||||
return data
|
||||
|
|
|
|||
|
|
@ -800,7 +800,7 @@ CREATE TABLE notification_history (
|
|||
notification_id binary(20) NOT NULL COMMENT 'notification.id',
|
||||
|
||||
type enum('downtime_start', 'downtime_end', 'downtime_removed', 'custom', 'acknowledgement', 'problem', 'recovery', 'flapping_start', 'flapping_end') NOT NULL,
|
||||
event_time bigint(20) unsigned NOT NULL,
|
||||
send_time bigint(20) unsigned NOT NULL,
|
||||
state tinyint(1) unsigned NOT NULL,
|
||||
previous_hard_state tinyint(1) unsigned NOT NULL,
|
||||
author text NOT NULL,
|
||||
|
|
|
|||
Loading…
Reference in a new issue