From quartist, 11 Months ago, written in Plain Text.
Embed
  1. -- MySQL dump 10.15  Distrib 10.0.29-MariaDB, for debian-linux-gnu (x86_64)
  2. --
  3. -- Host: 127.0.0.1    Database: 127.0.0.1
  4. -- ------------------------------------------------------
  5. -- Server version 5.7.19-17-57-log
  6.  
  7. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  8. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  9. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  10. /*!40101 SET NAMES utf8mb4 */;
  11. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  12. /*!40103 SET TIME_ZONE='+00:00' */;
  13. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  14. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  15. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  16. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  17.  
  18. --
  19. -- Table structure for table `access_points`
  20. --
  21.  
  22. DROP TABLE IF EXISTS `access_points`;
  23. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  24. /*!40101 SET character_set_client = utf8 */;
  25. CREATE TABLE `access_points` (
  26.   `accesspoint_id` int(11) NOT NULL AUTO_INCREMENT,
  27.   `device_id` int(11) NOT NULL,
  28.   `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  29.   `radio_number` tinyint(4) DEFAULT NULL,
  30.   `type` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  31.   `mac_addr` varchar(24) COLLATE utf8_unicode_ci NOT NULL,
  32.   `deleted` tinyint(1) NOT NULL DEFAULT '0',
  33.   `channel` tinyint(4) unsigned NOT NULL DEFAULT '0',
  34.   `txpow` tinyint(4) NOT NULL DEFAULT '0',
  35.   `radioutil` tinyint(4) NOT NULL DEFAULT '0',
  36.   `numasoclients` smallint(6) NOT NULL DEFAULT '0',
  37.   `nummonclients` smallint(6) NOT NULL DEFAULT '0',
  38.   `numactbssid` tinyint(4) NOT NULL DEFAULT '0',
  39.   `nummonbssid` tinyint(4) NOT NULL DEFAULT '0',
  40.   `interference` tinyint(3) unsigned NOT NULL,
  41.   PRIMARY KEY (`accesspoint_id`),
  42.   KEY `deleted` (`deleted`),
  43.   KEY `name` (`name`,`radio_number`)
  44. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Access Points';
  45. /*!40101 SET character_set_client = @saved_cs_client */;
  46.  
  47. --
  48. -- Table structure for table `alert_log`
  49. --
  50.  
  51. DROP TABLE IF EXISTS `alert_log`;
  52. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  53. /*!40101 SET character_set_client = utf8 */;
  54. CREATE TABLE `alert_log` (
  55.   `id` int(11) NOT NULL AUTO_INCREMENT,
  56.   `rule_id` int(11) NOT NULL,
  57.   `device_id` int(11) NOT NULL,
  58.   `state` int(11) NOT NULL,
  59.   `details` longblob,
  60.   `time_logged` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  61.   PRIMARY KEY (`id`),
  62.   KEY `rule_id` (`rule_id`),
  63.   KEY `device_id` (`device_id`),
  64.   KEY `time_logged` (`time_logged`)
  65. ) ENGINE=InnoDB AUTO_INCREMENT=11785 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  66. /*!40101 SET character_set_client = @saved_cs_client */;
  67.  
  68. --
  69. -- Table structure for table `alert_map`
  70. --
  71.  
  72. DROP TABLE IF EXISTS `alert_map`;
  73. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  74. /*!40101 SET character_set_client = utf8 */;
  75. CREATE TABLE `alert_map` (
  76.   `id` int(11) NOT NULL AUTO_INCREMENT,
  77.   `rule` int(11) NOT NULL DEFAULT '0',
  78.   `target` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  79.   PRIMARY KEY (`id`)
  80. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  81. /*!40101 SET character_set_client = @saved_cs_client */;
  82.  
  83. --
  84. -- Table structure for table `alert_rules`
  85. --
  86.  
  87. DROP TABLE IF EXISTS `alert_rules`;
  88. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  89. /*!40101 SET character_set_client = utf8 */;
  90. CREATE TABLE `alert_rules` (
  91.   `id` int(11) NOT NULL AUTO_INCREMENT,
  92.   `device_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  93.   `rule` text COLLATE utf8_unicode_ci NOT NULL,
  94.   `severity` enum('ok','warning','critical') COLLATE utf8_unicode_ci NOT NULL,
  95.   `extra` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  96.   `disabled` tinyint(1) NOT NULL,
  97.   `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  98.   `query` text COLLATE utf8_unicode_ci NOT NULL,
  99.   `proc` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL,
  100.   PRIMARY KEY (`id`),
  101.   UNIQUE KEY `name` (`name`),
  102.   KEY `device_id` (`device_id`)
  103. ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  104. /*!40101 SET character_set_client = @saved_cs_client */;
  105.  
  106. --
  107. -- Table structure for table `alert_schedule`
  108. --
  109.  
  110. DROP TABLE IF EXISTS `alert_schedule`;
  111. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  112. /*!40101 SET character_set_client = utf8 */;
  113. CREATE TABLE `alert_schedule` (
  114.   `schedule_id` int(11) NOT NULL AUTO_INCREMENT,
  115.   `recurring` tinyint(1) unsigned NOT NULL DEFAULT '0',
  116.   `start` datetime NOT NULL DEFAULT '1970-01-02 00:00:01',
  117.   `end` datetime NOT NULL DEFAULT '1970-01-02 00:00:01',
  118.   `start_recurring_dt` date NOT NULL DEFAULT '1970-01-01',
  119.   `end_recurring_dt` date DEFAULT NULL,
  120.   `start_recurring_hr` time NOT NULL DEFAULT '00:00:00',
  121.   `end_recurring_hr` time NOT NULL DEFAULT '00:00:00',
  122.   `recurring_day` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
  123.   `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  124.   `notes` text COLLATE utf8_unicode_ci NOT NULL,
  125.   PRIMARY KEY (`schedule_id`)
  126. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  127. /*!40101 SET character_set_client = @saved_cs_client */;
  128.  
  129. --
  130. -- Table structure for table `alert_schedule_items`
  131. --
  132.  
  133. DROP TABLE IF EXISTS `alert_schedule_items`;
  134. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  135. /*!40101 SET character_set_client = utf8 */;
  136. CREATE TABLE `alert_schedule_items` (
  137.   `item_id` int(11) NOT NULL AUTO_INCREMENT,
  138.   `schedule_id` int(11) NOT NULL,
  139.   `target` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  140.   PRIMARY KEY (`item_id`),
  141.   KEY `schedule_id` (`schedule_id`)
  142. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  143. /*!40101 SET character_set_client = @saved_cs_client */;
  144.  
  145. --
  146. -- Table structure for table `alert_template_map`
  147. --
  148.  
  149. DROP TABLE IF EXISTS `alert_template_map`;
  150. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  151. /*!40101 SET character_set_client = utf8 */;
  152. CREATE TABLE `alert_template_map` (
  153.   `id` int(11) NOT NULL AUTO_INCREMENT,
  154.   `alert_templates_id` int(11) NOT NULL,
  155.   `alert_rule_id` int(11) NOT NULL,
  156.   PRIMARY KEY (`id`),
  157.   KEY `alert_templates_id` (`alert_templates_id`,`alert_rule_id`)
  158. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  159. /*!40101 SET character_set_client = @saved_cs_client */;
  160.  
  161. --
  162. -- Table structure for table `alert_templates`
  163. --
  164.  
  165. DROP TABLE IF EXISTS `alert_templates`;
  166. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  167. /*!40101 SET character_set_client = utf8 */;
  168. CREATE TABLE `alert_templates` (
  169.   `id` int(11) NOT NULL AUTO_INCREMENT,
  170.   `rule_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT ',',
  171.   `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  172.   `template` longtext COLLATE utf8_unicode_ci NOT NULL,
  173.   `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  174.   `title_rec` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  175.   PRIMARY KEY (`id`)
  176. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  177. /*!40101 SET character_set_client = @saved_cs_client */;
  178.  
  179. --
  180. -- Table structure for table `alerts`
  181. --
  182.  
  183. DROP TABLE IF EXISTS `alerts`;
  184. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  185. /*!40101 SET character_set_client = utf8 */;
  186. CREATE TABLE `alerts` (
  187.   `id` int(11) NOT NULL AUTO_INCREMENT,
  188.   `device_id` int(11) NOT NULL,
  189.   `rule_id` int(11) NOT NULL,
  190.   `state` int(11) NOT NULL,
  191.   `alerted` int(11) NOT NULL,
  192.   `open` int(11) NOT NULL,
  193.   `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  194.   PRIMARY KEY (`id`),
  195.   UNIQUE KEY `unique_alert` (`device_id`,`rule_id`),
  196.   KEY `rule_id` (`rule_id`),
  197.   KEY `device_id` (`device_id`)
  198. ) ENGINE=InnoDB AUTO_INCREMENT=859 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  199. /*!40101 SET character_set_client = @saved_cs_client */;
  200.  
  201. --
  202. -- Table structure for table `api_tokens`
  203. --
  204.  
  205. DROP TABLE IF EXISTS `api_tokens`;
  206. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  207. /*!40101 SET character_set_client = utf8 */;
  208. CREATE TABLE `api_tokens` (
  209.   `id` int(11) NOT NULL AUTO_INCREMENT,
  210.   `user_id` int(11) NOT NULL,
  211.   `token_hash` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  212.   `description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  213.   `disabled` tinyint(1) NOT NULL DEFAULT '0',
  214.   PRIMARY KEY (`id`),
  215.   UNIQUE KEY `token_hash` (`token_hash`)
  216. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  217. /*!40101 SET character_set_client = @saved_cs_client */;
  218.  
  219. --
  220. -- Table structure for table `application_metrics`
  221. --
  222.  
  223. DROP TABLE IF EXISTS `application_metrics`;
  224. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  225. /*!40101 SET character_set_client = utf8 */;
  226. CREATE TABLE `application_metrics` (
  227.   `app_id` int(11) NOT NULL,
  228.   `metric` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  229.   `value` int(11) DEFAULT NULL,
  230.   `value_prev` int(11) DEFAULT NULL,
  231.   UNIQUE KEY `application_metrics_app_id_metric_uindex` (`app_id`,`metric`)
  232. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  233. /*!40101 SET character_set_client = @saved_cs_client */;
  234.  
  235. --
  236. -- Table structure for table `applications`
  237. --
  238.  
  239. DROP TABLE IF EXISTS `applications`;
  240. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  241. /*!40101 SET character_set_client = utf8 */;
  242. CREATE TABLE `applications` (
  243.   `app_id` int(11) NOT NULL AUTO_INCREMENT,
  244.   `device_id` int(11) NOT NULL,
  245.   `app_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  246.   `app_state` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'UNKNOWN',
  247.   `discovered` tinyint(4) NOT NULL DEFAULT '0',
  248.   `app_state_prev` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  249.   `app_status` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  250.   `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  251.   `app_instance` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  252.   PRIMARY KEY (`app_id`),
  253.   UNIQUE KEY `unique_index` (`device_id`,`app_type`)
  254. ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  255. /*!40101 SET character_set_client = @saved_cs_client */;
  256.  
  257. --
  258. -- Table structure for table `authlog`
  259. --
  260.  
  261. DROP TABLE IF EXISTS `authlog`;
  262. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  263. /*!40101 SET character_set_client = utf8 */;
  264. CREATE TABLE `authlog` (
  265.   `id` int(11) NOT NULL AUTO_INCREMENT,
  266.   `datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  267.   `user` text COLLATE utf8_unicode_ci NOT NULL,
  268.   `address` text COLLATE utf8_unicode_ci NOT NULL,
  269.   `result` text COLLATE utf8_unicode_ci NOT NULL,
  270.   PRIMARY KEY (`id`)
  271. ) ENGINE=InnoDB AUTO_INCREMENT=592 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  272. /*!40101 SET character_set_client = @saved_cs_client */;
  273.  
  274. --
  275. -- Table structure for table `bgpPeers`
  276. --
  277.  
  278. DROP TABLE IF EXISTS `bgpPeers`;
  279. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  280. /*!40101 SET character_set_client = utf8 */;
  281. CREATE TABLE `bgpPeers` (
  282.   `bgpPeer_id` int(11) NOT NULL AUTO_INCREMENT,
  283.   `device_id` int(11) NOT NULL,
  284.   `astext` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  285.   `bgpPeerIdentifier` text COLLATE utf8_unicode_ci NOT NULL,
  286.   `bgpPeerRemoteAs` bigint(20) NOT NULL,
  287.   `bgpPeerState` text COLLATE utf8_unicode_ci NOT NULL,
  288.   `bgpPeerAdminStatus` text COLLATE utf8_unicode_ci NOT NULL,
  289.   `bgpLocalAddr` text COLLATE utf8_unicode_ci NOT NULL,
  290.   `bgpPeerRemoteAddr` text COLLATE utf8_unicode_ci NOT NULL,
  291.   `bgpPeerInUpdates` int(11) NOT NULL,
  292.   `bgpPeerOutUpdates` int(11) NOT NULL,
  293.   `bgpPeerInTotalMessages` int(11) NOT NULL,
  294.   `bgpPeerOutTotalMessages` int(11) NOT NULL,
  295.   `bgpPeerFsmEstablishedTime` int(11) NOT NULL,
  296.   `bgpPeerInUpdateElapsedTime` int(11) NOT NULL,
  297.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  298.   PRIMARY KEY (`bgpPeer_id`),
  299.   KEY `device_id` (`device_id`)
  300. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  301. /*!40101 SET character_set_client = @saved_cs_client */;
  302.  
  303. --
  304. -- Table structure for table `bgpPeers_cbgp`
  305. --
  306.  
  307. DROP TABLE IF EXISTS `bgpPeers_cbgp`;
  308. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  309. /*!40101 SET character_set_client = utf8 */;
  310. CREATE TABLE `bgpPeers_cbgp` (
  311.   `device_id` int(11) NOT NULL,
  312.   `bgpPeerIdentifier` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  313.   `afi` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  314.   `safi` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  315.   `AcceptedPrefixes` int(11) NOT NULL,
  316.   `DeniedPrefixes` int(11) NOT NULL,
  317.   `PrefixAdminLimit` int(11) NOT NULL,
  318.   `PrefixThreshold` int(11) NOT NULL,
  319.   `PrefixClearThreshold` int(11) NOT NULL,
  320.   `AdvertisedPrefixes` int(11) NOT NULL,
  321.   `SuppressedPrefixes` int(11) NOT NULL,
  322.   `WithdrawnPrefixes` int(11) NOT NULL,
  323.   `AcceptedPrefixes_delta` int(11) NOT NULL,
  324.   `AcceptedPrefixes_prev` int(11) NOT NULL,
  325.   `DeniedPrefixes_delta` int(11) NOT NULL,
  326.   `DeniedPrefixes_prev` int(11) NOT NULL,
  327.   `AdvertisedPrefixes_delta` int(11) NOT NULL,
  328.   `AdvertisedPrefixes_prev` int(11) NOT NULL,
  329.   `SuppressedPrefixes_delta` int(11) NOT NULL,
  330.   `SuppressedPrefixes_prev` int(11) NOT NULL,
  331.   `WithdrawnPrefixes_delta` int(11) NOT NULL,
  332.   `WithdrawnPrefixes_prev` int(11) NOT NULL,
  333.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  334.   UNIQUE KEY `unique_index` (`device_id`,`bgpPeerIdentifier`,`afi`,`safi`),
  335.   KEY `device_id` (`device_id`,`bgpPeerIdentifier`)
  336. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  337. /*!40101 SET character_set_client = @saved_cs_client */;
  338.  
  339. --
  340. -- Table structure for table `bill_data`
  341. --
  342.  
  343. DROP TABLE IF EXISTS `bill_data`;
  344. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  345. /*!40101 SET character_set_client = utf8 */;
  346. CREATE TABLE `bill_data` (
  347.   `bill_id` int(11) NOT NULL,
  348.   `timestamp` datetime NOT NULL,
  349.   `period` int(11) NOT NULL,
  350.   `delta` bigint(11) NOT NULL,
  351.   `in_delta` bigint(11) NOT NULL,
  352.   `out_delta` bigint(11) NOT NULL,
  353.   PRIMARY KEY (`bill_id`,`timestamp`),
  354.   KEY `bill_id` (`bill_id`)
  355. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  356. /*!40101 SET character_set_client = @saved_cs_client */;
  357.  
  358. --
  359. -- Table structure for table `bill_history`
  360. --
  361.  
  362. DROP TABLE IF EXISTS `bill_history`;
  363. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  364. /*!40101 SET character_set_client = utf8 */;
  365. CREATE TABLE `bill_history` (
  366.   `bill_hist_id` int(11) NOT NULL AUTO_INCREMENT,
  367.   `bill_id` int(11) NOT NULL,
  368.   `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  369.   `bill_datefrom` datetime NOT NULL,
  370.   `bill_dateto` datetime NOT NULL,
  371.   `bill_type` text COLLATE utf8_unicode_ci NOT NULL,
  372.   `bill_allowed` bigint(20) NOT NULL,
  373.   `bill_used` bigint(20) NOT NULL,
  374.   `bill_overuse` bigint(20) NOT NULL,
  375.   `bill_percent` decimal(10,2) NOT NULL,
  376.   `rate_95th_in` bigint(20) NOT NULL,
  377.   `rate_95th_out` bigint(20) NOT NULL,
  378.   `rate_95th` bigint(20) NOT NULL,
  379.   `dir_95th` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  380.   `rate_average` bigint(20) NOT NULL,
  381.   `rate_average_in` bigint(20) NOT NULL,
  382.   `rate_average_out` bigint(20) NOT NULL,
  383.   `traf_in` bigint(20) NOT NULL,
  384.   `traf_out` bigint(20) NOT NULL,
  385.   `traf_total` bigint(20) NOT NULL,
  386.   `pdf` longblob,
  387.   PRIMARY KEY (`bill_hist_id`),
  388.   UNIQUE KEY `unique_index` (`bill_id`,`bill_datefrom`,`bill_dateto`),
  389.   KEY `bill_id` (`bill_id`)
  390. ) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  391. /*!40101 SET character_set_client = @saved_cs_client */;
  392.  
  393. --
  394. -- Table structure for table `bill_perms`
  395. --
  396.  
  397. DROP TABLE IF EXISTS `bill_perms`;
  398. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  399. /*!40101 SET character_set_client = utf8 */;
  400. CREATE TABLE `bill_perms` (
  401.   `user_id` int(11) NOT NULL,
  402.   `bill_id` int(11) NOT NULL,
  403.   PRIMARY KEY (`user_id`,`bill_id`)
  404. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  405. /*!40101 SET character_set_client = @saved_cs_client */;
  406.  
  407. --
  408. -- Table structure for table `bill_port_counters`
  409. --
  410.  
  411. DROP TABLE IF EXISTS `bill_port_counters`;
  412. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  413. /*!40101 SET character_set_client = utf8 */;
  414. CREATE TABLE `bill_port_counters` (
  415.   `port_id` int(11) NOT NULL,
  416.   `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  417.   `in_counter` bigint(20) DEFAULT NULL,
  418.   `in_delta` bigint(20) NOT NULL DEFAULT '0',
  419.   `out_counter` bigint(20) DEFAULT NULL,
  420.   `out_delta` bigint(20) NOT NULL DEFAULT '0',
  421.   `bill_id` int(11) NOT NULL,
  422.   PRIMARY KEY (`port_id`,`bill_id`)
  423. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  424. /*!40101 SET character_set_client = @saved_cs_client */;
  425.  
  426. --
  427. -- Table structure for table `bill_ports`
  428. --
  429.  
  430. DROP TABLE IF EXISTS `bill_ports`;
  431. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  432. /*!40101 SET character_set_client = utf8 */;
  433. CREATE TABLE `bill_ports` (
  434.   `bill_id` int(11) NOT NULL,
  435.   `port_id` int(11) NOT NULL,
  436.   `bill_port_autoadded` tinyint(1) NOT NULL DEFAULT '0',
  437.   PRIMARY KEY (`bill_id`,`port_id`)
  438. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  439. /*!40101 SET character_set_client = @saved_cs_client */;
  440.  
  441. --
  442. -- Table structure for table `bills`
  443. --
  444.  
  445. DROP TABLE IF EXISTS `bills`;
  446. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  447. /*!40101 SET character_set_client = utf8 */;
  448. CREATE TABLE `bills` (
  449.   `bill_id` int(11) NOT NULL AUTO_INCREMENT,
  450.   `bill_name` text COLLATE utf8_unicode_ci NOT NULL,
  451.   `bill_type` text COLLATE utf8_unicode_ci NOT NULL,
  452.   `bill_cdr` bigint(20) DEFAULT NULL,
  453.   `bill_day` int(11) NOT NULL DEFAULT '1',
  454.   `bill_quota` bigint(20) DEFAULT NULL,
  455.   `rate_95th_in` bigint(20) NOT NULL,
  456.   `rate_95th_out` bigint(20) NOT NULL,
  457.   `rate_95th` bigint(20) NOT NULL,
  458.   `dir_95th` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  459.   `total_data` bigint(20) NOT NULL,
  460.   `total_data_in` bigint(20) NOT NULL,
  461.   `total_data_out` bigint(20) NOT NULL,
  462.   `rate_average_in` bigint(20) NOT NULL,
  463.   `rate_average_out` bigint(20) NOT NULL,
  464.   `rate_average` bigint(20) NOT NULL,
  465.   `bill_last_calc` datetime NOT NULL,
  466.   `bill_custid` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  467.   `bill_ref` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  468.   `bill_notes` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  469.   `bill_autoadded` tinyint(1) NOT NULL,
  470.   UNIQUE KEY `bill_id` (`bill_id`)
  471. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  472. /*!40101 SET character_set_client = @saved_cs_client */;
  473.  
  474. --
  475. -- Table structure for table `callback`
  476. --
  477.  
  478. DROP TABLE IF EXISTS `callback`;
  479. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  480. /*!40101 SET character_set_client = utf8 */;
  481. CREATE TABLE `callback` (
  482.   `callback_id` int(11) NOT NULL AUTO_INCREMENT,
  483.   `name` char(64) COLLATE utf8_unicode_ci NOT NULL,
  484.   `value` char(64) COLLATE utf8_unicode_ci NOT NULL,
  485.   PRIMARY KEY (`callback_id`)
  486. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  487. /*!40101 SET character_set_client = @saved_cs_client */;
  488.  
  489. --
  490. -- Table structure for table `cef_switching`
  491. --
  492.  
  493. DROP TABLE IF EXISTS `cef_switching`;
  494. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  495. /*!40101 SET character_set_client = utf8 */;
  496. CREATE TABLE `cef_switching` (
  497.   `cef_switching_id` int(11) NOT NULL AUTO_INCREMENT,
  498.   `device_id` int(11) NOT NULL,
  499.   `entPhysicalIndex` int(11) NOT NULL,
  500.   `afi` varchar(4) COLLATE utf8_unicode_ci NOT NULL,
  501.   `cef_index` int(11) NOT NULL,
  502.   `cef_path` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  503.   `drop` int(11) NOT NULL,
  504.   `punt` int(11) NOT NULL,
  505.   `punt2host` int(11) NOT NULL,
  506.   `drop_prev` int(11) NOT NULL,
  507.   `punt_prev` int(11) NOT NULL,
  508.   `punt2host_prev` int(11) NOT NULL,
  509.   `updated` int(11) NOT NULL,
  510.   `updated_prev` int(11) NOT NULL,
  511.   PRIMARY KEY (`cef_switching_id`),
  512.   UNIQUE KEY `device_id` (`device_id`,`entPhysicalIndex`,`afi`,`cef_index`)
  513. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  514. /*!40101 SET character_set_client = @saved_cs_client */;
  515.  
  516. --
  517. -- Table structure for table `ciscoASA`
  518. --
  519.  
  520. DROP TABLE IF EXISTS `ciscoASA`;
  521. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  522. /*!40101 SET character_set_client = utf8 */;
  523. CREATE TABLE `ciscoASA` (
  524.   `ciscoASA_id` int(11) NOT NULL AUTO_INCREMENT,
  525.   `device_id` int(11) NOT NULL,
  526.   `oid` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  527.   `data` bigint(20) NOT NULL,
  528.   `high_alert` bigint(20) NOT NULL,
  529.   `low_alert` bigint(20) NOT NULL,
  530.   `disabled` tinyint(4) NOT NULL DEFAULT '0',
  531.   PRIMARY KEY (`ciscoASA_id`),
  532.   KEY `device_id` (`device_id`)
  533. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  534. /*!40101 SET character_set_client = @saved_cs_client */;
  535.  
  536. --
  537. -- Table structure for table `component`
  538. --
  539.  
  540. DROP TABLE IF EXISTS `component`;
  541. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  542. /*!40101 SET character_set_client = utf8 */;
  543. CREATE TABLE `component` (
  544.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID for each component, unique index',
  545.   `device_id` int(11) unsigned NOT NULL COMMENT 'device_id from the devices table',
  546.   `type` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'name from the component_type table',
  547.   `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Display label for the component',
  548.   `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'The status of the component, retreived from the device',
  549.   `disabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Should this component be polled',
  550.   `ignore` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Should this component be alerted on',
  551.   `error` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Error message if in Alert state',
  552.   PRIMARY KEY (`id`),
  553.   KEY `device` (`device_id`),
  554.   KEY `type` (`type`)
  555. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='components attached to a device.';
  556. /*!40101 SET character_set_client = @saved_cs_client */;
  557.  
  558. --
  559. -- Table structure for table `component_prefs`
  560. --
  561.  
  562. DROP TABLE IF EXISTS `component_prefs`;
  563. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  564. /*!40101 SET character_set_client = utf8 */;
  565. CREATE TABLE `component_prefs` (
  566.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID for each entry',
  567.   `component` int(11) unsigned NOT NULL COMMENT 'id from the component table',
  568.   `attribute` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Attribute for the Component',
  569.   `value` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Value for the Component',
  570.   PRIMARY KEY (`id`),
  571.   KEY `component` (`component`),
  572.   CONSTRAINT `component_prefs_ibfk_1` FOREIGN KEY (`component`) REFERENCES `component` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
  573. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='AV Pairs for each component';
  574. /*!40101 SET character_set_client = @saved_cs_client */;
  575.  
  576. --
  577. -- Table structure for table `component_statuslog`
  578. --
  579.  
  580. DROP TABLE IF EXISTS `component_statuslog`;
  581. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  582. /*!40101 SET character_set_client = utf8 */;
  583. CREATE TABLE `component_statuslog` (
  584.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID for each log entry, unique index',
  585.   `component_id` int(11) unsigned NOT NULL COMMENT 'id from the component table',
  586.   `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'The status that the component was changed TO',
  587.   `message` text COLLATE utf8_unicode_ci,
  588.   `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'When the status of the component was changed',
  589.   PRIMARY KEY (`id`),
  590.   KEY `device` (`component_id`),
  591.   CONSTRAINT `component_statuslog_ibfk_1` FOREIGN KEY (`component_id`) REFERENCES `component` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
  592. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='log of status changes to a component.';
  593. /*!40101 SET character_set_client = @saved_cs_client */;
  594.  
  595. --
  596. -- Table structure for table `config`
  597. --
  598.  
  599. DROP TABLE IF EXISTS `config`;
  600. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  601. /*!40101 SET character_set_client = utf8 */;
  602. CREATE TABLE `config` (
  603.   `config_id` int(11) NOT NULL AUTO_INCREMENT,
  604.   `config_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  605.   `config_value` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  606.   `config_default` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  607.   `config_descr` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  608.   `config_group` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  609.   `config_group_order` int(11) NOT NULL DEFAULT '0',
  610.   `config_sub_group` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  611.   `config_sub_group_order` int(11) NOT NULL DEFAULT '0',
  612.   `config_hidden` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  613.   `config_disabled` enum('0','1') COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  614.   PRIMARY KEY (`config_id`),
  615.   UNIQUE KEY `uniqueindex_configname` (`config_name`)
  616. ) ENGINE=InnoDB AUTO_INCREMENT=804 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  617. /*!40101 SET character_set_client = @saved_cs_client */;
  618.  
  619. --
  620. -- Table structure for table `customers`
  621. --
  622.  
  623. DROP TABLE IF EXISTS `customers`;
  624. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  625. /*!40101 SET character_set_client = utf8 */;
  626. CREATE TABLE `customers` (
  627.   `customer_id` int(11) NOT NULL AUTO_INCREMENT,
  628.   `username` char(64) COLLATE utf8_unicode_ci NOT NULL,
  629.   `password` char(32) COLLATE utf8_unicode_ci NOT NULL,
  630.   `string` char(64) COLLATE utf8_unicode_ci NOT NULL,
  631.   `level` tinyint(4) NOT NULL DEFAULT '0',
  632.   PRIMARY KEY (`customer_id`),
  633.   UNIQUE KEY `username` (`username`)
  634. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  635. /*!40101 SET character_set_client = @saved_cs_client */;
  636.  
  637. --
  638. -- Table structure for table `dashboards`
  639. --
  640.  
  641. DROP TABLE IF EXISTS `dashboards`;
  642. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  643. /*!40101 SET character_set_client = utf8 */;
  644. CREATE TABLE `dashboards` (
  645.   `dashboard_id` int(11) NOT NULL AUTO_INCREMENT,
  646.   `user_id` int(11) NOT NULL DEFAULT '0',
  647.   `dashboard_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  648.   `access` int(1) NOT NULL DEFAULT '0',
  649.   PRIMARY KEY (`dashboard_id`)
  650. ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  651. /*!40101 SET character_set_client = @saved_cs_client */;
  652.  
  653. --
  654. -- Table structure for table `dbSchema`
  655. --
  656.  
  657. DROP TABLE IF EXISTS `dbSchema`;
  658. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  659. /*!40101 SET character_set_client = utf8 */;
  660. CREATE TABLE `dbSchema` (
  661.   `version` int(11) NOT NULL DEFAULT '0',
  662.   PRIMARY KEY (`version`)
  663. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  664. /*!40101 SET character_set_client = @saved_cs_client */;
  665.  
  666. --
  667. -- Table structure for table `device_graphs`
  668. --
  669.  
  670. DROP TABLE IF EXISTS `device_graphs`;
  671. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  672. /*!40101 SET character_set_client = utf8 */;
  673. CREATE TABLE `device_graphs` (
  674.   `device_id` int(11) NOT NULL,
  675.   `graph` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  676.   PRIMARY KEY (`device_id`,`graph`),
  677.   KEY `device_id` (`device_id`)
  678. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  679. /*!40101 SET character_set_client = @saved_cs_client */;
  680.  
  681. --
  682. -- Table structure for table `device_group_device`
  683. --
  684.  
  685. DROP TABLE IF EXISTS `device_group_device`;
  686. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  687. /*!40101 SET character_set_client = utf8 */;
  688. CREATE TABLE `device_group_device` (
  689.   `device_group_id` int(10) unsigned NOT NULL,
  690.   `device_id` int(10) unsigned NOT NULL,
  691.   PRIMARY KEY (`device_group_id`,`device_id`),
  692.   KEY `device_group_device_device_group_id_index` (`device_group_id`),
  693.   KEY `device_group_device_device_id_index` (`device_id`),
  694.   CONSTRAINT `device_group_device_device_group_id_foreign` FOREIGN KEY (`device_group_id`) REFERENCES `device_groups` (`id`) ON DELETE CASCADE,
  695.   CONSTRAINT `device_group_device_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`device_id`) ON DELETE CASCADE
  696. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  697. /*!40101 SET character_set_client = @saved_cs_client */;
  698.  
  699. --
  700. -- Table structure for table `device_groups`
  701. --
  702.  
  703. DROP TABLE IF EXISTS `device_groups`;
  704. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  705. /*!40101 SET character_set_client = utf8 */;
  706. CREATE TABLE `device_groups` (
  707.   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  708.   `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  709.   `desc` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  710.   `pattern` text COLLATE utf8_unicode_ci,
  711.   `params` text COLLATE utf8_unicode_ci,
  712.   PRIMARY KEY (`id`),
  713.   UNIQUE KEY `name` (`name`)
  714. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  715. /*!40101 SET character_set_client = @saved_cs_client */;
  716.  
  717. --
  718. -- Table structure for table `device_mibs`
  719. --
  720.  
  721. DROP TABLE IF EXISTS `device_mibs`;
  722. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  723. /*!40101 SET character_set_client = utf8 */;
  724. CREATE TABLE `device_mibs` (
  725.   `device_id` int(11) NOT NULL,
  726.   `module` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  727.   `mib` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  728.   `included_by` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  729.   `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  730.   PRIMARY KEY (`device_id`,`module`,`mib`)
  731. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Device to MIB mappings';
  732. /*!40101 SET character_set_client = @saved_cs_client */;
  733.  
  734. --
  735. -- Table structure for table `device_oids`
  736. --
  737.  
  738. DROP TABLE IF EXISTS `device_oids`;
  739. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  740. /*!40101 SET character_set_client = utf8 */;
  741. CREATE TABLE `device_oids` (
  742.   `device_id` int(11) NOT NULL,
  743.   `oid` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  744.   `module` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  745.   `mib` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  746.   `object_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  747.   `value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  748.   `numvalue` bigint(20) DEFAULT NULL,
  749.   `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  750.   PRIMARY KEY (`device_id`,`oid`)
  751. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Per-device MIB data';
  752. /*!40101 SET character_set_client = @saved_cs_client */;
  753.  
  754. --
  755. -- Table structure for table `device_perf`
  756. --
  757.  
  758. DROP TABLE IF EXISTS `device_perf`;
  759. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  760. /*!40101 SET character_set_client = utf8 */;
  761. CREATE TABLE `device_perf` (
  762.   `id` int(11) NOT NULL AUTO_INCREMENT,
  763.   `device_id` int(11) NOT NULL,
  764.   `timestamp` datetime NOT NULL,
  765.   `xmt` float NOT NULL,
  766.   `rcv` float NOT NULL,
  767.   `loss` float NOT NULL,
  768.   `min` float NOT NULL,
  769.   `max` float NOT NULL,
  770.   `avg` float NOT NULL,
  771.   PRIMARY KEY (`id`,`device_id`),
  772.   KEY `id` (`id`),
  773.   KEY `device_id` (`device_id`)
  774. ) ENGINE=InnoDB AUTO_INCREMENT=3632227 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  775. /*!40101 SET character_set_client = @saved_cs_client */;
  776.  
  777. --
  778. -- Table structure for table `device_relationships`
  779. --
  780.  
  781. DROP TABLE IF EXISTS `device_relationships`;
  782. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  783. /*!40101 SET character_set_client = utf8 */;
  784. CREATE TABLE `device_relationships` (
  785.   `parent_device_id` int(11) unsigned NOT NULL DEFAULT '0',
  786.   `child_device_id` int(11) unsigned NOT NULL,
  787.   PRIMARY KEY (`parent_device_id`,`child_device_id`),
  788.   KEY `device_relationship_child_device_id_fk` (`child_device_id`),
  789.   CONSTRAINT `device_relationship_child_device_id_fk` FOREIGN KEY (`child_device_id`) REFERENCES `devices` (`device_id`) ON DELETE CASCADE,
  790.   CONSTRAINT `device_relationship_parent_device_id_fk` FOREIGN KEY (`parent_device_id`) REFERENCES `devices` (`device_id`) ON DELETE CASCADE
  791. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  792. /*!40101 SET character_set_client = @saved_cs_client */;
  793.  
  794. --
  795. -- Table structure for table `devices`
  796. --
  797.  
  798. DROP TABLE IF EXISTS `devices`;
  799. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  800. /*!40101 SET character_set_client = utf8 */;
  801. CREATE TABLE `devices` (
  802.   `device_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  803.   `hostname` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  804.   `sysName` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  805.   `ip` varbinary(16) DEFAULT NULL,
  806.   `community` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  807.   `authlevel` enum('noAuthNoPriv','authNoPriv','authPriv') COLLATE utf8_unicode_ci DEFAULT NULL,
  808.   `authname` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  809.   `authpass` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  810.   `authalgo` enum('MD5','SHA') COLLATE utf8_unicode_ci DEFAULT NULL,
  811.   `cryptopass` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  812.   `cryptoalgo` enum('AES','DES','') COLLATE utf8_unicode_ci DEFAULT NULL,
  813.   `snmpver` varchar(4) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'v2c',
  814.   `port` smallint(5) unsigned NOT NULL DEFAULT '161',
  815.   `transport` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'udp',
  816.   `timeout` int(11) DEFAULT NULL,
  817.   `retries` int(11) DEFAULT NULL,
  818.   `snmp_disable` tinyint(1) NOT NULL DEFAULT '0',
  819.   `bgpLocalAs` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  820.   `sysObjectID` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  821.   `sysDescr` text COLLATE utf8_unicode_ci,
  822.   `sysContact` text COLLATE utf8_unicode_ci,
  823.   `version` text COLLATE utf8_unicode_ci,
  824.   `hardware` text COLLATE utf8_unicode_ci,
  825.   `features` text COLLATE utf8_unicode_ci,
  826.   `location` text COLLATE utf8_unicode_ci,
  827.   `os` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  828.   `status` tinyint(4) NOT NULL DEFAULT '0',
  829.   `status_reason` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  830.   `ignore` tinyint(4) NOT NULL DEFAULT '0',
  831.   `disabled` tinyint(1) NOT NULL DEFAULT '0',
  832.   `uptime` bigint(20) DEFAULT NULL,
  833.   `agent_uptime` int(11) NOT NULL DEFAULT '0',
  834.   `last_polled` timestamp NULL DEFAULT NULL,
  835.   `last_poll_attempted` timestamp NULL DEFAULT NULL,
  836.   `last_polled_timetaken` double(5,2) DEFAULT NULL,
  837.   `last_discovered_timetaken` double(5,2) DEFAULT NULL,
  838.   `last_discovered` timestamp NULL DEFAULT NULL,
  839.   `last_ping` timestamp NULL DEFAULT NULL,
  840.   `last_ping_timetaken` double(5,2) DEFAULT NULL,
  841.   `purpose` text COLLATE utf8_unicode_ci,
  842.   `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  843.   `serial` text COLLATE utf8_unicode_ci,
  844.   `icon` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  845.   `poller_group` int(11) NOT NULL DEFAULT '0',
  846.   `override_sysLocation` tinyint(1) DEFAULT '0',
  847.   `notes` text COLLATE utf8_unicode_ci,
  848.   `port_association_mode` int(11) NOT NULL DEFAULT '1',
  849.   PRIMARY KEY (`device_id`),
  850.   KEY `status` (`status`),
  851.   KEY `hostname` (`hostname`),
  852.   KEY `sysName` (`sysName`),
  853.   KEY `os` (`os`),
  854.   KEY `last_polled` (`last_polled`),
  855.   KEY `last_poll_attempted` (`last_poll_attempted`)
  856. ) ENGINE=InnoDB AUTO_INCREMENT=94 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  857. /*!40101 SET character_set_client = @saved_cs_client */;
  858.  
  859. --
  860. -- Table structure for table `devices_attribs`
  861. --
  862.  
  863. DROP TABLE IF EXISTS `devices_attribs`;
  864. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  865. /*!40101 SET character_set_client = utf8 */;
  866. CREATE TABLE `devices_attribs` (
  867.   `attrib_id` int(11) NOT NULL AUTO_INCREMENT,
  868.   `device_id` int(11) NOT NULL,
  869.   `attrib_type` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  870.   `attrib_value` text COLLATE utf8_unicode_ci NOT NULL,
  871.   `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  872.   PRIMARY KEY (`attrib_id`),
  873.   KEY `device_id` (`device_id`)
  874. ) ENGINE=InnoDB AUTO_INCREMENT=313 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  875. /*!40101 SET character_set_client = @saved_cs_client */;
  876.  
  877. --
  878. -- Table structure for table `devices_perms`
  879. --
  880.  
  881. DROP TABLE IF EXISTS `devices_perms`;
  882. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  883. /*!40101 SET character_set_client = utf8 */;
  884. CREATE TABLE `devices_perms` (
  885.   `user_id` int(11) NOT NULL,
  886.   `device_id` int(11) NOT NULL,
  887.   `access_level` int(4) NOT NULL DEFAULT '0',
  888.   PRIMARY KEY (`user_id`,`device_id`),
  889.   KEY `user_id` (`user_id`)
  890. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  891. /*!40101 SET character_set_client = @saved_cs_client */;
  892.  
  893. --
  894. -- Table structure for table `entPhysical`
  895. --
  896.  
  897. DROP TABLE IF EXISTS `entPhysical`;
  898. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  899. /*!40101 SET character_set_client = utf8 */;
  900. CREATE TABLE `entPhysical` (
  901.   `entPhysical_id` int(11) NOT NULL AUTO_INCREMENT,
  902.   `device_id` int(11) NOT NULL,
  903.   `entPhysicalIndex` int(11) NOT NULL,
  904.   `entPhysicalDescr` text COLLATE utf8_unicode_ci NOT NULL,
  905.   `entPhysicalClass` text COLLATE utf8_unicode_ci NOT NULL,
  906.   `entPhysicalName` text COLLATE utf8_unicode_ci NOT NULL,
  907.   `entPhysicalHardwareRev` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  908.   `entPhysicalFirmwareRev` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  909.   `entPhysicalSoftwareRev` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  910.   `entPhysicalAlias` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  911.   `entPhysicalAssetID` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  912.   `entPhysicalIsFRU` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL,
  913.   `entPhysicalModelName` text COLLATE utf8_unicode_ci NOT NULL,
  914.   `entPhysicalVendorType` text COLLATE utf8_unicode_ci,
  915.   `entPhysicalSerialNum` text COLLATE utf8_unicode_ci NOT NULL,
  916.   `entPhysicalContainedIn` int(11) NOT NULL,
  917.   `entPhysicalParentRelPos` int(11) NOT NULL,
  918.   `entPhysicalMfgName` text COLLATE utf8_unicode_ci NOT NULL,
  919.   `ifIndex` int(11) DEFAULT NULL,
  920.   PRIMARY KEY (`entPhysical_id`),
  921.   KEY `device_id` (`device_id`)
  922. ) ENGINE=InnoDB AUTO_INCREMENT=3073 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  923. /*!40101 SET character_set_client = @saved_cs_client */;
  924.  
  925. --
  926. -- Table structure for table `entPhysical_state`
  927. --
  928.  
  929. DROP TABLE IF EXISTS `entPhysical_state`;
  930. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  931. /*!40101 SET character_set_client = utf8 */;
  932. CREATE TABLE `entPhysical_state` (
  933.   `device_id` int(11) NOT NULL,
  934.   `entPhysicalIndex` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  935.   `subindex` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  936.   `group` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  937.   `key` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  938.   `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  939.   KEY `device_id_index` (`device_id`,`entPhysicalIndex`)
  940. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  941. /*!40101 SET character_set_client = @saved_cs_client */;
  942.  
  943. --
  944. -- Table structure for table `entityState`
  945. --
  946.  
  947. DROP TABLE IF EXISTS `entityState`;
  948. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  949. /*!40101 SET character_set_client = utf8 */;
  950. CREATE TABLE `entityState` (
  951.   `entity_state_id` int(11) NOT NULL AUTO_INCREMENT,
  952.   `device_id` int(11) DEFAULT NULL,
  953.   `entPhysical_id` int(11) DEFAULT NULL,
  954.   `entStateLastChanged` datetime DEFAULT NULL,
  955.   `entStateAdmin` int(11) DEFAULT NULL,
  956.   `entStateOper` int(11) DEFAULT NULL,
  957.   `entStateUsage` int(11) DEFAULT NULL,
  958.   `entStateAlarm` text COLLATE utf8_unicode_ci,
  959.   `entStateStandby` int(11) DEFAULT NULL,
  960.   PRIMARY KEY (`entity_state_id`),
  961.   KEY `entityState_device_id_index` (`device_id`)
  962. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  963. /*!40101 SET character_set_client = @saved_cs_client */;
  964.  
  965. --
  966. -- Table structure for table `eventlog`
  967. --
  968.  
  969. DROP TABLE IF EXISTS `eventlog`;
  970. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  971. /*!40101 SET character_set_client = utf8 */;
  972. CREATE TABLE `eventlog` (
  973.   `event_id` int(11) NOT NULL AUTO_INCREMENT,
  974.   `host` int(11) NOT NULL DEFAULT '0',
  975.   `device_id` int(11) NOT NULL,
  976.   `datetime` datetime NOT NULL DEFAULT '1970-01-02 00:00:01',
  977.   `message` text COLLATE utf8_unicode_ci,
  978.   `type` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  979.   `reference` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  980.   `username` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  981.   `severity` int(1) DEFAULT '2',
  982.   PRIMARY KEY (`event_id`),
  983.   KEY `host` (`host`),
  984.   KEY `datetime` (`datetime`),
  985.   KEY `device_id` (`device_id`)
  986. ) ENGINE=InnoDB AUTO_INCREMENT=4948948 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  987. /*!40101 SET character_set_client = @saved_cs_client */;
  988.  
  989. --
  990. -- Table structure for table `graph_types`
  991. --
  992.  
  993. DROP TABLE IF EXISTS `graph_types`;
  994. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  995. /*!40101 SET character_set_client = utf8 */;
  996. CREATE TABLE `graph_types` (
  997.   `graph_type` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  998.   `graph_subtype` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  999.   `graph_section` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1000.   `graph_descr` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1001.   `graph_order` int(11) NOT NULL,
  1002.   PRIMARY KEY (`graph_type`,`graph_subtype`,`graph_section`),
  1003.   KEY `graph_type` (`graph_type`),
  1004.   KEY `graph_subtype` (`graph_subtype`),
  1005.   KEY `graph_section` (`graph_section`)
  1006. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1007. /*!40101 SET character_set_client = @saved_cs_client */;
  1008.  
  1009. --
  1010. -- Table structure for table `graph_types_dead`
  1011. --
  1012.  
  1013. DROP TABLE IF EXISTS `graph_types_dead`;
  1014. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1015. /*!40101 SET character_set_client = utf8 */;
  1016. CREATE TABLE `graph_types_dead` (
  1017.   `graph_type` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1018.   `graph_subtype` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1019.   `graph_section` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1020.   `graph_descr` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1021.   `graph_order` int(11) NOT NULL,
  1022.   KEY `graph_type` (`graph_type`),
  1023.   KEY `graph_subtype` (`graph_subtype`),
  1024.   KEY `graph_section` (`graph_section`)
  1025. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1026. /*!40101 SET character_set_client = @saved_cs_client */;
  1027.  
  1028. --
  1029. -- Table structure for table `hrDevice`
  1030. --
  1031.  
  1032. DROP TABLE IF EXISTS `hrDevice`;
  1033. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1034. /*!40101 SET character_set_client = utf8 */;
  1035. CREATE TABLE `hrDevice` (
  1036.   `hrDevice_id` int(11) NOT NULL AUTO_INCREMENT,
  1037.   `device_id` int(11) NOT NULL,
  1038.   `hrDeviceIndex` int(11) NOT NULL,
  1039.   `hrDeviceDescr` text COLLATE utf8_unicode_ci NOT NULL,
  1040.   `hrDeviceType` text COLLATE utf8_unicode_ci NOT NULL,
  1041.   `hrDeviceErrors` int(11) NOT NULL DEFAULT '0',
  1042.   `hrDeviceStatus` text COLLATE utf8_unicode_ci NOT NULL,
  1043.   `hrProcessorLoad` tinyint(4) DEFAULT NULL,
  1044.   PRIMARY KEY (`hrDevice_id`),
  1045.   KEY `device_id` (`device_id`)
  1046. ) ENGINE=InnoDB AUTO_INCREMENT=391 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1047. /*!40101 SET character_set_client = @saved_cs_client */;
  1048.  
  1049. --
  1050. -- Table structure for table `ipsec_tunnels`
  1051. --
  1052.  
  1053. DROP TABLE IF EXISTS `ipsec_tunnels`;
  1054. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1055. /*!40101 SET character_set_client = utf8 */;
  1056. CREATE TABLE `ipsec_tunnels` (
  1057.   `tunnel_id` int(11) NOT NULL AUTO_INCREMENT,
  1058.   `device_id` int(11) NOT NULL,
  1059.   `peer_port` int(11) NOT NULL,
  1060.   `peer_addr` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1061.   `local_addr` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1062.   `local_port` int(11) NOT NULL,
  1063.   `tunnel_name` varchar(96) COLLATE utf8_unicode_ci NOT NULL,
  1064.   `tunnel_status` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
  1065.   PRIMARY KEY (`tunnel_id`),
  1066.   UNIQUE KEY `unique_index` (`device_id`,`peer_addr`)
  1067. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1068. /*!40101 SET character_set_client = @saved_cs_client */;
  1069.  
  1070. --
  1071. -- Table structure for table `ipv4_addresses`
  1072. --
  1073.  
  1074. DROP TABLE IF EXISTS `ipv4_addresses`;
  1075. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1076. /*!40101 SET character_set_client = utf8 */;
  1077. CREATE TABLE `ipv4_addresses` (
  1078.   `ipv4_address_id` int(11) NOT NULL AUTO_INCREMENT,
  1079.   `ipv4_address` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1080.   `ipv4_prefixlen` int(11) NOT NULL,
  1081.   `ipv4_network_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1082.   `port_id` int(11) NOT NULL,
  1083.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1084.   PRIMARY KEY (`ipv4_address_id`),
  1085.   KEY `interface_id` (`port_id`),
  1086.   KEY `interface_id_2` (`port_id`)
  1087. ) ENGINE=InnoDB AUTO_INCREMENT=25729 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1088. /*!40101 SET character_set_client = @saved_cs_client */;
  1089.  
  1090. --
  1091. -- Table structure for table `ipv4_mac`
  1092. --
  1093.  
  1094. DROP TABLE IF EXISTS `ipv4_mac`;
  1095. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1096. /*!40101 SET character_set_client = utf8 */;
  1097. CREATE TABLE `ipv4_mac` (
  1098.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1099.   `port_id` int(11) NOT NULL,
  1100.   `device_id` int(11) DEFAULT NULL,
  1101.   `mac_address` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1102.   `ipv4_address` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1103.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1104.   UNIQUE KEY `id` (`id`),
  1105.   KEY `port_id` (`port_id`),
  1106.   KEY `mac_address` (`mac_address`)
  1107. ) ENGINE=InnoDB AUTO_INCREMENT=108178 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1108. /*!40101 SET character_set_client = @saved_cs_client */;
  1109.  
  1110. --
  1111. -- Table structure for table `ipv4_networks`
  1112. --
  1113.  
  1114. DROP TABLE IF EXISTS `ipv4_networks`;
  1115. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1116. /*!40101 SET character_set_client = utf8 */;
  1117. CREATE TABLE `ipv4_networks` (
  1118.   `ipv4_network_id` int(11) NOT NULL AUTO_INCREMENT,
  1119.   `ipv4_network` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1120.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1121.   PRIMARY KEY (`ipv4_network_id`)
  1122. ) ENGINE=InnoDB AUTO_INCREMENT=25570 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1123. /*!40101 SET character_set_client = @saved_cs_client */;
  1124.  
  1125. --
  1126. -- Table structure for table `ipv6_addresses`
  1127. --
  1128.  
  1129. DROP TABLE IF EXISTS `ipv6_addresses`;
  1130. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1131. /*!40101 SET character_set_client = utf8 */;
  1132. CREATE TABLE `ipv6_addresses` (
  1133.   `ipv6_address_id` int(11) NOT NULL AUTO_INCREMENT,
  1134.   `ipv6_address` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1135.   `ipv6_compressed` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1136.   `ipv6_prefixlen` int(11) NOT NULL,
  1137.   `ipv6_origin` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  1138.   `ipv6_network_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1139.   `port_id` int(11) NOT NULL,
  1140.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1141.   PRIMARY KEY (`ipv6_address_id`),
  1142.   KEY `interface_id` (`port_id`),
  1143.   KEY `interface_id_2` (`port_id`)
  1144. ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1145. /*!40101 SET character_set_client = @saved_cs_client */;
  1146.  
  1147. --
  1148. -- Table structure for table `ipv6_networks`
  1149. --
  1150.  
  1151. DROP TABLE IF EXISTS `ipv6_networks`;
  1152. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1153. /*!40101 SET character_set_client = utf8 */;
  1154. CREATE TABLE `ipv6_networks` (
  1155.   `ipv6_network_id` int(11) NOT NULL AUTO_INCREMENT,
  1156.   `ipv6_network` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1157.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1158.   PRIMARY KEY (`ipv6_network_id`)
  1159. ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1160. /*!40101 SET character_set_client = @saved_cs_client */;
  1161.  
  1162. --
  1163. -- Table structure for table `juniAtmVp`
  1164. --
  1165.  
  1166. DROP TABLE IF EXISTS `juniAtmVp`;
  1167. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1168. /*!40101 SET character_set_client = utf8 */;
  1169. CREATE TABLE `juniAtmVp` (
  1170.   `juniAtmVp_id` int(11) NOT NULL,
  1171.   `port_id` int(11) NOT NULL,
  1172.   `vp_id` int(11) NOT NULL,
  1173.   `vp_descr` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1174.   KEY `port_id` (`port_id`)
  1175. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1176. /*!40101 SET character_set_client = @saved_cs_client */;
  1177.  
  1178. --
  1179. -- Table structure for table `links`
  1180. --
  1181.  
  1182. DROP TABLE IF EXISTS `links`;
  1183. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1184. /*!40101 SET character_set_client = utf8 */;
  1185. CREATE TABLE `links` (
  1186.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1187.   `local_port_id` int(11) DEFAULT NULL,
  1188.   `local_device_id` int(11) NOT NULL,
  1189.   `remote_port_id` int(11) DEFAULT NULL,
  1190.   `active` tinyint(4) NOT NULL DEFAULT '1',
  1191.   `protocol` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL,
  1192.   `remote_hostname` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1193.   `remote_device_id` int(11) NOT NULL,
  1194.   `remote_port` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1195.   `remote_platform` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL,
  1196.   `remote_version` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  1197.   PRIMARY KEY (`id`),
  1198.   KEY `src_if` (`local_port_id`),
  1199.   KEY `dst_if` (`remote_port_id`),
  1200.   KEY `local_device_id` (`local_device_id`,`remote_device_id`)
  1201. ) ENGINE=InnoDB AUTO_INCREMENT=271 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1202. /*!40101 SET character_set_client = @saved_cs_client */;
  1203.  
  1204. --
  1205. -- Table structure for table `loadbalancer_rservers`
  1206. --
  1207.  
  1208. DROP TABLE IF EXISTS `loadbalancer_rservers`;
  1209. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1210. /*!40101 SET character_set_client = utf8 */;
  1211. CREATE TABLE `loadbalancer_rservers` (
  1212.   `rserver_id` int(11) NOT NULL AUTO_INCREMENT,
  1213.   `farm_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1214.   `device_id` int(11) NOT NULL,
  1215.   `StateDescr` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1216.   PRIMARY KEY (`rserver_id`)
  1217. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1218. /*!40101 SET character_set_client = @saved_cs_client */;
  1219.  
  1220. --
  1221. -- Table structure for table `loadbalancer_vservers`
  1222. --
  1223.  
  1224. DROP TABLE IF EXISTS `loadbalancer_vservers`;
  1225. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1226. /*!40101 SET character_set_client = utf8 */;
  1227. CREATE TABLE `loadbalancer_vservers` (
  1228.   `classmap_id` int(11) NOT NULL,
  1229.   `classmap` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1230.   `serverstate` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1231.   `device_id` int(11) NOT NULL,
  1232.   KEY `device_id` (`device_id`)
  1233. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1234. /*!40101 SET character_set_client = @saved_cs_client */;
  1235.  
  1236. --
  1237. -- Table structure for table `locations`
  1238. --
  1239.  
  1240. DROP TABLE IF EXISTS `locations`;
  1241. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1242. /*!40101 SET character_set_client = utf8 */;
  1243. CREATE TABLE `locations` (
  1244.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1245.   `location` text COLLATE utf8_unicode_ci NOT NULL,
  1246.   `lat` float(10,6) NOT NULL,
  1247.   `lng` float(10,6) NOT NULL,
  1248.   `timestamp` datetime NOT NULL,
  1249.   PRIMARY KEY (`id`),
  1250.   KEY `id` (`id`)
  1251. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1252. /*!40101 SET character_set_client = @saved_cs_client */;
  1253.  
  1254. --
  1255. -- Table structure for table `mac_accounting`
  1256. --
  1257.  
  1258. DROP TABLE IF EXISTS `mac_accounting`;
  1259. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1260. /*!40101 SET character_set_client = utf8 */;
  1261. CREATE TABLE `mac_accounting` (
  1262.   `ma_id` int(11) NOT NULL AUTO_INCREMENT,
  1263.   `port_id` int(11) NOT NULL,
  1264.   `mac` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1265.   `in_oid` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1266.   `out_oid` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1267.   `bps_out` int(11) NOT NULL,
  1268.   `bps_in` int(11) NOT NULL,
  1269.   `cipMacHCSwitchedBytes_input` bigint(20) DEFAULT NULL,
  1270.   `cipMacHCSwitchedBytes_input_prev` bigint(20) DEFAULT NULL,
  1271.   `cipMacHCSwitchedBytes_input_delta` bigint(20) DEFAULT NULL,
  1272.   `cipMacHCSwitchedBytes_input_rate` int(11) DEFAULT NULL,
  1273.   `cipMacHCSwitchedBytes_output` bigint(20) DEFAULT NULL,
  1274.   `cipMacHCSwitchedBytes_output_prev` bigint(20) DEFAULT NULL,
  1275.   `cipMacHCSwitchedBytes_output_delta` bigint(20) DEFAULT NULL,
  1276.   `cipMacHCSwitchedBytes_output_rate` int(11) DEFAULT NULL,
  1277.   `cipMacHCSwitchedPkts_input` bigint(20) DEFAULT NULL,
  1278.   `cipMacHCSwitchedPkts_input_prev` bigint(20) DEFAULT NULL,
  1279.   `cipMacHCSwitchedPkts_input_delta` bigint(20) DEFAULT NULL,
  1280.   `cipMacHCSwitchedPkts_input_rate` int(11) DEFAULT NULL,
  1281.   `cipMacHCSwitchedPkts_output` bigint(20) DEFAULT NULL,
  1282.   `cipMacHCSwitchedPkts_output_prev` bigint(20) DEFAULT NULL,
  1283.   `cipMacHCSwitchedPkts_output_delta` bigint(20) DEFAULT NULL,
  1284.   `cipMacHCSwitchedPkts_output_rate` int(11) DEFAULT NULL,
  1285.   `poll_time` int(11) DEFAULT NULL,
  1286.   `poll_prev` int(11) DEFAULT NULL,
  1287.   `poll_period` int(11) DEFAULT NULL,
  1288.   PRIMARY KEY (`ma_id`),
  1289.   KEY `interface_id` (`port_id`),
  1290.   KEY `interface_id_2` (`port_id`)
  1291. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1292. /*!40101 SET character_set_client = @saved_cs_client */;
  1293.  
  1294. --
  1295. -- Table structure for table `mefinfo`
  1296. --
  1297.  
  1298. DROP TABLE IF EXISTS `mefinfo`;
  1299. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1300. /*!40101 SET character_set_client = utf8 */;
  1301. CREATE TABLE `mefinfo` (
  1302.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1303.   `device_id` int(11) NOT NULL,
  1304.   `mefID` int(32) NOT NULL,
  1305.   `mefType` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1306.   `mefIdent` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1307.   `mefMTU` int(16) NOT NULL DEFAULT '1500',
  1308.   `mefAdmState` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1309.   `mefRowState` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1310.   PRIMARY KEY (`id`),
  1311.   KEY `device_id` (`device_id`),
  1312.   KEY `mefID` (`mefID`)
  1313. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1314. /*!40101 SET character_set_client = @saved_cs_client */;
  1315.  
  1316. --
  1317. -- Table structure for table `mempools`
  1318. --
  1319.  
  1320. DROP TABLE IF EXISTS `mempools`;
  1321. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1322. /*!40101 SET character_set_client = utf8 */;
  1323. CREATE TABLE `mempools` (
  1324.   `mempool_id` int(11) NOT NULL AUTO_INCREMENT,
  1325.   `mempool_index` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  1326.   `entPhysicalIndex` int(11) DEFAULT NULL,
  1327.   `hrDeviceIndex` int(11) DEFAULT NULL,
  1328.   `mempool_type` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1329.   `mempool_precision` int(11) NOT NULL DEFAULT '1',
  1330.   `mempool_descr` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1331.   `device_id` int(11) NOT NULL,
  1332.   `mempool_perc` int(11) NOT NULL,
  1333.   `mempool_used` bigint(16) NOT NULL,
  1334.   `mempool_free` bigint(16) NOT NULL,
  1335.   `mempool_total` bigint(16) NOT NULL,
  1336.   `mempool_largestfree` bigint(16) DEFAULT NULL,
  1337.   `mempool_lowestfree` bigint(16) DEFAULT NULL,
  1338.   `mempool_deleted` tinyint(1) NOT NULL DEFAULT '0',
  1339.   `mempool_perc_warn` int(11) DEFAULT '75',
  1340.   PRIMARY KEY (`mempool_id`),
  1341.   KEY `device_id` (`device_id`)
  1342. ) ENGINE=InnoDB AUTO_INCREMENT=262 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1343. /*!40101 SET character_set_client = @saved_cs_client */;
  1344.  
  1345. --
  1346. -- Table structure for table `mibdefs`
  1347. --
  1348.  
  1349. DROP TABLE IF EXISTS `mibdefs`;
  1350. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1351. /*!40101 SET character_set_client = utf8 */;
  1352. CREATE TABLE `mibdefs` (
  1353.   `module` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1354.   `mib` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1355.   `object_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1356.   `oid` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1357.   `syntax` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1358.   `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1359.   `max_access` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1360.   `status` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1361.   `included_by` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1362.   `last_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  1363.   PRIMARY KEY (`module`,`mib`,`object_type`)
  1364. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='MIB definitions';
  1365. /*!40101 SET character_set_client = @saved_cs_client */;
  1366.  
  1367. --
  1368. -- Table structure for table `munin_plugins`
  1369. --
  1370.  
  1371. DROP TABLE IF EXISTS `munin_plugins`;
  1372. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1373. /*!40101 SET character_set_client = utf8 */;
  1374. CREATE TABLE `munin_plugins` (
  1375.   `mplug_id` int(11) NOT NULL AUTO_INCREMENT,
  1376.   `device_id` int(11) NOT NULL,
  1377.   `mplug_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1378.   `mplug_instance` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1379.   `mplug_category` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1380.   `mplug_title` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1381.   `mplug_info` text COLLATE utf8_unicode_ci,
  1382.   `mplug_vlabel` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1383.   `mplug_args` varchar(512) COLLATE utf8_unicode_ci DEFAULT NULL,
  1384.   `mplug_total` binary(1) NOT NULL DEFAULT '0',
  1385.   `mplug_graph` binary(1) NOT NULL DEFAULT '1',
  1386.   PRIMARY KEY (`mplug_id`),
  1387.   UNIQUE KEY `UNIQUE` (`device_id`,`mplug_type`),
  1388.   KEY `device_id` (`device_id`)
  1389. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1390. /*!40101 SET character_set_client = @saved_cs_client */;
  1391.  
  1392. --
  1393. -- Table structure for table `munin_plugins_ds`
  1394. --
  1395.  
  1396. DROP TABLE IF EXISTS `munin_plugins_ds`;
  1397. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1398. /*!40101 SET character_set_client = utf8 */;
  1399. CREATE TABLE `munin_plugins_ds` (
  1400.   `mplug_id` int(11) NOT NULL,
  1401.   `ds_name` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1402.   `ds_type` enum('COUNTER','ABSOLUTE','DERIVE','GAUGE') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'GAUGE',
  1403.   `ds_label` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1404.   `ds_cdef` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1405.   `ds_draw` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1406.   `ds_graph` enum('no','yes') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'yes',
  1407.   `ds_info` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1408.   `ds_extinfo` text COLLATE utf8_unicode_ci NOT NULL,
  1409.   `ds_max` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1410.   `ds_min` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1411.   `ds_negative` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1412.   `ds_warning` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1413.   `ds_critical` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1414.   `ds_colour` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1415.   `ds_sum` text COLLATE utf8_unicode_ci NOT NULL,
  1416.   `ds_stack` text COLLATE utf8_unicode_ci NOT NULL,
  1417.   `ds_line` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1418.   UNIQUE KEY `splug_id` (`mplug_id`,`ds_name`)
  1419. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1420. /*!40101 SET character_set_client = @saved_cs_client */;
  1421.  
  1422. --
  1423. -- Table structure for table `netscaler_vservers`
  1424. --
  1425.  
  1426. DROP TABLE IF EXISTS `netscaler_vservers`;
  1427. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1428. /*!40101 SET character_set_client = utf8 */;
  1429. CREATE TABLE `netscaler_vservers` (
  1430.   `vsvr_id` int(11) NOT NULL AUTO_INCREMENT,
  1431.   `device_id` int(11) NOT NULL,
  1432.   `vsvr_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1433.   `vsvr_ip` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1434.   `vsvr_port` int(8) NOT NULL,
  1435.   `vsvr_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1436.   `vsvr_state` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1437.   `vsvr_clients` int(11) NOT NULL,
  1438.   `vsvr_server` int(11) NOT NULL,
  1439.   `vsvr_req_rate` int(11) NOT NULL,
  1440.   `vsvr_bps_in` int(11) NOT NULL,
  1441.   `vsvr_bps_out` int(11) NOT NULL,
  1442.   PRIMARY KEY (`vsvr_id`)
  1443. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1444. /*!40101 SET character_set_client = @saved_cs_client */;
  1445.  
  1446. --
  1447. -- Table structure for table `notifications`
  1448. --
  1449.  
  1450. DROP TABLE IF EXISTS `notifications`;
  1451. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1452. /*!40101 SET character_set_client = utf8 */;
  1453. CREATE TABLE `notifications` (
  1454.   `notifications_id` int(11) NOT NULL AUTO_INCREMENT,
  1455.   `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  1456.   `body` text COLLATE utf8_unicode_ci NOT NULL,
  1457.   `severity` int(11) DEFAULT '0' COMMENT '0=ok,1=warning,2=critical',
  1458.   `source` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  1459.   `checksum` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1460.   `datetime` timestamp NOT NULL DEFAULT '1970-01-01 23:00:00',
  1461.   PRIMARY KEY (`notifications_id`),
  1462.   UNIQUE KEY `checksum` (`checksum`),
  1463.   KEY `notifications_severity_index` (`severity`)
  1464. ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1465. /*!40101 SET character_set_client = @saved_cs_client */;
  1466.  
  1467. --
  1468. -- Table structure for table `notifications_attribs`
  1469. --
  1470.  
  1471. DROP TABLE IF EXISTS `notifications_attribs`;
  1472. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1473. /*!40101 SET character_set_client = utf8 */;
  1474. CREATE TABLE `notifications_attribs` (
  1475.   `attrib_id` int(11) NOT NULL AUTO_INCREMENT,
  1476.   `notifications_id` int(11) NOT NULL,
  1477.   `user_id` int(11) NOT NULL,
  1478.   `key` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  1479.   `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  1480.   PRIMARY KEY (`attrib_id`)
  1481. ) ENGINE=InnoDB AUTO_INCREMENT=181 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1482. /*!40101 SET character_set_client = @saved_cs_client */;
  1483.  
  1484. --
  1485. -- Table structure for table `ospf_areas`
  1486. --
  1487.  
  1488. DROP TABLE IF EXISTS `ospf_areas`;
  1489. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1490. /*!40101 SET character_set_client = utf8 */;
  1491. CREATE TABLE `ospf_areas` (
  1492.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1493.   `device_id` int(11) NOT NULL,
  1494.   `ospfAreaId` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1495.   `ospfAuthType` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1496.   `ospfImportAsExtern` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  1497.   `ospfSpfRuns` int(11) NOT NULL,
  1498.   `ospfAreaBdrRtrCount` int(11) NOT NULL,
  1499.   `ospfAsBdrRtrCount` int(11) NOT NULL,
  1500.   `ospfAreaLsaCount` int(11) NOT NULL,
  1501.   `ospfAreaLsaCksumSum` int(11) NOT NULL,
  1502.   `ospfAreaSummary` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1503.   `ospfAreaStatus` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1504.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1505.   UNIQUE KEY `id` (`id`),
  1506.   UNIQUE KEY `device_area` (`device_id`,`ospfAreaId`,`context_name`)
  1507. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1508. /*!40101 SET character_set_client = @saved_cs_client */;
  1509.  
  1510. --
  1511. -- Table structure for table `ospf_instances`
  1512. --
  1513.  
  1514. DROP TABLE IF EXISTS `ospf_instances`;
  1515. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1516. /*!40101 SET character_set_client = utf8 */;
  1517. CREATE TABLE `ospf_instances` (
  1518.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1519.   `device_id` int(11) NOT NULL,
  1520.   `ospf_instance_id` int(11) NOT NULL,
  1521.   `ospfRouterId` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1522.   `ospfAdminStat` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1523.   `ospfVersionNumber` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1524.   `ospfAreaBdrRtrStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1525.   `ospfASBdrRtrStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1526.   `ospfExternLsaCount` int(11) NOT NULL,
  1527.   `ospfExternLsaCksumSum` int(11) NOT NULL,
  1528.   `ospfTOSSupport` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1529.   `ospfOriginateNewLsas` int(11) NOT NULL,
  1530.   `ospfRxNewLsas` int(11) NOT NULL,
  1531.   `ospfExtLsdbLimit` int(11) DEFAULT NULL,
  1532.   `ospfMulticastExtensions` int(11) DEFAULT NULL,
  1533.   `ospfExitOverflowInterval` int(11) DEFAULT NULL,
  1534.   `ospfDemandExtensions` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1535.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1536.   UNIQUE KEY `id` (`id`),
  1537.   UNIQUE KEY `device_id` (`device_id`,`ospf_instance_id`,`context_name`)
  1538. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1539. /*!40101 SET character_set_client = @saved_cs_client */;
  1540.  
  1541. --
  1542. -- Table structure for table `ospf_nbrs`
  1543. --
  1544.  
  1545. DROP TABLE IF EXISTS `ospf_nbrs`;
  1546. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1547. /*!40101 SET character_set_client = utf8 */;
  1548. CREATE TABLE `ospf_nbrs` (
  1549.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1550.   `device_id` int(11) NOT NULL,
  1551.   `port_id` int(11) NOT NULL,
  1552.   `ospf_nbr_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1553.   `ospfNbrIpAddr` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1554.   `ospfNbrAddressLessIndex` int(11) NOT NULL,
  1555.   `ospfNbrRtrId` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1556.   `ospfNbrOptions` int(11) NOT NULL,
  1557.   `ospfNbrPriority` int(11) NOT NULL,
  1558.   `ospfNbrState` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1559.   `ospfNbrEvents` int(11) NOT NULL,
  1560.   `ospfNbrLsRetransQLen` int(11) NOT NULL,
  1561.   `ospfNbmaNbrStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1562.   `ospfNbmaNbrPermanence` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1563.   `ospfNbrHelloSuppressed` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1564.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1565.   UNIQUE KEY `id` (`id`),
  1566.   UNIQUE KEY `device_id` (`device_id`,`ospf_nbr_id`,`context_name`)
  1567. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1568. /*!40101 SET character_set_client = @saved_cs_client */;
  1569.  
  1570. --
  1571. -- Table structure for table `ospf_ports`
  1572. --
  1573.  
  1574. DROP TABLE IF EXISTS `ospf_ports`;
  1575. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1576. /*!40101 SET character_set_client = utf8 */;
  1577. CREATE TABLE `ospf_ports` (
  1578.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1579.   `device_id` int(11) NOT NULL,
  1580.   `port_id` int(11) NOT NULL,
  1581.   `ospf_port_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1582.   `ospfIfIpAddress` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1583.   `ospfAddressLessIf` int(11) NOT NULL,
  1584.   `ospfIfAreaId` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1585.   `ospfIfType` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1586.   `ospfIfAdminStat` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1587.   `ospfIfRtrPriority` int(11) DEFAULT NULL,
  1588.   `ospfIfTransitDelay` int(11) DEFAULT NULL,
  1589.   `ospfIfRetransInterval` int(11) DEFAULT NULL,
  1590.   `ospfIfHelloInterval` int(11) DEFAULT NULL,
  1591.   `ospfIfRtrDeadInterval` int(11) DEFAULT NULL,
  1592.   `ospfIfPollInterval` int(11) DEFAULT NULL,
  1593.   `ospfIfState` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1594.   `ospfIfDesignatedRouter` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1595.   `ospfIfBackupDesignatedRouter` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1596.   `ospfIfEvents` int(11) DEFAULT NULL,
  1597.   `ospfIfAuthKey` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1598.   `ospfIfStatus` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1599.   `ospfIfMulticastForwarding` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1600.   `ospfIfDemand` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1601.   `ospfIfAuthType` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1602.   `context_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1603.   UNIQUE KEY `id` (`id`),
  1604.   UNIQUE KEY `device_id` (`device_id`,`ospf_port_id`,`context_name`)
  1605. ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1606. /*!40101 SET character_set_client = @saved_cs_client */;
  1607.  
  1608. --
  1609. -- Table structure for table `packages`
  1610. --
  1611.  
  1612. DROP TABLE IF EXISTS `packages`;
  1613. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1614. /*!40101 SET character_set_client = utf8 */;
  1615. CREATE TABLE `packages` (
  1616.   `pkg_id` int(11) NOT NULL AUTO_INCREMENT,
  1617.   `device_id` int(11) NOT NULL,
  1618.   `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1619.   `manager` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT '1',
  1620.   `status` tinyint(1) NOT NULL,
  1621.   `version` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1622.   `build` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1623.   `arch` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  1624.   `size` bigint(20) DEFAULT NULL,
  1625.   PRIMARY KEY (`pkg_id`),
  1626.   UNIQUE KEY `unique_key` (`device_id`,`name`,`manager`,`arch`,`version`,`build`),
  1627.   KEY `device_id` (`device_id`)
  1628. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1629. /*!40101 SET character_set_client = @saved_cs_client */;
  1630.  
  1631. --
  1632. -- Table structure for table `pdb_ix`
  1633. --
  1634.  
  1635. DROP TABLE IF EXISTS `pdb_ix`;
  1636. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1637. /*!40101 SET character_set_client = utf8 */;
  1638. CREATE TABLE `pdb_ix` (
  1639.   `pdb_ix_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  1640.   `ix_id` int(10) unsigned NOT NULL,
  1641.   `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1642.   `asn` int(10) unsigned NOT NULL,
  1643.   `timestamp` int(10) unsigned NOT NULL,
  1644.   PRIMARY KEY (`pdb_ix_id`)
  1645. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1646. /*!40101 SET character_set_client = @saved_cs_client */;
  1647.  
  1648. --
  1649. -- Table structure for table `pdb_ix_peers`
  1650. --
  1651.  
  1652. DROP TABLE IF EXISTS `pdb_ix_peers`;
  1653. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1654. /*!40101 SET character_set_client = utf8 */;
  1655. CREATE TABLE `pdb_ix_peers` (
  1656.   `pdb_ix_peers_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  1657.   `ix_id` int(10) unsigned NOT NULL,
  1658.   `peer_id` int(10) unsigned NOT NULL,
  1659.   `remote_asn` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  1660.   `remote_ipaddr4` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
  1661.   `remote_ipaddr6` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1662.   `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1663.   `timestamp` int(10) unsigned DEFAULT NULL,
  1664.   PRIMARY KEY (`pdb_ix_peers_id`)
  1665. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1666. /*!40101 SET character_set_client = @saved_cs_client */;
  1667.  
  1668. --
  1669. -- Table structure for table `perf_times`
  1670. --
  1671.  
  1672. DROP TABLE IF EXISTS `perf_times`;
  1673. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1674. /*!40101 SET character_set_client = utf8 */;
  1675. CREATE TABLE `perf_times` (
  1676.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1677.   `type` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  1678.   `doing` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  1679.   `start` int(11) NOT NULL,
  1680.   `duration` double(8,2) NOT NULL,
  1681.   `devices` int(11) NOT NULL,
  1682.   `poller` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1683.   PRIMARY KEY (`id`),
  1684.   KEY `type` (`type`)
  1685. ) ENGINE=InnoDB AUTO_INCREMENT=2443861 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1686. /*!40101 SET character_set_client = @saved_cs_client */;
  1687.  
  1688. --
  1689. -- Table structure for table `plugins`
  1690. --
  1691.  
  1692. DROP TABLE IF EXISTS `plugins`;
  1693. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1694. /*!40101 SET character_set_client = utf8 */;
  1695. CREATE TABLE `plugins` (
  1696.   `plugin_id` int(11) NOT NULL AUTO_INCREMENT,
  1697.   `plugin_name` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  1698.   `plugin_active` int(11) NOT NULL,
  1699.   PRIMARY KEY (`plugin_id`)
  1700. ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1701. /*!40101 SET character_set_client = @saved_cs_client */;
  1702.  
  1703. --
  1704. -- Table structure for table `poller_groups`
  1705. --
  1706.  
  1707. DROP TABLE IF EXISTS `poller_groups`;
  1708. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1709. /*!40101 SET character_set_client = utf8 */;
  1710. CREATE TABLE `poller_groups` (
  1711.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1712.   `group_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1713.   `descr` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1714.   PRIMARY KEY (`id`)
  1715. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1716. /*!40101 SET character_set_client = @saved_cs_client */;
  1717.  
  1718. --
  1719. -- Table structure for table `pollers`
  1720. --
  1721.  
  1722. DROP TABLE IF EXISTS `pollers`;
  1723. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1724. /*!40101 SET character_set_client = utf8 */;
  1725. CREATE TABLE `pollers` (
  1726.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1727.   `poller_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  1728.   `last_polled` datetime NOT NULL,
  1729.   `devices` int(11) NOT NULL,
  1730.   `time_taken` double NOT NULL,
  1731.   PRIMARY KEY (`poller_name`),
  1732.   KEY `id` (`id`)
  1733. ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1734. /*!40101 SET character_set_client = @saved_cs_client */;
  1735.  
  1736. --
  1737. -- Table structure for table `port_association_mode`
  1738. --
  1739.  
  1740. DROP TABLE IF EXISTS `port_association_mode`;
  1741. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1742. /*!40101 SET character_set_client = utf8 */;
  1743. CREATE TABLE `port_association_mode` (
  1744.   `pom_id` int(11) NOT NULL AUTO_INCREMENT,
  1745.   `name` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  1746.   PRIMARY KEY (`pom_id`)
  1747. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1748. /*!40101 SET character_set_client = @saved_cs_client */;
  1749.  
  1750. --
  1751. -- Table structure for table `ports`
  1752. --
  1753.  
  1754. DROP TABLE IF EXISTS `ports`;
  1755. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1756. /*!40101 SET character_set_client = utf8 */;
  1757. CREATE TABLE `ports` (
  1758.   `port_id` int(11) NOT NULL AUTO_INCREMENT,
  1759.   `device_id` int(11) NOT NULL DEFAULT '0',
  1760.   `port_descr_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1761.   `port_descr_descr` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1762.   `port_descr_circuit` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1763.   `port_descr_speed` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1764.   `port_descr_notes` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1765.   `ifDescr` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1766.   `ifName` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  1767.   `portName` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1768.   `ifIndex` bigint(20) DEFAULT '0',
  1769.   `ifSpeed` bigint(20) DEFAULT NULL,
  1770.   `ifConnectorPresent` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
  1771.   `ifPromiscuousMode` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
  1772.   `ifHighSpeed` int(11) DEFAULT NULL,
  1773.   `ifOperStatus` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  1774.   `ifOperStatus_prev` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  1775.   `ifAdminStatus` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  1776.   `ifAdminStatus_prev` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  1777.   `ifDuplex` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
  1778.   `ifMtu` int(11) DEFAULT NULL,
  1779.   `ifType` text COLLATE utf8_unicode_ci,
  1780.   `ifAlias` text COLLATE utf8_unicode_ci,
  1781.   `ifPhysAddress` text COLLATE utf8_unicode_ci,
  1782.   `ifHardType` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  1783.   `ifLastChange` bigint(20) unsigned NOT NULL DEFAULT '0',
  1784.   `ifVlan` varchar(8) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  1785.   `ifTrunk` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  1786.   `ifVrf` int(11) NOT NULL DEFAULT '0',
  1787.   `counter_in` int(11) DEFAULT NULL,
  1788.   `counter_out` int(11) DEFAULT NULL,
  1789.   `ignore` tinyint(1) NOT NULL DEFAULT '0',
  1790.   `disabled` tinyint(1) NOT NULL DEFAULT '0',
  1791.   `detailed` tinyint(1) NOT NULL DEFAULT '0',
  1792.   `deleted` tinyint(1) NOT NULL DEFAULT '0',
  1793.   `pagpOperationMode` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  1794.   `pagpPortState` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  1795.   `pagpPartnerDeviceId` varchar(48) COLLATE utf8_unicode_ci DEFAULT NULL,
  1796.   `pagpPartnerLearnMethod` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  1797.   `pagpPartnerIfIndex` int(11) DEFAULT NULL,
  1798.   `pagpPartnerGroupIfIndex` int(11) DEFAULT NULL,
  1799.   `pagpPartnerDeviceName` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  1800.   `pagpEthcOperationMode` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  1801.   `pagpDeviceId` varchar(48) COLLATE utf8_unicode_ci DEFAULT NULL,
  1802.   `pagpGroupIfIndex` int(11) DEFAULT NULL,
  1803.   `ifInUcastPkts` bigint(20) DEFAULT NULL,
  1804.   `ifInUcastPkts_prev` bigint(20) DEFAULT NULL,
  1805.   `ifInUcastPkts_delta` bigint(20) DEFAULT NULL,
  1806.   `ifInUcastPkts_rate` int(11) DEFAULT NULL,
  1807.   `ifOutUcastPkts` bigint(20) DEFAULT NULL,
  1808.   `ifOutUcastPkts_prev` bigint(20) DEFAULT NULL,
  1809.   `ifOutUcastPkts_delta` bigint(20) DEFAULT NULL,
  1810.   `ifOutUcastPkts_rate` int(11) DEFAULT NULL,
  1811.   `ifInErrors` bigint(20) DEFAULT NULL,
  1812.   `ifInErrors_prev` bigint(20) DEFAULT NULL,
  1813.   `ifInErrors_delta` bigint(20) DEFAULT NULL,
  1814.   `ifInErrors_rate` int(11) DEFAULT NULL,
  1815.   `ifOutErrors` bigint(20) DEFAULT NULL,
  1816.   `ifOutErrors_prev` bigint(20) DEFAULT NULL,
  1817.   `ifOutErrors_delta` bigint(20) DEFAULT NULL,
  1818.   `ifOutErrors_rate` int(11) DEFAULT NULL,
  1819.   `ifInOctets` bigint(20) DEFAULT NULL,
  1820.   `ifInOctets_prev` bigint(20) DEFAULT NULL,
  1821.   `ifInOctets_delta` bigint(20) DEFAULT NULL,
  1822.   `ifInOctets_rate` bigint(20) DEFAULT NULL,
  1823.   `ifOutOctets` bigint(20) DEFAULT NULL,
  1824.   `ifOutOctets_prev` bigint(20) DEFAULT NULL,
  1825.   `ifOutOctets_delta` bigint(20) DEFAULT NULL,
  1826.   `ifOutOctets_rate` bigint(20) DEFAULT NULL,
  1827.   `poll_time` int(11) DEFAULT NULL,
  1828.   `poll_prev` int(11) DEFAULT NULL,
  1829.   `poll_period` int(11) DEFAULT NULL,
  1830.   PRIMARY KEY (`port_id`),
  1831.   UNIQUE KEY `device_ifIndex` (`device_id`,`ifIndex`),
  1832.   KEY `if_2` (`ifDescr`)
  1833. ) ENGINE=InnoDB AUTO_INCREMENT=10603 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1834. /*!40101 SET character_set_client = @saved_cs_client */;
  1835.  
  1836. --
  1837. -- Table structure for table `ports_adsl`
  1838. --
  1839.  
  1840. DROP TABLE IF EXISTS `ports_adsl`;
  1841. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1842. /*!40101 SET character_set_client = utf8 */;
  1843. CREATE TABLE `ports_adsl` (
  1844.   `port_id` int(11) NOT NULL,
  1845.   `port_adsl_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  1846.   `adslLineCoding` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  1847.   `adslLineType` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  1848.   `adslAtucInvVendorID` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  1849.   `adslAtucInvVersionNumber` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  1850.   `adslAtucCurrSnrMgn` decimal(5,1) NOT NULL,
  1851.   `adslAtucCurrAtn` decimal(5,1) NOT NULL,
  1852.   `adslAtucCurrOutputPwr` decimal(5,1) NOT NULL,
  1853.   `adslAtucCurrAttainableRate` int(11) NOT NULL,
  1854.   `adslAtucChanCurrTxRate` int(11) NOT NULL,
  1855.   `adslAturInvSerialNumber` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  1856.   `adslAturInvVendorID` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  1857.   `adslAturInvVersionNumber` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  1858.   `adslAturChanCurrTxRate` int(11) NOT NULL,
  1859.   `adslAturCurrSnrMgn` decimal(5,1) NOT NULL,
  1860.   `adslAturCurrAtn` decimal(5,1) NOT NULL,
  1861.   `adslAturCurrOutputPwr` decimal(5,1) NOT NULL,
  1862.   `adslAturCurrAttainableRate` int(11) NOT NULL,
  1863.   UNIQUE KEY `interface_id` (`port_id`)
  1864. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1865. /*!40101 SET character_set_client = @saved_cs_client */;
  1866.  
  1867. --
  1868. -- Table structure for table `ports_fdb`
  1869. --
  1870.  
  1871. DROP TABLE IF EXISTS `ports_fdb`;
  1872. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1873. /*!40101 SET character_set_client = utf8 */;
  1874. CREATE TABLE `ports_fdb` (
  1875.   `id` int(11) NOT NULL AUTO_INCREMENT,
  1876.   `port_id` int(11) unsigned NOT NULL,
  1877.   `mac_address` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1878.   `vlan_id` int(11) unsigned NOT NULL,
  1879.   `device_id` int(11) unsigned NOT NULL,
  1880.   UNIQUE KEY `id` (`id`),
  1881.   KEY `mac_address` (`mac_address`),
  1882.   KEY `ports_fdb_port_id_index` (`port_id`),
  1883.   KEY `ports_fdb_device_id_index` (`device_id`),
  1884.   KEY `ports_fdb_vlan_id_index` (`vlan_id`)
  1885. ) ENGINE=InnoDB AUTO_INCREMENT=50431 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1886. /*!40101 SET character_set_client = @saved_cs_client */;
  1887.  
  1888. --
  1889. -- Table structure for table `ports_perms`
  1890. --
  1891.  
  1892. DROP TABLE IF EXISTS `ports_perms`;
  1893. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1894. /*!40101 SET character_set_client = utf8 */;
  1895. CREATE TABLE `ports_perms` (
  1896.   `user_id` int(11) NOT NULL,
  1897.   `port_id` int(11) NOT NULL,
  1898.   `access_level` int(11) NOT NULL,
  1899.   PRIMARY KEY (`user_id`,`port_id`)
  1900. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1901. /*!40101 SET character_set_client = @saved_cs_client */;
  1902.  
  1903. --
  1904. -- Table structure for table `ports_stack`
  1905. --
  1906.  
  1907. DROP TABLE IF EXISTS `ports_stack`;
  1908. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1909. /*!40101 SET character_set_client = utf8 */;
  1910. CREATE TABLE `ports_stack` (
  1911.   `device_id` int(11) NOT NULL,
  1912.   `port_id_high` int(11) NOT NULL,
  1913.   `port_id_low` int(11) NOT NULL,
  1914.   `ifStackStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1915.   UNIQUE KEY `device_id` (`device_id`,`port_id_high`,`port_id_low`)
  1916. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1917. /*!40101 SET character_set_client = @saved_cs_client */;
  1918.  
  1919. --
  1920. -- Table structure for table `ports_statistics`
  1921. --
  1922.  
  1923. DROP TABLE IF EXISTS `ports_statistics`;
  1924. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1925. /*!40101 SET character_set_client = utf8 */;
  1926. CREATE TABLE `ports_statistics` (
  1927.   `port_id` int(11) NOT NULL,
  1928.   `ifInNUcastPkts` bigint(20) DEFAULT NULL,
  1929.   `ifInNUcastPkts_prev` bigint(20) DEFAULT NULL,
  1930.   `ifInNUcastPkts_delta` bigint(20) DEFAULT NULL,
  1931.   `ifInNUcastPkts_rate` int(11) DEFAULT NULL,
  1932.   `ifOutNUcastPkts` bigint(20) DEFAULT NULL,
  1933.   `ifOutNUcastPkts_prev` bigint(20) DEFAULT NULL,
  1934.   `ifOutNUcastPkts_delta` bigint(20) DEFAULT NULL,
  1935.   `ifOutNUcastPkts_rate` int(11) DEFAULT NULL,
  1936.   `ifInDiscards` bigint(20) DEFAULT NULL,
  1937.   `ifInDiscards_prev` bigint(20) DEFAULT NULL,
  1938.   `ifInDiscards_delta` bigint(20) DEFAULT NULL,
  1939.   `ifInDiscards_rate` int(11) DEFAULT NULL,
  1940.   `ifOutDiscards` bigint(20) DEFAULT NULL,
  1941.   `ifOutDiscards_prev` bigint(20) DEFAULT NULL,
  1942.   `ifOutDiscards_delta` bigint(20) DEFAULT NULL,
  1943.   `ifOutDiscards_rate` int(11) DEFAULT NULL,
  1944.   `ifInUnknownProtos` bigint(20) DEFAULT NULL,
  1945.   `ifInUnknownProtos_prev` bigint(20) DEFAULT NULL,
  1946.   `ifInUnknownProtos_delta` bigint(20) DEFAULT NULL,
  1947.   `ifInUnknownProtos_rate` int(11) DEFAULT NULL,
  1948.   `ifInBroadcastPkts` bigint(20) DEFAULT NULL,
  1949.   `ifInBroadcastPkts_prev` bigint(20) DEFAULT NULL,
  1950.   `ifInBroadcastPkts_delta` bigint(20) DEFAULT NULL,
  1951.   `ifInBroadcastPkts_rate` int(11) DEFAULT NULL,
  1952.   `ifOutBroadcastPkts` bigint(20) DEFAULT NULL,
  1953.   `ifOutBroadcastPkts_prev` bigint(20) DEFAULT NULL,
  1954.   `ifOutBroadcastPkts_delta` bigint(20) DEFAULT NULL,
  1955.   `ifOutBroadcastPkts_rate` int(11) DEFAULT NULL,
  1956.   `ifInMulticastPkts` bigint(20) DEFAULT NULL,
  1957.   `ifInMulticastPkts_prev` bigint(20) DEFAULT NULL,
  1958.   `ifInMulticastPkts_delta` bigint(20) DEFAULT NULL,
  1959.   `ifInMulticastPkts_rate` int(11) DEFAULT NULL,
  1960.   `ifOutMulticastPkts` bigint(20) DEFAULT NULL,
  1961.   `ifOutMulticastPkts_prev` bigint(20) DEFAULT NULL,
  1962.   `ifOutMulticastPkts_delta` bigint(20) DEFAULT NULL,
  1963.   `ifOutMulticastPkts_rate` int(11) DEFAULT NULL,
  1964.   PRIMARY KEY (`port_id`)
  1965. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1966. /*!40101 SET character_set_client = @saved_cs_client */;
  1967.  
  1968. --
  1969. -- Table structure for table `ports_stp`
  1970. --
  1971.  
  1972. DROP TABLE IF EXISTS `ports_stp`;
  1973. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1974. /*!40101 SET character_set_client = utf8 */;
  1975. CREATE TABLE `ports_stp` (
  1976.   `port_stp_id` int(11) NOT NULL AUTO_INCREMENT,
  1977.   `device_id` int(11) NOT NULL,
  1978.   `port_id` int(11) NOT NULL,
  1979.   `priority` tinyint(3) unsigned NOT NULL,
  1980.   `state` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
  1981.   `enable` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  1982.   `pathCost` int(10) unsigned NOT NULL,
  1983.   `designatedRoot` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1984.   `designatedCost` smallint(5) unsigned NOT NULL,
  1985.   `designatedBridge` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  1986.   `designatedPort` mediumint(9) NOT NULL,
  1987.   `forwardTransitions` int(10) unsigned NOT NULL,
  1988.   PRIMARY KEY (`port_stp_id`),
  1989.   UNIQUE KEY `device_id` (`device_id`,`port_id`)
  1990. ) ENGINE=InnoDB AUTO_INCREMENT=3421 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  1991. /*!40101 SET character_set_client = @saved_cs_client */;
  1992.  
  1993. --
  1994. -- Table structure for table `ports_vlans`
  1995. --
  1996.  
  1997. DROP TABLE IF EXISTS `ports_vlans`;
  1998. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  1999. /*!40101 SET character_set_client = utf8 */;
  2000. CREATE TABLE `ports_vlans` (
  2001.   `port_vlan_id` int(11) NOT NULL AUTO_INCREMENT,
  2002.   `device_id` int(11) NOT NULL,
  2003.   `port_id` int(11) NOT NULL,
  2004.   `vlan` int(11) NOT NULL,
  2005.   `baseport` int(11) NOT NULL,
  2006.   `priority` bigint(32) NOT NULL,
  2007.   `state` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  2008.   `cost` int(11) NOT NULL,
  2009.   `untagged` tinyint(4) NOT NULL DEFAULT '0',
  2010.   PRIMARY KEY (`port_vlan_id`),
  2011.   UNIQUE KEY `unique` (`device_id`,`port_id`,`vlan`)
  2012. ) ENGINE=InnoDB AUTO_INCREMENT=9007 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2013. /*!40101 SET character_set_client = @saved_cs_client */;
  2014.  
  2015. --
  2016. -- Table structure for table `processes`
  2017. --
  2018.  
  2019. DROP TABLE IF EXISTS `processes`;
  2020. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2021. /*!40101 SET character_set_client = utf8 */;
  2022. CREATE TABLE `processes` (
  2023.   `device_id` int(11) NOT NULL,
  2024.   `pid` int(255) NOT NULL,
  2025.   `vsz` int(255) NOT NULL,
  2026.   `rss` int(255) NOT NULL,
  2027.   `cputime` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  2028.   `user` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  2029.   `command` text COLLATE utf8_unicode_ci NOT NULL,
  2030.   KEY `device_id` (`device_id`)
  2031. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2032. /*!40101 SET character_set_client = @saved_cs_client */;
  2033.  
  2034. --
  2035. -- Table structure for table `processors`
  2036. --
  2037.  
  2038. DROP TABLE IF EXISTS `processors`;
  2039. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2040. /*!40101 SET character_set_client = utf8 */;
  2041. CREATE TABLE `processors` (
  2042.   `processor_id` int(11) NOT NULL AUTO_INCREMENT,
  2043.   `entPhysicalIndex` int(11) NOT NULL DEFAULT '0',
  2044.   `hrDeviceIndex` int(11) DEFAULT NULL,
  2045.   `device_id` int(11) NOT NULL,
  2046.   `processor_oid` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2047.   `processor_index` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  2048.   `processor_type` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  2049.   `processor_usage` int(11) NOT NULL,
  2050.   `processor_descr` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  2051.   `processor_precision` int(11) NOT NULL DEFAULT '1',
  2052.   `processor_perc_warn` int(11) DEFAULT '75',
  2053.   PRIMARY KEY (`processor_id`),
  2054.   KEY `device_id` (`device_id`),
  2055.   KEY `device_id_2` (`device_id`)
  2056. ) ENGINE=InnoDB AUTO_INCREMENT=163 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2057. /*!40101 SET character_set_client = @saved_cs_client */;
  2058.  
  2059. --
  2060. -- Table structure for table `proxmox`
  2061. --
  2062.  
  2063. DROP TABLE IF EXISTS `proxmox`;
  2064. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2065. /*!40101 SET character_set_client = utf8 */;
  2066. CREATE TABLE `proxmox` (
  2067.   `id` int(11) NOT NULL AUTO_INCREMENT,
  2068.   `device_id` int(11) NOT NULL DEFAULT '0',
  2069.   `vmid` int(11) NOT NULL,
  2070.   `cluster` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2071.   `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  2072.   `last_seen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  2073.   PRIMARY KEY (`id`),
  2074.   UNIQUE KEY `cluster_vm` (`cluster`,`vmid`)
  2075. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2076. /*!40101 SET character_set_client = @saved_cs_client */;
  2077.  
  2078. --
  2079. -- Table structure for table `proxmox_ports`
  2080. --
  2081.  
  2082. DROP TABLE IF EXISTS `proxmox_ports`;
  2083. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2084. /*!40101 SET character_set_client = utf8 */;
  2085. CREATE TABLE `proxmox_ports` (
  2086.   `id` int(11) NOT NULL AUTO_INCREMENT,
  2087.   `vm_id` int(11) NOT NULL,
  2088.   `port` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  2089.   `last_seen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  2090.   PRIMARY KEY (`id`),
  2091.   UNIQUE KEY `vm_port` (`vm_id`,`port`)
  2092. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2093. /*!40101 SET character_set_client = @saved_cs_client */;
  2094.  
  2095. --
  2096. -- Table structure for table `pseudowires`
  2097. --
  2098.  
  2099. DROP TABLE IF EXISTS `pseudowires`;
  2100. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2101. /*!40101 SET character_set_client = utf8 */;
  2102. CREATE TABLE `pseudowires` (
  2103.   `pseudowire_id` int(11) NOT NULL AUTO_INCREMENT,
  2104.   `device_id` int(11) NOT NULL,
  2105.   `port_id` int(11) NOT NULL,
  2106.   `peer_device_id` int(11) NOT NULL,
  2107.   `peer_ldp_id` int(11) NOT NULL,
  2108.   `cpwVcID` int(11) NOT NULL,
  2109.   `cpwOid` int(11) NOT NULL,
  2110.   `pw_type` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  2111.   `pw_psntype` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  2112.   `pw_local_mtu` int(11) NOT NULL,
  2113.   `pw_peer_mtu` int(11) NOT NULL,
  2114.   `pw_descr` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2115.   PRIMARY KEY (`pseudowire_id`)
  2116. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2117. /*!40101 SET character_set_client = @saved_cs_client */;
  2118.  
  2119. --
  2120. -- Table structure for table `route`
  2121. --
  2122.  
  2123. DROP TABLE IF EXISTS `route`;
  2124. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2125. /*!40101 SET character_set_client = utf8 */;
  2126. CREATE TABLE `route` (
  2127.   `device_id` int(11) NOT NULL,
  2128.   `context_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2129.   `ipRouteDest` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  2130.   `ipRouteIfIndex` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL,
  2131.   `ipRouteMetric` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  2132.   `ipRouteNextHop` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  2133.   `ipRouteType` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  2134.   `ipRouteProto` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  2135.   `discoveredAt` int(11) NOT NULL,
  2136.   `ipRouteMask` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  2137.   KEY `device` (`device_id`,`context_name`,`ipRouteDest`(255),`ipRouteNextHop`(255))
  2138. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2139. /*!40101 SET character_set_client = @saved_cs_client */;
  2140.  
  2141. --
  2142. -- Table structure for table `sensors`
  2143. --
  2144.  
  2145. DROP TABLE IF EXISTS `sensors`;
  2146. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2147. /*!40101 SET character_set_client = utf8 */;
  2148. CREATE TABLE `sensors` (
  2149.   `sensor_id` int(11) NOT NULL AUTO_INCREMENT,
  2150.   `sensor_deleted` tinyint(1) NOT NULL DEFAULT '0',
  2151.   `sensor_class` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  2152.   `device_id` int(11) unsigned NOT NULL DEFAULT '0',
  2153.   `poller_type` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'snmp',
  2154.   `sensor_oid` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2155.   `sensor_index` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  2156.   `sensor_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2157.   `sensor_descr` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  2158.   `sensor_divisor` bigint(20) NOT NULL DEFAULT '1',
  2159.   `sensor_multiplier` int(11) NOT NULL DEFAULT '1',
  2160.   `sensor_current` float DEFAULT NULL,
  2161.   `sensor_limit` float DEFAULT NULL,
  2162.   `sensor_limit_warn` float DEFAULT NULL,
  2163.   `sensor_limit_low` float DEFAULT NULL,
  2164.   `sensor_limit_low_warn` float DEFAULT NULL,
  2165.   `sensor_alert` tinyint(1) NOT NULL DEFAULT '1',
  2166.   `sensor_custom` enum('No','Yes') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
  2167.   `entPhysicalIndex` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  2168.   `entPhysicalIndex_measured` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  2169.   `lastupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  2170.   `sensor_prev` float DEFAULT NULL,
  2171.   `user_func` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  2172.   PRIMARY KEY (`sensor_id`),
  2173.   KEY `sensor_host` (`device_id`),
  2174.   KEY `sensor_class` (`sensor_class`),
  2175.   KEY `sensor_type` (`sensor_type`),
  2176.   CONSTRAINT `sensors_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`device_id`) ON DELETE CASCADE
  2177. ) ENGINE=InnoDB AUTO_INCREMENT=1909 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2178. /*!40101 SET character_set_client = @saved_cs_client */;
  2179.  
  2180. --
  2181. -- Table structure for table `sensors_to_state_indexes`
  2182. --
  2183.  
  2184. DROP TABLE IF EXISTS `sensors_to_state_indexes`;
  2185. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2186. /*!40101 SET character_set_client = utf8 */;
  2187. CREATE TABLE `sensors_to_state_indexes` (
  2188.   `sensors_to_state_translations_id` int(11) NOT NULL AUTO_INCREMENT,
  2189.   `sensor_id` int(11) NOT NULL,
  2190.   `state_index_id` int(11) NOT NULL,
  2191.   PRIMARY KEY (`sensors_to_state_translations_id`),
  2192.   UNIQUE KEY `sensor_id_state_index_id` (`sensor_id`,`state_index_id`),
  2193.   KEY `state_index_id` (`state_index_id`),
  2194.   CONSTRAINT `sensors_to_state_indexes_ibfk_2` FOREIGN KEY (`state_index_id`) REFERENCES `state_indexes` (`state_index_id`),
  2195.   CONSTRAINT `sensors_to_state_indexes_sensor_id_foreign` FOREIGN KEY (`sensor_id`) REFERENCES `sensors` (`sensor_id`) ON DELETE CASCADE
  2196. ) ENGINE=InnoDB AUTO_INCREMENT=24136 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2197. /*!40101 SET character_set_client = @saved_cs_client */;
  2198.  
  2199. --
  2200. -- Table structure for table `services`
  2201. --
  2202.  
  2203. DROP TABLE IF EXISTS `services`;
  2204. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2205. /*!40101 SET character_set_client = utf8 */;
  2206. CREATE TABLE `services` (
  2207.   `service_id` int(11) NOT NULL AUTO_INCREMENT,
  2208.   `device_id` int(11) NOT NULL,
  2209.   `service_ip` text COLLATE utf8_unicode_ci NOT NULL,
  2210.   `service_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2211.   `service_desc` text COLLATE utf8_unicode_ci NOT NULL,
  2212.   `service_param` text COLLATE utf8_unicode_ci NOT NULL,
  2213.   `service_ignore` tinyint(1) NOT NULL,
  2214.   `service_status` tinyint(4) NOT NULL DEFAULT '0',
  2215.   `service_changed` int(11) NOT NULL DEFAULT '0',
  2216.   `service_message` text COLLATE utf8_unicode_ci NOT NULL,
  2217.   `service_disabled` tinyint(1) NOT NULL DEFAULT '0',
  2218.   `service_ds` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Data Sources available for this service',
  2219.   PRIMARY KEY (`service_id`),
  2220.   KEY `service_host` (`device_id`)
  2221. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2222. /*!40101 SET character_set_client = @saved_cs_client */;
  2223.  
  2224. --
  2225. -- Table structure for table `session`
  2226. --
  2227.  
  2228. DROP TABLE IF EXISTS `session`;
  2229. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2230. /*!40101 SET character_set_client = utf8 */;
  2231. CREATE TABLE `session` (
  2232.   `session_id` int(11) NOT NULL AUTO_INCREMENT,
  2233.   `session_username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2234.   `session_value` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  2235.   `session_token` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  2236.   `session_auth` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  2237.   `session_expiry` int(11) NOT NULL,
  2238.   PRIMARY KEY (`session_id`),
  2239.   UNIQUE KEY `session_value` (`session_value`)
  2240. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2241. /*!40101 SET character_set_client = @saved_cs_client */;
  2242.  
  2243. --
  2244. -- Table structure for table `slas`
  2245. --
  2246.  
  2247. DROP TABLE IF EXISTS `slas`;
  2248. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2249. /*!40101 SET character_set_client = utf8 */;
  2250. CREATE TABLE `slas` (
  2251.   `sla_id` int(11) NOT NULL AUTO_INCREMENT,
  2252.   `device_id` int(11) NOT NULL,
  2253.   `sla_nr` int(11) NOT NULL,
  2254.   `owner` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2255.   `tag` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2256.   `rtt_type` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  2257.   `status` tinyint(1) NOT NULL,
  2258.   `opstatus` tinyint(1) NOT NULL DEFAULT '0',
  2259.   `deleted` tinyint(1) NOT NULL DEFAULT '0',
  2260.   PRIMARY KEY (`sla_id`),
  2261.   UNIQUE KEY `unique_key` (`device_id`,`sla_nr`),
  2262.   KEY `device_id` (`device_id`)
  2263. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2264. /*!40101 SET character_set_client = @saved_cs_client */;
  2265.  
  2266. --
  2267. -- Table structure for table `state_indexes`
  2268. --
  2269.  
  2270. DROP TABLE IF EXISTS `state_indexes`;
  2271. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2272. /*!40101 SET character_set_client = utf8 */;
  2273. CREATE TABLE `state_indexes` (
  2274.   `state_index_id` int(11) NOT NULL AUTO_INCREMENT,
  2275.   `state_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  2276.   PRIMARY KEY (`state_index_id`),
  2277.   UNIQUE KEY `state_name` (`state_name`)
  2278. ) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2279. /*!40101 SET character_set_client = @saved_cs_client */;
  2280.  
  2281. --
  2282. -- Table structure for table `state_translations`
  2283. --
  2284.  
  2285. DROP TABLE IF EXISTS `state_translations`;
  2286. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2287. /*!40101 SET character_set_client = utf8 */;
  2288. CREATE TABLE `state_translations` (
  2289.   `state_translation_id` int(11) NOT NULL AUTO_INCREMENT,
  2290.   `state_index_id` int(11) NOT NULL,
  2291.   `state_descr` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2292.   `state_draw_graph` tinyint(1) NOT NULL,
  2293.   `state_value` smallint(5) NOT NULL DEFAULT '0',
  2294.   `state_generic_value` tinyint(1) NOT NULL,
  2295.   `state_lastupdated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  2296.   PRIMARY KEY (`state_translation_id`),
  2297.   UNIQUE KEY `state_index_id_value` (`state_index_id`,`state_value`)
  2298. ) ENGINE=InnoDB AUTO_INCREMENT=373 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2299. /*!40101 SET character_set_client = @saved_cs_client */;
  2300.  
  2301. --
  2302. -- Table structure for table `storage`
  2303. --
  2304.  
  2305. DROP TABLE IF EXISTS `storage`;
  2306. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2307. /*!40101 SET character_set_client = utf8 */;
  2308. CREATE TABLE `storage` (
  2309.   `storage_id` int(11) NOT NULL AUTO_INCREMENT,
  2310.   `device_id` int(11) NOT NULL,
  2311.   `storage_mib` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  2312.   `storage_index` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  2313.   `storage_type` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  2314.   `storage_descr` text COLLATE utf8_unicode_ci NOT NULL,
  2315.   `storage_size` bigint(20) NOT NULL,
  2316.   `storage_units` int(11) NOT NULL,
  2317.   `storage_used` bigint(20) NOT NULL DEFAULT '0',
  2318.   `storage_free` bigint(20) NOT NULL DEFAULT '0',
  2319.   `storage_perc` int(11) NOT NULL DEFAULT '0',
  2320.   `storage_perc_warn` int(11) DEFAULT '60',
  2321.   `storage_deleted` tinyint(1) NOT NULL DEFAULT '0',
  2322.   PRIMARY KEY (`storage_id`),
  2323.   UNIQUE KEY `index_unique` (`device_id`,`storage_mib`,`storage_index`),
  2324.   KEY `device_id` (`device_id`),
  2325.   KEY `device_id_2` (`device_id`)
  2326. ) ENGINE=InnoDB AUTO_INCREMENT=229 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2327. /*!40101 SET character_set_client = @saved_cs_client */;
  2328.  
  2329. --
  2330. -- Table structure for table `stp`
  2331. --
  2332.  
  2333. DROP TABLE IF EXISTS `stp`;
  2334. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2335. /*!40101 SET character_set_client = utf8 */;
  2336. CREATE TABLE `stp` (
  2337.   `stp_id` int(11) NOT NULL AUTO_INCREMENT,
  2338.   `device_id` int(11) NOT NULL,
  2339.   `rootBridge` tinyint(1) NOT NULL,
  2340.   `bridgeAddress` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  2341.   `protocolSpecification` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  2342.   `priority` mediumint(9) NOT NULL,
  2343.   `timeSinceTopologyChange` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  2344.   `topChanges` mediumint(9) NOT NULL,
  2345.   `designatedRoot` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  2346.   `rootCost` mediumint(9) NOT NULL,
  2347.   `rootPort` mediumint(9) NOT NULL,
  2348.   `maxAge` mediumint(9) NOT NULL,
  2349.   `helloTime` mediumint(9) NOT NULL,
  2350.   `holdTime` mediumint(9) NOT NULL,
  2351.   `forwardDelay` mediumint(9) NOT NULL,
  2352.   `bridgeMaxAge` smallint(6) NOT NULL,
  2353.   `bridgeHelloTime` smallint(6) NOT NULL,
  2354.   `bridgeForwardDelay` smallint(6) NOT NULL,
  2355.   PRIMARY KEY (`stp_id`),
  2356.   KEY `stp_host` (`device_id`)
  2357. ) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2358. /*!40101 SET character_set_client = @saved_cs_client */;
  2359.  
  2360. --
  2361. -- Table structure for table `syslog`
  2362. --
  2363.  
  2364. DROP TABLE IF EXISTS `syslog`;
  2365. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2366. /*!40101 SET character_set_client = utf8 */;
  2367. CREATE TABLE `syslog` (
  2368.   `device_id` int(11) DEFAULT NULL,
  2369.   `facility` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
  2370.   `priority` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
  2371.   `level` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
  2372.   `tag` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
  2373.   `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  2374.   `program` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  2375.   `msg` text COLLATE utf8_unicode_ci,
  2376.   `seq` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  2377.   PRIMARY KEY (`seq`),
  2378.   KEY `datetime` (`timestamp`),
  2379.   KEY `device_id` (`device_id`),
  2380.   KEY `program` (`program`),
  2381.   KEY `priority_level` (`priority`,`level`)
  2382. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2383. /*!40101 SET character_set_client = @saved_cs_client */;
  2384.  
  2385. --
  2386. -- Table structure for table `tnmsneinfo`
  2387. --
  2388.  
  2389. DROP TABLE IF EXISTS `tnmsneinfo`;
  2390. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2391. /*!40101 SET character_set_client = utf8 */;
  2392. CREATE TABLE `tnmsneinfo` (
  2393.   `id` int(11) NOT NULL AUTO_INCREMENT,
  2394.   `device_id` int(11) NOT NULL,
  2395.   `neID` int(32) NOT NULL,
  2396.   `neType` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2397.   `neName` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2398.   `neLocation` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2399.   `neAlarm` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2400.   `neOpMode` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2401.   `neOpState` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2402.   PRIMARY KEY (`id`),
  2403.   KEY `device_id` (`device_id`),
  2404.   KEY `neID` (`neID`)
  2405. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2406. /*!40101 SET character_set_client = @saved_cs_client */;
  2407.  
  2408. --
  2409. -- Table structure for table `toner`
  2410. --
  2411.  
  2412. DROP TABLE IF EXISTS `toner`;
  2413. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2414. /*!40101 SET character_set_client = utf8 */;
  2415. CREATE TABLE `toner` (
  2416.   `toner_id` int(11) NOT NULL AUTO_INCREMENT,
  2417.   `device_id` int(11) NOT NULL DEFAULT '0',
  2418.   `toner_index` int(11) NOT NULL,
  2419.   `toner_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  2420.   `toner_oid` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  2421.   `toner_descr` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  2422.   `toner_capacity` int(11) NOT NULL DEFAULT '0',
  2423.   `toner_current` int(11) NOT NULL DEFAULT '0',
  2424.   `toner_capacity_oid` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  2425.   PRIMARY KEY (`toner_id`),
  2426.   KEY `device_id` (`device_id`)
  2427. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2428. /*!40101 SET character_set_client = @saved_cs_client */;
  2429.  
  2430. --
  2431. -- Table structure for table `ucd_diskio`
  2432. --
  2433.  
  2434. DROP TABLE IF EXISTS `ucd_diskio`;
  2435. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2436. /*!40101 SET character_set_client = utf8 */;
  2437. CREATE TABLE `ucd_diskio` (
  2438.   `diskio_id` int(11) NOT NULL AUTO_INCREMENT,
  2439.   `device_id` int(11) NOT NULL,
  2440.   `diskio_index` int(11) NOT NULL,
  2441.   `diskio_descr` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  2442.   PRIMARY KEY (`diskio_id`),
  2443.   KEY `device_id` (`device_id`),
  2444.   KEY `device_id_2` (`device_id`)
  2445. ) ENGINE=InnoDB AUTO_INCREMENT=295 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2446. /*!40101 SET character_set_client = @saved_cs_client */;
  2447.  
  2448. --
  2449. -- Table structure for table `users`
  2450. --
  2451.  
  2452. DROP TABLE IF EXISTS `users`;
  2453. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2454. /*!40101 SET character_set_client = utf8 */;
  2455. CREATE TABLE `users` (
  2456.   `user_id` int(11) NOT NULL AUTO_INCREMENT,
  2457.   `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2458.   `password` varchar(60) COLLATE utf8_unicode_ci DEFAULT NULL,
  2459.   `realname` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  2460.   `email` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  2461.   `descr` char(30) COLLATE utf8_unicode_ci NOT NULL,
  2462.   `level` tinyint(4) NOT NULL DEFAULT '0',
  2463.   `can_modify_passwd` tinyint(4) NOT NULL DEFAULT '1',
  2464.   `created_at` timestamp NOT NULL DEFAULT '1970-01-01 23:00:01',
  2465.   `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  2466.   `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  2467.   PRIMARY KEY (`user_id`),
  2468.   UNIQUE KEY `username` (`username`)
  2469. ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2470. /*!40101 SET character_set_client = @saved_cs_client */;
  2471.  
  2472. --
  2473. -- Table structure for table `users_prefs`
  2474. --
  2475.  
  2476. DROP TABLE IF EXISTS `users_prefs`;
  2477. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2478. /*!40101 SET character_set_client = utf8 */;
  2479. CREATE TABLE `users_prefs` (
  2480.   `user_id` int(16) NOT NULL,
  2481.   `pref` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  2482.   `value` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2483.   UNIQUE KEY `user_id.pref` (`user_id`,`pref`)
  2484. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2485. /*!40101 SET character_set_client = @saved_cs_client */;
  2486.  
  2487. --
  2488. -- Table structure for table `users_widgets`
  2489. --
  2490.  
  2491. DROP TABLE IF EXISTS `users_widgets`;
  2492. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2493. /*!40101 SET character_set_client = utf8 */;
  2494. CREATE TABLE `users_widgets` (
  2495.   `user_widget_id` int(11) NOT NULL AUTO_INCREMENT,
  2496.   `user_id` int(11) NOT NULL,
  2497.   `widget_id` int(11) NOT NULL,
  2498.   `col` tinyint(4) NOT NULL,
  2499.   `row` tinyint(4) NOT NULL,
  2500.   `size_x` tinyint(4) NOT NULL,
  2501.   `size_y` tinyint(4) NOT NULL,
  2502.   `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2503.   `refresh` tinyint(4) NOT NULL DEFAULT '60',
  2504.   `settings` text COLLATE utf8_unicode_ci NOT NULL,
  2505.   `dashboard_id` int(11) NOT NULL,
  2506.   PRIMARY KEY (`user_widget_id`),
  2507.   KEY `user_id` (`user_id`,`widget_id`)
  2508. ) ENGINE=InnoDB AUTO_INCREMENT=143 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2509. /*!40101 SET character_set_client = @saved_cs_client */;
  2510.  
  2511. --
  2512. -- Table structure for table `vlans`
  2513. --
  2514.  
  2515. DROP TABLE IF EXISTS `vlans`;
  2516. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2517. /*!40101 SET character_set_client = utf8 */;
  2518. CREATE TABLE `vlans` (
  2519.   `vlan_id` int(11) NOT NULL AUTO_INCREMENT,
  2520.   `device_id` int(11) DEFAULT NULL,
  2521.   `vlan_vlan` int(11) DEFAULT NULL,
  2522.   `vlan_domain` int(11) DEFAULT NULL,
  2523.   `vlan_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  2524.   `vlan_type` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  2525.   `vlan_mtu` int(11) DEFAULT NULL,
  2526.   PRIMARY KEY (`vlan_id`),
  2527.   KEY `device_id` (`device_id`,`vlan_vlan`)
  2528. ) ENGINE=InnoDB AUTO_INCREMENT=3289 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2529. /*!40101 SET character_set_client = @saved_cs_client */;
  2530.  
  2531. --
  2532. -- Table structure for table `vminfo`
  2533. --
  2534.  
  2535. DROP TABLE IF EXISTS `vminfo`;
  2536. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2537. /*!40101 SET character_set_client = utf8 */;
  2538. CREATE TABLE `vminfo` (
  2539.   `id` int(11) NOT NULL AUTO_INCREMENT,
  2540.   `device_id` int(11) NOT NULL,
  2541.   `vm_type` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'vmware',
  2542.   `vmwVmVMID` int(11) NOT NULL,
  2543.   `vmwVmDisplayName` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2544.   `vmwVmGuestOS` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2545.   `vmwVmMemSize` int(11) NOT NULL,
  2546.   `vmwVmCpus` int(11) NOT NULL,
  2547.   `vmwVmState` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2548.   PRIMARY KEY (`id`),
  2549.   KEY `device_id` (`device_id`),
  2550.   KEY `vmwVmVMID` (`vmwVmVMID`)
  2551. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2552. /*!40101 SET character_set_client = @saved_cs_client */;
  2553.  
  2554. --
  2555. -- Table structure for table `vrf_lite_cisco`
  2556. --
  2557.  
  2558. DROP TABLE IF EXISTS `vrf_lite_cisco`;
  2559. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2560. /*!40101 SET character_set_client = utf8 */;
  2561. CREATE TABLE `vrf_lite_cisco` (
  2562.   `vrf_lite_cisco_id` int(11) NOT NULL AUTO_INCREMENT,
  2563.   `device_id` int(11) NOT NULL,
  2564.   `context_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  2565.   `intance_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT '',
  2566.   `vrf_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT 'Default',
  2567.   PRIMARY KEY (`vrf_lite_cisco_id`),
  2568.   KEY `vrf` (`vrf_name`),
  2569.   KEY `context` (`context_name`),
  2570.   KEY `device` (`device_id`),
  2571.   KEY `mix` (`device_id`,`context_name`,`vrf_name`)
  2572. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2573. /*!40101 SET character_set_client = @saved_cs_client */;
  2574.  
  2575. --
  2576. -- Table structure for table `vrfs`
  2577. --
  2578.  
  2579. DROP TABLE IF EXISTS `vrfs`;
  2580. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2581. /*!40101 SET character_set_client = utf8 */;
  2582. CREATE TABLE `vrfs` (
  2583.   `vrf_id` int(11) NOT NULL AUTO_INCREMENT,
  2584.   `vrf_oid` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
  2585.   `vrf_name` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  2586.   `mplsVpnVrfRouteDistinguisher` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  2587.   `mplsVpnVrfDescription` text COLLATE utf8_unicode_ci NOT NULL,
  2588.   `device_id` int(11) NOT NULL,
  2589.   PRIMARY KEY (`vrf_id`),
  2590.   KEY `device_id` (`device_id`)
  2591. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2592. /*!40101 SET character_set_client = @saved_cs_client */;
  2593.  
  2594. --
  2595. -- Table structure for table `widgets`
  2596. --
  2597.  
  2598. DROP TABLE IF EXISTS `widgets`;
  2599. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2600. /*!40101 SET character_set_client = utf8 */;
  2601. CREATE TABLE `widgets` (
  2602.   `widget_id` int(11) NOT NULL AUTO_INCREMENT,
  2603.   `widget_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2604.   `widget` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2605.   `base_dimensions` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  2606.   PRIMARY KEY (`widget_id`),
  2607.   UNIQUE KEY `widget` (`widget`)
  2608. ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2609. /*!40101 SET character_set_client = @saved_cs_client */;
  2610.  
  2611. --
  2612. -- Table structure for table `wireless_sensors`
  2613. --
  2614.  
  2615. DROP TABLE IF EXISTS `wireless_sensors`;
  2616. /*!40101 SET @saved_cs_client     = @@character_set_client */;
  2617. /*!40101 SET character_set_client = utf8 */;
  2618. CREATE TABLE `wireless_sensors` (
  2619.   `sensor_id` int(11) NOT NULL AUTO_INCREMENT,
  2620.   `sensor_deleted` tinyint(1) NOT NULL DEFAULT '0',
  2621.   `sensor_class` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  2622.   `device_id` int(11) unsigned NOT NULL DEFAULT '0',
  2623.   `sensor_index` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  2624.   `sensor_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  2625.   `sensor_descr` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  2626.   `sensor_divisor` int(11) NOT NULL DEFAULT '1',
  2627.   `sensor_multiplier` int(11) NOT NULL DEFAULT '1',
  2628.   `sensor_aggregator` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'sum',
  2629.   `sensor_current` float DEFAULT NULL,
  2630.   `sensor_prev` float DEFAULT NULL,
  2631.   `sensor_limit` float DEFAULT NULL,
  2632.   `sensor_limit_warn` float DEFAULT NULL,
  2633.   `sensor_limit_low` float DEFAULT NULL,
  2634.   `sensor_limit_low_warn` float DEFAULT NULL,
  2635.   `sensor_alert` tinyint(1) NOT NULL DEFAULT '1',
  2636.   `sensor_custom` enum('No','Yes') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'No',
  2637.   `entPhysicalIndex` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  2638.   `entPhysicalIndex_measured` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  2639.   `lastupdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  2640.   `sensor_oids` text COLLATE utf8_unicode_ci NOT NULL,
  2641.   `access_point_id` int(11) DEFAULT NULL,
  2642.   PRIMARY KEY (`sensor_id`),
  2643.   KEY `sensor_class` (`sensor_class`),
  2644.   KEY `sensor_host` (`device_id`),
  2645.   KEY `sensor_type` (`sensor_type`),
  2646.   CONSTRAINT `wireless_sensors_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`device_id`) ON DELETE CASCADE
  2647. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  2648. /*!40101 SET character_set_client = @saved_cs_client */;
  2649. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  2650.  
  2651. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  2652. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  2653. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  2654. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  2655. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  2656. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  2657. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  2658.  
  2659. -- Dump completed on 2018-01-24 10:47:54