-
Notifications
You must be signed in to change notification settings - Fork 8
/
nex_notification.sql
26 lines (26 loc) · 1.66 KB
/
nex_notification.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CREATE TABLE `nex_notification` (
`idx` int(11) NOT NULL AUTO_INCREMENT,
`severity` enum('Critical','Warning') CHARACTER SET utf8 NOT NULL DEFAULT 'Critical' COMMENT 'Notification serverity (Critical, Warning)',
`target_system` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT 'Notification target system ( ''Host'',''Agent'',''Task'',''Framework'',''Docker'' )',
`target_ip` varchar(32) CHARACTER SET utf8 DEFAULT NULL COMMENT 'Notification target IP',
`target` varchar(124) CHARACTER SET utf8 DEFAULT NULL COMMENT 'Notification target( CPU, Memory, Disk, Netowrk, System Error..... )',
`metric` varchar(512) CHARACTER SET utf8 DEFAULT NULL COMMENT 'Notification Metric',
`condition` varchar(512) CHARACTER SET utf8 DEFAULT NULL COMMENT 'Condition',
`id` varchar(512) CHARACTER SET utf8 DEFAULT NULL COMMENT 'Service/Task/Node/Framework/Service ID or IP',
`status` enum('S','F') CHARACTER SET utf8 DEFAULT 'S' COMMENT 'Notification status (''S'':started, ''F'':finished)',
`start_time` timestamp NULL DEFAULT NULL COMMENT 'Notification start time',
`finish_time` timestamp NULL DEFAULT NULL COMMENT 'NOtification finish time',
`contents` text CHARACTER SET utf8 NOT NULL COMMENT 'notification contents',
`memo` text CHARACTER SET utf8,
`check_yn` char(1) CHARACTER SET utf8 NOT NULL DEFAULT 'N',
`regdt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`idx`),
INDEX `severity` (`severity`),
INDEX `target_system` (`target_system`),
INDEX `target_ip` (`target_ip`),
INDEX `id` (`id`),
INDEX `status` (`status`),
INDEX `start_time` (`start_time`),
INDEX `finish_time` (`finish_time`),
INDEX `regdt` (`regdt`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;