naparuba/shinken — Issue #42: Merlindb - Notification database
Author: Frescha
Created: 2011-10-30 16:27:35+00:00
State: open
Labels: Broker

In the future notifications have to be written in the notificationtable.

Sample database see attachment

CREATE TABLE IF NOT EXISTS `notification` (
`instance_id` int(11) NOT NULL DEFAULT '0',
`id` int(11) NOT NULL AUTO_INCREMENT,
`notification_type` int(11) DEFAULT NULL,
`start_time` int(11) DEFAULT NULL,
`end_time` int(11) DEFAULT NULL,
`contact_name` varchar(255) COLLATE latin1_general_cs DEFAULT NULL,
`host_name` varchar(255) COLLATE latin1_general_cs DEFAULT NULL,
`service_description` varchar(255) COLLATE latin1_general_cs DEFAULT NULL,
`command_name` varchar(255) COLLATE latin1_general_cs DEFAULT NULL,
`reason_type` int(11) DEFAULT NULL,
`state` int(11) DEFAULT NULL,
`output` text COLLATE latin1_general_cs,
`ack_author` varchar(255) COLLATE latin1_general_cs DEFAULT NULL,
`ack_data` text COLLATE latin1_general_cs,
`escalated` int(11) DEFAULT NULL,
`contacts_notified` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_cs AUTO_INCREMENT=45 ;

--
-- Daten f√ºr Tabelle `notification`
--

INSERT INTO `notification` (`instance_id`, `id`, `notification_type`, `start_time`, `end_time`, `contact_name`, `host_name`, `service_description`, `command_name`, `reason_type`, `state`, `output`, `ack_author`, `ack_data`, `escalated`, `contacts_notified`) VALUES
(0, 1, 0, 1300625340, 1300625340, 'nagiosadmin', 'winserver', NULL, 'notify-host-by-email', 0, 1, '(Host Check Timed Out)', NULL, NULL, 0, NULL),
(0, 2, 0, 1300627170, 1300627170, 'nagiosadmin', 'winserver', NULL, 'notify-host-by-email', 0, 1, '(Host Check Timed Out)', NULL, NULL, 0, NULL),
(0, 3, 0, 1300628970, 1300628970, 'nagiosadmin', 'winserver', NULL, 'notify-host-by-email', 0, 1, '(Host Check Timed Out)', NULL, NULL, 0, NULL),
(0, 4, 0, 1300630770, 1300630770, 'nagiosadmin', 'winserver', NULL, 'notify-host-by-email', 0, 1, '(Host Check Timed Out)', NULL, NULL, 0, NULL),
(0, 5, 0, 1300814488, 1300814488, 'nagiosadmin', 'winserver', NULL, 'notify-host-by-email', 0, 0, 'PING OK - Packet loss = 0%, RTA = 0.20 ms', NULL, NULL, 0, NULL),
(0, 6, 1, 1300814488, 1300814488, 'nagiosadmin', 'winserver', 'CPU Load', 'notify-service-by-email', 0, 2, 'CRITICAL - Socket timeout after 10 seconds', NULL, NULL, 0, NULL),
(0, 7, 1, 1300814538, 1300814538, 'nagiosadmin', 'winserver', 'Explorer', 'notify-service-by-email', 0, 2, 'Connection refused', NULL, NULL, 0, NULL),
(0, 8, 1, 1300814598, 1300814598, 'nagiosadmin', 'winserver', 'Memory Usage', 'notify-service-by-email', 0, 2, 'Connection refused', NULL, NULL, 0, NULL),
(0, 9, 1, 1300814658, 1300814658, 'nagiosadmin', 'winserver', 'NSClient++ Version', 'notify-service-by-email', 0, 2, 'Connection refused', NULL, NULL, 0, NULL),
(0, 10, 1, 1300814718, 1300814718, 'nagiosadmin', 'winserver', 'Uptime', 'notify-service-by-email', 0, 2, 'Connection refused', NULL, NULL, 0, NULL),
(0, 11, 1, 1300814768, 1300814768, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'Connection refused', NULL, NULL, 0, NULL),
(0, 12, 1, 1300815018, 1300815018, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 2, 'Connection refused', NULL, NULL, 0, NULL),
(0, 13, 1, 1300815138, 1300815138, 'nagiosadmin', 'winserver', 'Explorer', 'notify-service-by-email', 0, 0, 'Explorer.EXE: Running', NULL, NULL, 0, NULL),
(0, 14, 1, 1300815138, 1300815138, 'nagiosadmin', 'winserver', 'CPU Load', 'notify-service-by-email', 0, 0, 'CPU Load 0% (5 min average)', NULL, NULL, 0, NULL),
(0, 15, 1, 1300815198, 1300815198, 'nagiosadmin', 'winserver', 'Memory Usage', 'notify-service-by-email', 0, 0, 'Memory usage: total:24556.59 Mb - used: 2653.04 Mb (11%) - free: 21903.54 Mb (89%)', NULL, NULL, 0, NULL),
(0, 16, 1, 1300815258, 1300815258, 'nagiosadmin', 'winserver', 'NSClient++ Version', 'notify-service-by-email', 0, 0, 'NSClient++ 0.3.8.76 2010-05-27', NULL, NULL, 0, NULL),
(0, 17, 1, 1300815318, 1300815318, 'nagiosadmin', 'winserver', 'Uptime', 'notify-service-by-email', 0, 0, 'System Uptime - 0 day(s) 1 hour(s) 14 minute(s)', NULL, NULL, 0, NULL),
(0, 18, 1, 1300815618, 1300815618, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 0, 'c:\\ - total: 55.90 Gb - used: 33.03 Gb (59%) - free 22.87 Gb (41%)', NULL, NULL, 0, NULL),
(0, 19, 1, 1300817664, 1300817664, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 33.19 Gb (59%) - free 22.71 Gb (41%)', NULL, NULL, 0, NULL),
(0, 20, 1, 1300818374, 1300818374, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 21, 1, 1300821264, 1300821264, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 33.16 Gb (59%) - free 22.73 Gb (41%)', NULL, NULL, 0, NULL),
(0, 22, 1, 1300821974, 1300821974, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 23, 1, 1300824864, 1300824864, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 32.72 Gb (59%) - free 23.18 Gb (41%)', NULL, NULL, 0, NULL),
(0, 24, 1, 1300825574, 1300825574, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 25, 1, 1300828464, 1300828464, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 32.70 Gb (59%) - free 23.20 Gb (41%)', NULL, NULL, 0, NULL),
(0, 26, 1, 1300829174, 1300829174, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 27, 1, 1300947066, 1300947066, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 33.23 Gb (59%) - free 22.67 Gb (41%)', NULL, NULL, 0, NULL),
(0, 28, 1, 1300947426, 1300947426, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 29, 1, 1303419746, 1303419746, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 35.96 Gb (64%) - free 19.93 Gb (36%)', NULL, NULL, 0, NULL),
(0, 30, 1, 1303488468, 1303488468, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 34.51 Gb (62%) - free 21.39 Gb (38%)', NULL, NULL, 0, NULL),
(0, 31, 1, 1303488758, 1303488758, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 32, 1, 1303492068, 1303492068, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 34.85 Gb (62%) - free 21.04 Gb (38%)', NULL, NULL, 0, NULL),
(0, 33, 1, 1303492358, 1303492358, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 34, 1, 1303495668, 1303495668, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 34.97 Gb (63%) - free 20.93 Gb (37%)', NULL, NULL, 0, NULL),
(0, 35, 1, 1303495958, 1303495958, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 36, 1, 1303499268, 1303499268, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 34.85 Gb (62%) - free 21.04 Gb (38%)', NULL, NULL, 0, NULL),
(0, 37, 1, 1303499558, 1303499558, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 38, 1, 1303502868, 1303502868, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 34.87 Gb (62%) - free 21.03 Gb (38%)', NULL, NULL, 0, NULL),
(0, 39, 1, 1303503158, 1303503158, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 40, 1, 1303506468, 1303506468, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 34.89 Gb (62%) - free 21.01 Gb (38%)', NULL, NULL, 0, NULL),
(0, 41, 1, 1303506758, 1303506758, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 42, 1, 1303510068, 1303510068, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 34.81 Gb (62%) - free 21.08 Gb (38%)', NULL, NULL, 0, NULL),
(0, 43, 1, 1303510358, 1303510358, 'nagiosadmin', 'winserver', 'W3SVC', 'notify-service-by-email', 0, 2, 'W3SVC: Not found', NULL, NULL, 0, NULL),
(0, 44, 1, 1303513668, 1303513668, 'nagiosadmin', 'winserver', 'C:\\ Drive Space', 'notify-service-by-email', 0, 1, 'c:\\ - total: 55.90 Gb - used: 34.88 Gb (62%) - free 21.02 Gb (38%)', NULL, NULL, 0, NULL);