1 DROP TABLE IF EXISTS test_nested_downtimes;
2 CREATE TABLE test_nested_downtimes (
3 timestamp int(11) NOT NULL DEFAULT '0',
4 event_type int(11) NOT NULL DEFAULT '0',
5 flags int(11) DEFAULT NULL,
6 attrib int(11) DEFAULT NULL,
7 host_name varchar(160) CHARACTER SET latin1 COLLATE latin1_general_cs DEFAULT '',
8 service_description varchar(160) CHARACTER SET latin1 COLLATE latin1_general_cs DEFAULT '',
9 state int(2) NOT NULL DEFAULT '0',
10 hard int(2) NOT NULL DEFAULT '0',
11 retry int(5) NOT NULL DEFAULT '0',
12 downtime_depth int(11) DEFAULT NULL,
13 output text CHARACTER SET latin1 COLLATE latin1_general_cs
14 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
16 INSERT INTO test_nested_downtimes VALUES
17 (1202684400,100,NULL,NULL,'','',0,0,0,NULL,NULL),
18 (1202684400,801,NULL,NULL,'down_dtstart_dtstart_dtend_dtend','',1,1,3,NULL,'Host is DOWN'),
19 (1202684400,801,NULL,NULL,'up_down_dtstart_dtend_up','',0,1,1,NULL,'OK - yadayada'),
20 (1202684400,801,NULL,NULL,'down_dtstart_up_dtend','',1,1,1,NULL,'BAD - yadayada'),
21 (1202684400,801,NULL,NULL,'up_dtstart_down_dtend','',0,1,1,NULL,'OK - yadayada'),
22 (1202684400,801,NULL,NULL,'up_dtstart_down_up_down_dtend','',0,1,1,NULL,'OK - yadayada'),
23 (1202688000,801,NULL,NULL,'up_down_dtstart_dtend_up','',1,0,1,NULL,'192.168.1.18 is DOWN'),
24 (1202688000,1103,NULL,NULL,'down_dtstart_dtstart_dtend_dtend','',0,0,0,1,NULL),
25 (1202688000,1103,NULL,NULL,'up_down_dtstart_dtend_up','',0,0,0,1,NULL),
26 (1202688000,1103,NULL,NULL,'down_dtstart_up_dtend','',0,0,0,1,NULL),
27 (1202688000,1103,NULL,NULL,'up_dtstart_down_dtend','',0,0,0,1,NULL),
28 (1202688000,1103,NULL,NULL,'up_dtstart_down_up_down_dtend','',0,0,0,1,NULL),
29 (1202689800,801,NULL,NULL,'up_dtstart_down_up_down_dtend','',1,0,1,NULL,'yada'),
30 (1202691600,801,NULL,NULL,'down_dtstart_up_dtend','',0,0,1,NULL,'192.168.1.18 is UP'),
31 (1202691600,801,NULL,NULL,'up_dtstart_down_dtend','',1,0,1,NULL,'192.168.1.18 is DOWN'),
32 (1202691600,801,NULL,NULL,'up_dtstart_down_up_down_dtend','',0,0,1,NULL,'yada'),
33 (1202693400,801,NULL,NULL,'up_dtstart_down_up_down_dtend','',1,0,1,NULL,'yada'),
34 (1202694000,1103,NULL,NULL,'down_dtstart_dtstart_dtend_dtend','',0,0,0,1,NULL),
35 (1202695200,1104,NULL,NULL,'down_dtstart_dtstart_dtend_dtend','',0,0,0,0,NULL),
36 (1202695200,1104,NULL,NULL,'down_dtstart_up_dtend','',0,0,0,0,NULL),
37 (1202695200,1104,NULL,NULL,'up_down_dtstart_dtend_up','',0,0,0,0,NULL),
38 (1202695200,1104,NULL,NULL,'up_dtstart_down_dtend','',0,0,0,0,NULL),
39 (1202695200,1104,NULL,NULL,'up_dtstart_down_up_down_dtend','',0,0,0,0,NULL),
40 (1202695800,1104,NULL,NULL,'down_dtstart_dtstart_dtend_dtend','',0,0,0,0,NULL),
41 (1202698800,801,NULL,NULL,'up_down_dtstart_dtend_up','',0,1,1,NULL,'OK - yadayada');