--
-- Host: localhost    Database: mamas
-- ------------------------------------------------------


--
-- Table structure for table `agent_settings`
--

CREATE TABLE `agent_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `profile_name` varchar(64) DEFAULT NULL,
  `int_ping` smallint(5) unsigned DEFAULT 4,
  `int_regular` smallint(5) unsigned DEFAULT 300,
  `int_debug` smallint(5) unsigned DEFAULT 10,
  `int_fallback` smallint(5) unsigned DEFAULT 60,
  `int_fallback_debug` smallint(5) unsigned DEFAULT 20,
  `smallcycles` smallint(5) unsigned DEFAULT 5,
  `connfail_tolerance` smallint(5) unsigned DEFAULT 5,
  `regprogress` smallint(5) unsigned DEFAULT 100,
  `fw_autoupgrade` int(11) DEFAULT 5,
  `os_autoupgrade` int(11) DEFAULT 5,
  PRIMARY KEY (`id`),
  KEY `fw_autoupgrade` (`fw_autoupgrade`),
  KEY `os_autoupgrade` (`os_autoupgrade`),
  CONSTRAINT `agent_settings_ibfk_1` FOREIGN KEY (`fw_autoupgrade`) REFERENCES `fw_autoupgrade_policy` (`id`),
  CONSTRAINT `agent_settings_ibfk_2` FOREIGN KEY (`os_autoupgrade`) REFERENCES `os_autoupgrade_policy` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `agent_settings`
--

INSERT INTO `agent_settings` VALUES (1,'DEFAULT',4,300,10,60,20,5,5,100,5,5),(2,'FASTEST',20,120,10,60,20,1,0,1,1,1),(3,'SLOWEST',600,3600,3600,600,600,100,100,100,5,5);

--
-- Table structure for table `alert_table_selection`
--

CREATE TABLE `alert_table_selection` (
  `id` smallint(6) NOT NULL,
  `table_selection` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `alert_table_selection`
--

INSERT INTO `alert_table_selection` VALUES (0,'invalid'),(1,'sync_status'),(2,'liveness_time'),(3,'liveness_misscount'),(4,'os_versions');

--
-- Table structure for table `alert_target_map`
--

CREATE TABLE `alert_target_map` (
  `id` smallint(6) NOT NULL AUTO_INCREMENT,
  `target_spec` smallint(6) DEFAULT NULL,
  `target_type` smallint(6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `target_type` (`target_type`),
  KEY `target_spec` (`target_spec`),
  CONSTRAINT `alert_target_map_ibfk_1` FOREIGN KEY (`target_type`) REFERENCES `alert_target_type` (`id`),
  CONSTRAINT `alert_target_map_ibfk_2` FOREIGN KEY (`target_spec`) REFERENCES `alert_target_spec` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `alert_target_map`
--

INSERT INTO `alert_target_map` VALUES (1,0,0),(2,1,2),(3,1,4),(4,2,1),(5,2,4),(6,3,1),(7,3,4),(8,4,1),(9,4,4),(10,5,1),(11,5,4),(12,6,1),(13,6,4),(14,7,1),(15,7,4),(16,8,1),(17,8,4),(18,9,1),(19,9,4),(20,10,1),(21,10,4),(22,11,1),(23,11,4),(24,12,1),(25,12,4),(26,13,1),(27,13,4);

--
-- Table structure for table `alert_target_spec`
--

CREATE TABLE `alert_target_spec` (
  `id` smallint(6) NOT NULL,
  `name` varchar(32) DEFAULT NULL,
  `valtype` smallint(5) unsigned NOT NULL DEFAULT 1,
  `seltype` smallint(6) DEFAULT 0,
  `hint` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `valtype` (`valtype`),
  KEY `seltype` (`seltype`),
  CONSTRAINT `alert_target_spec_ibfk_1` FOREIGN KEY (`valtype`) REFERENCES `value_types` (`id`),
  CONSTRAINT `alert_target_spec_ibfk_2` FOREIGN KEY (`seltype`) REFERENCES `alert_table_selection` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `alert_target_spec`
--

INSERT INTO `alert_target_spec` VALUES (0,'Invalid target',1,0,''),(1,'SYNC status',6,1,'Recommended operators: =, !='),(2,'Data age',6,2,'Recommended operators: =, >'),(3,'Missed contacts',6,3,'Recommended operators: =, >'),(4,'Input Voltage',2,0,'Recommended to use with voltage interval'),(5,'Device Temperature',2,0,'Recommended to use with temperature interval'),(6,'FW version',6,4,'Recommended operators: =, !='),(7,'Allocable memory',1,0,'Includes both free and cache memory, use < operator'),(8,'# of running processes',1,0,'Highly fluctuable value'),(9,'Root FS free space',1,0,'In kilobytes, 0 = device root FS full'),(10,'AVG load 1 minute',2,0,'60-second load. Note data sampling may be > 1 minute'),(11,'AVG load 5 minutes',2,0,'Last 5 minutes load'),(12,'AVG load 15 minutes',2,0,'Last 15 minutes load'),(13,'New reboots',1,0,'Use > 0 to get alerted on every reboot');

--
-- Table structure for table `alert_target_type`
--

CREATE TABLE `alert_target_type` (
  `id` smallint(6) NOT NULL,
  `name` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `alert_target_type`
--

INSERT INTO `alert_target_type` VALUES (0,'Invalid target'),(1,'Device'),(2,'Group'),(4,'at least # of devices in group');

--
-- Table structure for table `alerts`
--

CREATE TABLE `alerts` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL,
  `target_type` smallint(6) DEFAULT 0,
  `target_spec` smallint(6) DEFAULT 0,
  `target_amount` smallint(5) unsigned DEFAULT 1,
  `target_device_id` smallint(5) unsigned DEFAULT 0,
  `target_mongrp_id` smallint(5) unsigned DEFAULT 0,
  `evaluate_interval` int(11) DEFAULT 120,
  `oper_first` smallint(6) DEFAULT 0,
  `oper_second` smallint(6) DEFAULT 0,
  `num_first` float DEFAULT 0,
  `num_second` float DEFAULT 0,
  `last_trigger_time` datetime DEFAULT NULL,
  `last_notification_time` datetime DEFAULT NULL,
  `enabled` smallint(5) unsigned DEFAULT 0,
  `active` smallint(5) unsigned DEFAULT 0,
  `counter` smallint(5) unsigned DEFAULT 0,
  `triggered` smallint(5) unsigned DEFAULT 0,
  `version` smallint(5) unsigned DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `target_device_id` (`target_device_id`),
  KEY `target_mongrp_id` (`target_mongrp_id`),
  KEY `target_type` (`target_type`),
  KEY `target_spec` (`target_spec`),
  KEY `oper_first` (`oper_first`),
  KEY `oper_second` (`oper_second`),
  CONSTRAINT `alerts_ibfk_1` FOREIGN KEY (`target_device_id`) REFERENCES `devices` (`id_device`),
  CONSTRAINT `alerts_ibfk_2` FOREIGN KEY (`target_mongrp_id`) REFERENCES `mon_groups` (`id`),
  CONSTRAINT `alerts_ibfk_3` FOREIGN KEY (`target_type`) REFERENCES `alert_target_type` (`id`),
  CONSTRAINT `alerts_ibfk_4` FOREIGN KEY (`target_spec`) REFERENCES `alert_target_spec` (`id`),
  CONSTRAINT `alerts_ibfk_5` FOREIGN KEY (`oper_first`) REFERENCES `operator_types` (`id`),
  CONSTRAINT `alerts_ibfk_6` FOREIGN KEY (`oper_second`) REFERENCES `operator_types` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `alerts`
--

INSERT INTO `alerts` VALUES (1,'first',4,2,1,NULL,1,120,5,0,1,0,NULL,NULL,1,1,103,1,1);

--
-- Table structure for table `config_groups`
--

CREATE TABLE `config_groups` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `group_name` varchar(64) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `config_groups`
--

INSERT INTO `config_groups` VALUES (1,'AUTOUP'),(2,'BACKRT'),(3,'DYNDNS'),(4,'ETH2'),(5,'ETH'),(6,'FTP'),(7,'FW'),(8,'GRE2'),(9,'GRE3'),(10,'GRE4'),(11,'GRE'),(12,'HTTP'),(13,'IPSEC2'),(14,'IPSEC3'),(15,'IPSEC4'),(16,'IPSEC'),(17,'IP'),(18,'L2TP'),(19,'NAT'),(20,'NTP'),(21,'OPENVPN2'),(22,'OPENVPN3'),(23,'OPENVPN4'),(24,'OPENVPN'),(25,'PAM'),(26,'POLICY'),(27,'PORT2'),(28,'PORT'),(29,'PPPOE'),(30,'PPP'),(31,'PPTP'),(32,'SIM'),(33,'SMS'),(34,'SMTP'),(35,'SNMP'),(36,'SSH'),(37,'STARTUP'),(38,'STATRT'),(39,'SYSLOG'),(40,'TELNET'),(41,'UPORT'),(42,'VRRP2'),(43,'VRRP'),(44,'WIFI'),(45,'MOD'),(46,'PROFILE');

--
-- Table structure for table `config_keys`
--

CREATE TABLE `config_keys` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `key_name` varchar(64) NOT NULL,
  `group_name` smallint(5) unsigned NOT NULL,
  `value_type` smallint(5) unsigned NOT NULL DEFAULT 3,
  PRIMARY KEY (`id`),
  KEY `value_type` (`value_type`),
  KEY `group_name` (`group_name`),
  CONSTRAINT `config_keys_ibfk_1` FOREIGN KEY (`value_type`) REFERENCES `value_types` (`id`),
  CONSTRAINT `config_keys_ibfk_2` FOREIGN KEY (`group_name`) REFERENCES `config_groups` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1034 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `config_keys`
--

INSERT INTO `config_keys` VALUES (1,'AUTOUP_BASE_URL',1,3),(2,'AUTOUP_CONFIG',1,3),(3,'AUTOUP_CONFIG_PASS',1,3),(4,'AUTOUP_FIRMWARE',1,3),(5,'AUTOUP_HOUR',1,3),(6,'AUTOUP_LENGTH',1,3),(7,'AUTOUP_SOURCE',1,3),(8,'AUTOUP_UNIT_ID',1,3),(9,'BACKRT_ENABLED',2,3),(10,'BACKRT_ETH0_ENABLED',2,3),(11,'BACKRT_ETH0_PING_INTVL',2,3),(12,'BACKRT_ETH0_PING_IPADDR',2,3),(13,'BACKRT_ETH0_PING_TOUT',2,3),(14,'BACKRT_ETH0_PRIORITY',2,3),(15,'BACKRT_ETH0_WEIGHT',2,3),(16,'BACKRT_ETH1_ENABLED',2,3),(17,'BACKRT_ETH1_PING_INTVL',2,3),(18,'BACKRT_ETH1_PING_IPADDR',2,3),(19,'BACKRT_ETH1_PING_TOUT',2,3),(20,'BACKRT_ETH1_PRIORITY',2,3),(21,'BACKRT_ETH1_WEIGHT',2,3),(22,'BACKRT_MODE',2,3),(23,'BACKRT_MWAN_ENABLED',2,3),(24,'BACKRT_MWAN_PRIORITY',2,3),(25,'BACKRT_MWAN_WEIGHT',2,3),(26,'BACKRT_PPPOE_ENABLED',2,3),(27,'BACKRT_PPPOE_PING_INTVL',2,3),(28,'BACKRT_PPPOE_PING_IPADDR',2,3),(29,'BACKRT_PPPOE_PING_TOUT',2,3),(30,'BACKRT_PPPOE_PRIORITY',2,3),(31,'BACKRT_PPPOE_WEIGHT',2,3),(32,'BACKRT_WIFI_ENABLED',2,3),(33,'BACKRT_WIFI_PING_INTVL',2,3),(34,'BACKRT_WIFI_PING_IPADDR',2,3),(35,'BACKRT_WIFI_PING_TOUT',2,3),(36,'BACKRT_WIFI_PRIORITY',2,3),(37,'BACKRT_WIFI_WEIGHT',2,3),(38,'DYNDNS_ENABLED',3,3),(39,'DYNDNS_HOSTNAME',3,3),(40,'DYNDNS_PASSWORD',3,3),(41,'DYNDNS_SERVER',3,3),(42,'DYNDNS_USERNAME',3,3),(43,'ETH2_BOOTPROTO',4,3),(44,'ETH2_BRIDGED',4,3),(45,'ETH2_DHCP_LEASE_TIME',4,3),(46,'ETH2_DHCP_POOL_ENABLED',4,3),(47,'ETH2_DHCP_POOL_HI',4,3),(48,'ETH2_DHCP_POOL_LO',4,3),(49,'ETH2_DHCP_STAT_ENABLED',4,3),(50,'ETH2_DHCP_STAT_IPADDR1',4,3),(51,'ETH2_DHCP_STAT_IPADDR2',4,3),(52,'ETH2_DHCP_STAT_IPADDR3',4,3),(53,'ETH2_DHCP_STAT_IPADDR4',4,3),(54,'ETH2_DHCP_STAT_IPADDR5',4,3),(55,'ETH2_DHCP_STAT_IPADDR6',4,3),(56,'ETH2_DHCP_STAT_MAC1',4,3),(57,'ETH2_DHCP_STAT_MAC2',4,3),(58,'ETH2_DHCP_STAT_MAC3',4,3),(59,'ETH2_DHCP_STAT_MAC4',4,3),(60,'ETH2_DHCP_STAT_MAC5',4,3),(61,'ETH2_DHCP_STAT_MAC6',4,3),(62,'ETH2_GATEWAY',4,3),(63,'ETH2_IEEE8021X_CA_CERT',4,3),(64,'ETH2_IEEE8021X_ENABLED',4,3),(65,'ETH2_IEEE8021X_IDENTITY',4,3),(66,'ETH2_IEEE8021X_LOCAL_CERT',4,3),(67,'ETH2_IEEE8021X_LOCAL_KEY',4,3),(68,'ETH2_IEEE8021X_METHOD',4,3),(69,'ETH2_IEEE8021X_PASSWORD',4,3),(70,'ETH2_IPADDR',4,3),(71,'ETH2_MEDIA',4,3),(72,'ETH2_NETMASK',4,3),(73,'ETH2_NETWORK',4,3),(74,'ETH2_PRIMARY_DNS',4,3),(75,'ETH_BOOTPROTO',5,3),(76,'ETH_BRIDGED',5,3),(77,'ETH_DHCP_LEASE_TIME',5,3),(78,'ETH_DHCP_POOL_ENABLED',5,3),(79,'ETH_DHCP_POOL_HI',5,3),(80,'ETH_DHCP_POOL_LO',5,3),(81,'ETH_DHCP_STAT_ENABLED',5,3),(82,'ETH_DHCP_STAT_IPADDR1',5,3),(83,'ETH_DHCP_STAT_IPADDR2',5,3),(84,'ETH_DHCP_STAT_IPADDR3',5,3),(85,'ETH_DHCP_STAT_IPADDR4',5,3),(86,'ETH_DHCP_STAT_IPADDR5',5,3),(87,'ETH_DHCP_STAT_IPADDR6',5,3),(88,'ETH_DHCP_STAT_MAC1',5,3),(89,'ETH_DHCP_STAT_MAC2',5,3),(90,'ETH_DHCP_STAT_MAC3',5,3),(91,'ETH_DHCP_STAT_MAC4',5,3),(92,'ETH_DHCP_STAT_MAC5',5,3),(93,'ETH_DHCP_STAT_MAC6',5,3),(94,'ETH_GATEWAY',5,3),(95,'ETH_IEEE8021X_CA_CERT',5,3),(96,'ETH_IEEE8021X_ENABLED',5,3),(97,'ETH_IEEE8021X_IDENTITY',5,3),(98,'ETH_IEEE8021X_LOCAL_CERT',5,3),(99,'ETH_IEEE8021X_LOCAL_KEY',5,3),(100,'ETH_IEEE8021X_METHOD',5,3),(101,'ETH_IEEE8021X_PASSWORD',5,3),(102,'ETH_IPADDR',5,3),(103,'ETH_MEDIA',5,3),(104,'ETH_NETMASK',5,3),(105,'ETH_NETWORK',5,3),(106,'ETH_PRIMARY_DNS',5,3),(107,'FTP_ENABLED',6,3),(108,'FTP_MAX_SESSIONS',6,3),(109,'FTP_SESSION_TIMEOUT',6,3),(110,'FW_FWD_ENABLED',7,3),(111,'FW_FWD_RULE1_ACTION',7,3),(112,'FW_FWD_RULE1_DESCRIPTION',7,3),(113,'FW_FWD_RULE1_DST_IPADDR',7,3),(114,'FW_FWD_RULE1_DST_PORT',7,3),(115,'FW_FWD_RULE1_ENABLED',7,3),(116,'FW_FWD_RULE1_PROTO',7,3),(117,'FW_FWD_RULE1_SRC_IPADDR',7,3),(118,'FW_FWD_RULE2_ACTION',7,3),(119,'FW_FWD_RULE2_DESCRIPTION',7,3),(120,'FW_FWD_RULE2_DST_IPADDR',7,3),(121,'FW_FWD_RULE2_DST_PORT',7,3),(122,'FW_FWD_RULE2_ENABLED',7,3),(123,'FW_FWD_RULE2_PROTO',7,3),(124,'FW_FWD_RULE2_SRC_IPADDR',7,3),(125,'FW_FWD_RULE3_ACTION',7,3),(126,'FW_FWD_RULE3_DESCRIPTION',7,3),(127,'FW_FWD_RULE3_DST_IPADDR',7,3),(128,'FW_FWD_RULE3_DST_PORT',7,3),(129,'FW_FWD_RULE3_ENABLED',7,3),(130,'FW_FWD_RULE3_PROTO',7,3),(131,'FW_FWD_RULE3_SRC_IPADDR',7,3),(132,'FW_FWD_RULE4_ACTION',7,3),(133,'FW_FWD_RULE4_DESCRIPTION',7,3),(134,'FW_FWD_RULE4_DST_IPADDR',7,3),(135,'FW_FWD_RULE4_DST_PORT',7,3),(136,'FW_FWD_RULE4_ENABLED',7,3),(137,'FW_FWD_RULE4_PROTO',7,3),(138,'FW_FWD_RULE4_SRC_IPADDR',7,3),(139,'FW_FWD_RULE5_ACTION',7,3),(140,'FW_FWD_RULE5_DESCRIPTION',7,3),(141,'FW_FWD_RULE5_DST_IPADDR',7,3),(142,'FW_FWD_RULE5_DST_PORT',7,3),(143,'FW_FWD_RULE5_ENABLED',7,3),(144,'FW_FWD_RULE5_PROTO',7,3),(145,'FW_FWD_RULE5_SRC_IPADDR',7,3),(146,'FW_FWD_RULE6_ACTION',7,3),(147,'FW_FWD_RULE6_DESCRIPTION',7,3),(148,'FW_FWD_RULE6_DST_IPADDR',7,3),(149,'FW_FWD_RULE6_DST_PORT',7,3),(150,'FW_FWD_RULE6_ENABLED',7,3),(151,'FW_FWD_RULE6_PROTO',7,3),(152,'FW_FWD_RULE6_SRC_IPADDR',7,3),(153,'FW_FWD_RULE7_ACTION',7,3),(154,'FW_FWD_RULE7_DESCRIPTION',7,3),(155,'FW_FWD_RULE7_DST_IPADDR',7,3),(156,'FW_FWD_RULE7_DST_PORT',7,3),(157,'FW_FWD_RULE7_ENABLED',7,3),(158,'FW_FWD_RULE7_PROTO',7,3),(159,'FW_FWD_RULE7_SRC_IPADDR',7,3),(160,'FW_FWD_RULE8_ACTION',7,3),(161,'FW_FWD_RULE8_DESCRIPTION',7,3),(162,'FW_FWD_RULE8_DST_IPADDR',7,3),(163,'FW_FWD_RULE8_DST_PORT',7,3),(164,'FW_FWD_RULE8_ENABLED',7,3),(165,'FW_FWD_RULE8_PROTO',7,3),(166,'FW_FWD_RULE8_SRC_IPADDR',7,3),(167,'FW_LIM_ENABLED',7,3),(168,'FW_LOC_ENABLED',7,3),(169,'FW_PRE_ENABLED',7,3),(170,'FW_PRE_RULE1_ACTION',7,3),(171,'FW_PRE_RULE1_DESCRIPTION',7,3),(172,'FW_PRE_RULE1_DST_PORT',7,3),(173,'FW_PRE_RULE1_ENABLED',7,3),(174,'FW_PRE_RULE1_PROTO',7,3),(175,'FW_PRE_RULE1_SRC_IPADDR',7,3),(176,'FW_PRE_RULE2_ACTION',7,3),(177,'FW_PRE_RULE2_DESCRIPTION',7,3),(178,'FW_PRE_RULE2_DST_PORT',7,3),(179,'FW_PRE_RULE2_ENABLED',7,3),(180,'FW_PRE_RULE2_PROTO',7,3),(181,'FW_PRE_RULE2_SRC_IPADDR',7,3),(182,'FW_PRE_RULE3_ACTION',7,3),(183,'FW_PRE_RULE3_DESCRIPTION',7,3),(184,'FW_PRE_RULE3_DST_PORT',7,3),(185,'FW_PRE_RULE3_ENABLED',7,3),(186,'FW_PRE_RULE3_PROTO',7,3),(187,'FW_PRE_RULE3_SRC_IPADDR',7,3),(188,'FW_PRE_RULE4_ACTION',7,3),(189,'FW_PRE_RULE4_DESCRIPTION',7,3),(190,'FW_PRE_RULE4_DST_PORT',7,3),(191,'FW_PRE_RULE4_ENABLED',7,3),(192,'FW_PRE_RULE4_PROTO',7,3),(193,'FW_PRE_RULE4_SRC_IPADDR',7,3),(194,'FW_PRE_RULE5_ACTION',7,3),(195,'FW_PRE_RULE5_DESCRIPTION',7,3),(196,'FW_PRE_RULE5_DST_PORT',7,3),(197,'FW_PRE_RULE5_ENABLED',7,3),(198,'FW_PRE_RULE5_PROTO',7,3),(199,'FW_PRE_RULE5_SRC_IPADDR',7,3),(200,'FW_PRE_RULE6_ACTION',7,3),(201,'FW_PRE_RULE6_DESCRIPTION',7,3),(202,'FW_PRE_RULE6_DST_PORT',7,3),(203,'FW_PRE_RULE6_ENABLED',7,3),(204,'FW_PRE_RULE6_PROTO',7,3),(205,'FW_PRE_RULE6_SRC_IPADDR',7,3),(206,'FW_PRE_RULE7_ACTION',7,3),(207,'FW_PRE_RULE7_DESCRIPTION',7,3),(208,'FW_PRE_RULE7_DST_PORT',7,3),(209,'FW_PRE_RULE7_ENABLED',7,3),(210,'FW_PRE_RULE7_PROTO',7,3),(211,'FW_PRE_RULE7_SRC_IPADDR',7,3),(212,'FW_PRE_RULE8_ACTION',7,3),(213,'FW_PRE_RULE8_DESCRIPTION',7,3),(214,'FW_PRE_RULE8_DST_PORT',7,3),(215,'FW_PRE_RULE8_ENABLED',7,3),(216,'FW_PRE_RULE8_PROTO',7,3),(217,'FW_PRE_RULE8_SRC_IPADDR',7,3),(218,'GRE2_DESCRIPTION',8,3),(219,'GRE2_DST_IPADDR',8,3),(220,'GRE2_ENABLED',8,3),(221,'GRE2_MULTICAST',8,3),(222,'GRE2_PSK',8,3),(223,'GRE2_REMOTE_IPADDR',8,3),(224,'GRE2_REMOTE_NETMASK',8,3),(225,'GRE2_REMOTE_NETWORK',8,3),(226,'GRE2_SRC_IPADDR',8,3),(227,'GRE3_DESCRIPTION',9,3),(228,'GRE3_DST_IPADDR',9,3),(229,'GRE3_ENABLED',9,3),(230,'GRE3_MULTICAST',9,3),(231,'GRE3_PSK',9,3),(232,'GRE3_REMOTE_IPADDR',9,3),(233,'GRE3_REMOTE_NETMASK',9,3),(234,'GRE3_REMOTE_NETWORK',9,3),(235,'GRE3_SRC_IPADDR',9,3),(236,'GRE4_DESCRIPTION',10,3),(237,'GRE4_DST_IPADDR',10,3),(238,'GRE4_ENABLED',10,3),(239,'GRE4_MULTICAST',10,3),(240,'GRE4_PSK',10,3),(241,'GRE4_REMOTE_IPADDR',10,3),(242,'GRE4_REMOTE_NETMASK',10,3),(243,'GRE4_REMOTE_NETWORK',10,3),(244,'GRE4_SRC_IPADDR',10,3),(245,'GRE_DESCRIPTION',11,3),(246,'GRE_DST_IPADDR',11,3),(247,'GRE_ENABLED',11,3),(248,'GRE_MULTICAST',11,3),(249,'GRE_PSK',11,3),(250,'GRE_REMOTE_IPADDR',11,3),(251,'GRE_REMOTE_NETMASK',11,3),(252,'GRE_REMOTE_NETWORK',11,3),(253,'GRE_SRC_IPADDR',11,3),(254,'HTTP_ENABLE_HTTP',12,3),(255,'HTTP_ENABLE_HTTPS',12,3),(256,'HTTP_SESSION_TIMEOUT',12,3),(257,'HTTP_TLS_MIN_PROTO',12,3),(258,'IPSEC2_AGGRESSIVE',13,3),(259,'IPSEC2_AUTHBY',13,3),(260,'IPSEC2_CA_CERT',13,3),(261,'IPSEC2_DEBUG',13,3),(262,'IPSEC2_DESCRIPTION',13,3),(263,'IPSEC2_DPD_DELAY',13,3),(264,'IPSEC2_DPD_TIMEOUT',13,3),(265,'IPSEC2_ENABLED',13,3),(266,'IPSEC2_ENCAP',13,3),(267,'IPSEC2_ESP_ALG',13,3),(268,'IPSEC2_ESP_ENC',13,3),(269,'IPSEC2_ESP_HASH',13,3),(270,'IPSEC2_FORCE_ENCAPS',13,3),(271,'IPSEC2_IKE_ALG',13,3),(272,'IPSEC2_IKE_DH',13,3),(273,'IPSEC2_IKE_ENC',13,3),(274,'IPSEC2_IKE_HASH',13,3),(275,'IPSEC2_IKE_LIFE',13,3),(276,'IPSEC2_IKE_PROTOCOL',13,3),(277,'IPSEC2_IKE_REAUTH',13,3),(278,'IPSEC2_KEY_LIFE',13,3),(279,'IPSEC2_LOCAL_CERT',13,3),(280,'IPSEC2_LOCAL_ID',13,3),(281,'IPSEC2_LOCAL_KEY',13,3),(282,'IPSEC2_LOCAL_NETMASK',13,3),(283,'IPSEC2_LOCAL_NETMASK2',13,3),(284,'IPSEC2_LOCAL_NETWORK',13,3),(285,'IPSEC2_LOCAL_NETWORK2',13,3),(286,'IPSEC2_LOCAL_PASS',13,3),(287,'IPSEC2_LOCAL_PROTOPORT',13,3),(288,'IPSEC2_PFS',13,3),(289,'IPSEC2_PFS_DH',13,3),(290,'IPSEC2_PSK',13,3),(291,'IPSEC2_REKEY_FUZZ',13,3),(292,'IPSEC2_REKEY_MARGIN',13,3),(293,'IPSEC2_REMOTE_CERT',13,3),(294,'IPSEC2_REMOTE_ID',13,3),(295,'IPSEC2_REMOTE_IPADDR',13,3),(296,'IPSEC2_REMOTE_NETMASK',13,3),(297,'IPSEC2_REMOTE_NETMASK2',13,3),(298,'IPSEC2_REMOTE_NETWORK',13,3),(299,'IPSEC2_REMOTE_NETWORK2',13,3),(300,'IPSEC2_REMOTE_PROTOPORT',13,3),(301,'IPSEC2_XAUTH_ENABLED',13,3),(302,'IPSEC2_XAUTH_MODE',13,3),(303,'IPSEC2_XAUTH_PASS',13,3),(304,'IPSEC2_XAUTH_USER',13,3),(305,'IPSEC3_AGGRESSIVE',14,3),(306,'IPSEC3_AUTHBY',14,3),(307,'IPSEC3_CA_CERT',14,3),(308,'IPSEC3_DEBUG',14,3),(309,'IPSEC3_DESCRIPTION',14,3),(310,'IPSEC3_DPD_DELAY',14,3),(311,'IPSEC3_DPD_TIMEOUT',14,3),(312,'IPSEC3_ENABLED',14,3),(313,'IPSEC3_ENCAP',14,3),(314,'IPSEC3_ESP_ALG',14,3),(315,'IPSEC3_ESP_ENC',14,3),(316,'IPSEC3_ESP_HASH',14,3),(317,'IPSEC3_FORCE_ENCAPS',14,3),(318,'IPSEC3_IKE_ALG',14,3),(319,'IPSEC3_IKE_DH',14,3),(320,'IPSEC3_IKE_ENC',14,3),(321,'IPSEC3_IKE_HASH',14,3),(322,'IPSEC3_IKE_LIFE',14,3),(323,'IPSEC3_IKE_PROTOCOL',14,3),(324,'IPSEC3_IKE_REAUTH',14,3),(325,'IPSEC3_KEY_LIFE',14,3),(326,'IPSEC3_LOCAL_CERT',14,3),(327,'IPSEC3_LOCAL_ID',14,3),(328,'IPSEC3_LOCAL_KEY',14,3),(329,'IPSEC3_LOCAL_NETMASK',14,3),(330,'IPSEC3_LOCAL_NETMASK2',14,3),(331,'IPSEC3_LOCAL_NETWORK',14,3),(332,'IPSEC3_LOCAL_NETWORK2',14,3),(333,'IPSEC3_LOCAL_PASS',14,3),(334,'IPSEC3_LOCAL_PROTOPORT',14,3),(335,'IPSEC3_PFS',14,3),(336,'IPSEC3_PFS_DH',14,3),(337,'IPSEC3_PSK',14,3),(338,'IPSEC3_REKEY_FUZZ',14,3),(339,'IPSEC3_REKEY_MARGIN',14,3),(340,'IPSEC3_REMOTE_CERT',14,3),(341,'IPSEC3_REMOTE_ID',14,3),(342,'IPSEC3_REMOTE_IPADDR',14,3),(343,'IPSEC3_REMOTE_NETMASK',14,3),(344,'IPSEC3_REMOTE_NETMASK2',14,3),(345,'IPSEC3_REMOTE_NETWORK',14,3),(346,'IPSEC3_REMOTE_NETWORK2',14,3),(347,'IPSEC3_REMOTE_PROTOPORT',14,3),(348,'IPSEC3_XAUTH_ENABLED',14,3),(349,'IPSEC3_XAUTH_MODE',14,3),(350,'IPSEC3_XAUTH_PASS',14,3),(351,'IPSEC3_XAUTH_USER',14,3),(352,'IPSEC4_AGGRESSIVE',15,3),(353,'IPSEC4_AUTHBY',15,3),(354,'IPSEC4_CA_CERT',15,3),(355,'IPSEC4_DEBUG',15,3),(356,'IPSEC4_DESCRIPTION',15,3),(357,'IPSEC4_DPD_DELAY',15,3),(358,'IPSEC4_DPD_TIMEOUT',15,3),(359,'IPSEC4_ENABLED',15,3),(360,'IPSEC4_ENCAP',15,3),(361,'IPSEC4_ESP_ALG',15,3),(362,'IPSEC4_ESP_ENC',15,3),(363,'IPSEC4_ESP_HASH',15,3),(364,'IPSEC4_FORCE_ENCAPS',15,3),(365,'IPSEC4_IKE_ALG',15,3),(366,'IPSEC4_IKE_DH',15,3),(367,'IPSEC4_IKE_ENC',15,3),(368,'IPSEC4_IKE_HASH',15,3),(369,'IPSEC4_IKE_LIFE',15,3),(370,'IPSEC4_IKE_PROTOCOL',15,3),(371,'IPSEC4_IKE_REAUTH',15,3),(372,'IPSEC4_KEY_LIFE',15,3),(373,'IPSEC4_LOCAL_CERT',15,3),(374,'IPSEC4_LOCAL_ID',15,3),(375,'IPSEC4_LOCAL_KEY',15,3),(376,'IPSEC4_LOCAL_NETMASK',15,3),(377,'IPSEC4_LOCAL_NETMASK2',15,3),(378,'IPSEC4_LOCAL_NETWORK',15,3),(379,'IPSEC4_LOCAL_NETWORK2',15,3),(380,'IPSEC4_LOCAL_PASS',15,3),(381,'IPSEC4_LOCAL_PROTOPORT',15,3),(382,'IPSEC4_PFS',15,3),(383,'IPSEC4_PFS_DH',15,3),(384,'IPSEC4_PSK',15,3),(385,'IPSEC4_REKEY_FUZZ',15,3),(386,'IPSEC4_REKEY_MARGIN',15,3),(387,'IPSEC4_REMOTE_CERT',15,3),(388,'IPSEC4_REMOTE_ID',15,3),(389,'IPSEC4_REMOTE_IPADDR',15,3),(390,'IPSEC4_REMOTE_NETMASK',15,3),(391,'IPSEC4_REMOTE_NETMASK2',15,3),(392,'IPSEC4_REMOTE_NETWORK',15,3),(393,'IPSEC4_REMOTE_NETWORK2',15,3),(394,'IPSEC4_REMOTE_PROTOPORT',15,3),(395,'IPSEC4_XAUTH_ENABLED',15,3),(396,'IPSEC4_XAUTH_MODE',15,3),(397,'IPSEC4_XAUTH_PASS',15,3),(398,'IPSEC4_XAUTH_USER',15,3),(399,'IPSEC_AGGRESSIVE',16,3),(400,'IPSEC_AUTHBY',16,3),(401,'IPSEC_CA_CERT',16,3),(402,'IPSEC_DEBUG',16,3),(403,'IPSEC_DESCRIPTION',16,3),(404,'IPSEC_DPD_DELAY',16,3),(405,'IPSEC_DPD_TIMEOUT',16,3),(406,'IPSEC_ENABLED',16,3),(407,'IPSEC_ENCAP',16,3),(408,'IPSEC_ESP_ALG',16,3),(409,'IPSEC_ESP_ENC',16,3),(410,'IPSEC_ESP_HASH',16,3),(411,'IPSEC_FORCE_ENCAPS',16,3),(412,'IPSEC_IKE_ALG',16,3),(413,'IPSEC_IKE_DH',16,3),(414,'IPSEC_IKE_ENC',16,3),(415,'IPSEC_IKE_HASH',16,3),(416,'IPSEC_IKE_LIFE',16,3),(417,'IPSEC_IKE_PROTOCOL',16,3),(418,'IPSEC_IKE_REAUTH',16,3),(419,'IPSEC_KEY_LIFE',16,3),(420,'IPSEC_LOCAL_CERT',16,3),(421,'IPSEC_LOCAL_ID',16,3),(422,'IPSEC_LOCAL_KEY',16,3),(423,'IPSEC_LOCAL_NETMASK',16,3),(424,'IPSEC_LOCAL_NETMASK2',16,3),(425,'IPSEC_LOCAL_NETWORK',16,3),(426,'IPSEC_LOCAL_NETWORK2',16,3),(427,'IPSEC_LOCAL_PASS',16,3),(428,'IPSEC_LOCAL_PROTOPORT',16,3),(429,'IPSEC_PFS',16,3),(430,'IPSEC_PFS_DH',16,3),(431,'IPSEC_PSK',16,3),(432,'IPSEC_REKEY_FUZZ',16,3),(433,'IPSEC_REKEY_MARGIN',16,3),(434,'IPSEC_REMOTE_CERT',16,3),(435,'IPSEC_REMOTE_ID',16,3),(436,'IPSEC_REMOTE_IPADDR',16,3),(437,'IPSEC_REMOTE_NETMASK',16,3),(438,'IPSEC_REMOTE_NETMASK2',16,3),(439,'IPSEC_REMOTE_NETWORK',16,3),(440,'IPSEC_REMOTE_NETWORK2',16,3),(441,'IPSEC_REMOTE_PROTOPORT',16,3),(442,'IPSEC_XAUTH_ENABLED',16,3),(443,'IPSEC_XAUTH_MODE',16,3),(444,'IPSEC_XAUTH_PASS',16,3),(445,'IPSEC_XAUTH_USER',16,3),(446,'IP_DOWN',17,3),(447,'IP_UP',17,3),(448,'L2TP_CLIENT',18,3),(449,'L2TP_CLIENT_IPADDR_HI',18,3),(450,'L2TP_CLIENT_IPADDR_LO',18,3),(451,'L2TP_ENABLED',18,3),(452,'L2TP_LOCAL_IPADDR',18,3),(453,'L2TP_PASSWORD',18,3),(454,'L2TP_REMOTE_IPADDR',18,3),(455,'L2TP_REMOTE_NETMASK',18,3),(456,'L2TP_REMOTE_NETWORK',18,3),(457,'L2TP_SERVER_IPADDR',18,3),(458,'L2TP_USERNAME',18,3),(459,'NAT_DEFAULT_ENABLED',19,3),(460,'NAT_DEFAULT_IPADDR',19,3),(461,'NAT_MASQUERADE',19,3),(462,'NAT_PORT10_DESCRIPTION',19,3),(463,'NAT_PORT10_IPADDR',19,3),(464,'NAT_PORT10_PRIVATE',19,3),(465,'NAT_PORT10_PUBLIC',19,3),(466,'NAT_PORT10_TYPE',19,3),(467,'NAT_PORT11_DESCRIPTION',19,3),(468,'NAT_PORT11_IPADDR',19,3),(469,'NAT_PORT11_PRIVATE',19,3),(470,'NAT_PORT11_PUBLIC',19,3),(471,'NAT_PORT11_TYPE',19,3),(472,'NAT_PORT12_DESCRIPTION',19,3),(473,'NAT_PORT12_IPADDR',19,3),(474,'NAT_PORT12_PRIVATE',19,3),(475,'NAT_PORT12_PUBLIC',19,3),(476,'NAT_PORT12_TYPE',19,3),(477,'NAT_PORT13_DESCRIPTION',19,3),(478,'NAT_PORT13_IPADDR',19,3),(479,'NAT_PORT13_PRIVATE',19,3),(480,'NAT_PORT13_PUBLIC',19,3),(481,'NAT_PORT13_TYPE',19,3),(482,'NAT_PORT14_DESCRIPTION',19,3),(483,'NAT_PORT14_IPADDR',19,3),(484,'NAT_PORT14_PRIVATE',19,3),(485,'NAT_PORT14_PUBLIC',19,3),(486,'NAT_PORT14_TYPE',19,3),(487,'NAT_PORT15_DESCRIPTION',19,3),(488,'NAT_PORT15_IPADDR',19,3),(489,'NAT_PORT15_PRIVATE',19,3),(490,'NAT_PORT15_PUBLIC',19,3),(491,'NAT_PORT15_TYPE',19,3),(492,'NAT_PORT16_DESCRIPTION',19,3),(493,'NAT_PORT16_IPADDR',19,3),(494,'NAT_PORT16_PRIVATE',19,3),(495,'NAT_PORT16_PUBLIC',19,3),(496,'NAT_PORT16_TYPE',19,3),(497,'NAT_PORT1_DESCRIPTION',19,3),(498,'NAT_PORT1_IPADDR',19,3),(499,'NAT_PORT1_PRIVATE',19,3),(500,'NAT_PORT1_PUBLIC',19,3),(501,'NAT_PORT1_TYPE',19,3),(502,'NAT_PORT2_DESCRIPTION',19,3),(503,'NAT_PORT2_IPADDR',19,3),(504,'NAT_PORT2_PRIVATE',19,3),(505,'NAT_PORT2_PUBLIC',19,3),(506,'NAT_PORT2_TYPE',19,3),(507,'NAT_PORT3_DESCRIPTION',19,3),(508,'NAT_PORT3_IPADDR',19,3),(509,'NAT_PORT3_PRIVATE',19,3),(510,'NAT_PORT3_PUBLIC',19,3),(511,'NAT_PORT3_TYPE',19,3),(512,'NAT_PORT4_DESCRIPTION',19,3),(513,'NAT_PORT4_IPADDR',19,3),(514,'NAT_PORT4_PRIVATE',19,3),(515,'NAT_PORT4_PUBLIC',19,3),(516,'NAT_PORT4_TYPE',19,3),(517,'NAT_PORT5_DESCRIPTION',19,3),(518,'NAT_PORT5_IPADDR',19,3),(519,'NAT_PORT5_PRIVATE',19,3),(520,'NAT_PORT5_PUBLIC',19,3),(521,'NAT_PORT5_TYPE',19,3),(522,'NAT_PORT6_DESCRIPTION',19,3),(523,'NAT_PORT6_IPADDR',19,3),(524,'NAT_PORT6_PRIVATE',19,3),(525,'NAT_PORT6_PUBLIC',19,3),(526,'NAT_PORT6_TYPE',19,3),(527,'NAT_PORT7_DESCRIPTION',19,3),(528,'NAT_PORT7_IPADDR',19,3),(529,'NAT_PORT7_PRIVATE',19,3),(530,'NAT_PORT7_PUBLIC',19,3),(531,'NAT_PORT7_TYPE',19,3),(532,'NAT_PORT8_DESCRIPTION',19,3),(533,'NAT_PORT8_IPADDR',19,3),(534,'NAT_PORT8_PRIVATE',19,3),(535,'NAT_PORT8_PUBLIC',19,3),(536,'NAT_PORT8_TYPE',19,3),(537,'NAT_PORT9_DESCRIPTION',19,3),(538,'NAT_PORT9_IPADDR',19,3),(539,'NAT_PORT9_PRIVATE',19,3),(540,'NAT_PORT9_PUBLIC',19,3),(541,'NAT_PORT9_TYPE',19,3),(542,'NAT_REMOTE_FTP',19,3),(543,'NAT_REMOTE_FTP_PORT',19,3),(544,'NAT_REMOTE_HTTP',19,3),(545,'NAT_REMOTE_HTTPS',19,3),(546,'NAT_REMOTE_HTTPS_PORT',19,3),(547,'NAT_REMOTE_HTTP_PORT',19,3),(548,'NAT_REMOTE_SNMP',19,3),(549,'NAT_REMOTE_SNMP_PORT',19,3),(550,'NAT_REMOTE_SSH',19,3),(551,'NAT_REMOTE_SSH_PORT',19,3),(552,'NAT_REMOTE_TELNET',19,3),(553,'NAT_REMOTE_TELNET_PORT',19,3),(554,'NTP_DAYLIGHT',20,3),(555,'NTP_ENABLED',20,3),(556,'NTP_PRIMARY_SERVER',20,3),(557,'NTP_SECONDARY_SERVER',20,3),(558,'NTP_SERVICE',20,3),(559,'NTP_TIMEZONE',20,3),(560,'OPENVPN2_AUTH',21,3),(561,'OPENVPN2_CA_CERT',21,3),(562,'OPENVPN2_COMP',21,3),(563,'OPENVPN2_DESCRIPTION',21,3),(564,'OPENVPN2_DH_PARAMS',21,3),(565,'OPENVPN2_ENABLED',21,3),(566,'OPENVPN2_EXTRA_OPTS',21,3),(567,'OPENVPN2_FRAGMENT',21,3),(568,'OPENVPN2_LOCAL_CERT',21,3),(569,'OPENVPN2_LOCAL_IF_IPADDR',21,3),(570,'OPENVPN2_LOCAL_KEY',21,3),(571,'OPENVPN2_NAT',21,3),(572,'OPENVPN2_PASSWORD',21,3),(573,'OPENVPN2_PING_INTVL',21,3),(574,'OPENVPN2_PING_TOUT',21,3),(575,'OPENVPN2_PORT',21,3),(576,'OPENVPN2_PROTO',21,3),(577,'OPENVPN2_REDIRECT_GW',21,3),(578,'OPENVPN2_REMOTE_IF_IPADDR',21,3),(579,'OPENVPN2_REMOTE_IPADDR',21,3),(580,'OPENVPN2_REMOTE_NETMASK',21,3),(581,'OPENVPN2_REMOTE_NETWORK',21,3),(582,'OPENVPN2_RENEG_SEC',21,3),(583,'OPENVPN2_SECRET',21,3),(584,'OPENVPN2_USERNAME',21,3),(585,'OPENVPN3_AUTH',22,3),(586,'OPENVPN3_CA_CERT',22,3),(587,'OPENVPN3_COMP',22,3),(588,'OPENVPN3_DESCRIPTION',22,3),(589,'OPENVPN3_DH_PARAMS',22,3),(590,'OPENVPN3_ENABLED',22,3),(591,'OPENVPN3_EXTRA_OPTS',22,3),(592,'OPENVPN3_FRAGMENT',22,3),(593,'OPENVPN3_LOCAL_CERT',22,3),(594,'OPENVPN3_LOCAL_IF_IPADDR',22,3),(595,'OPENVPN3_LOCAL_KEY',22,3),(596,'OPENVPN3_NAT',22,3),(597,'OPENVPN3_PASSWORD',22,3),(598,'OPENVPN3_PING_INTVL',22,3),(599,'OPENVPN3_PING_TOUT',22,3),(600,'OPENVPN3_PORT',22,3),(601,'OPENVPN3_PROTO',22,3),(602,'OPENVPN3_REDIRECT_GW',22,3),(603,'OPENVPN3_REMOTE_IF_IPADDR',22,3),(604,'OPENVPN3_REMOTE_IPADDR',22,3),(605,'OPENVPN3_REMOTE_NETMASK',22,3),(606,'OPENVPN3_REMOTE_NETWORK',22,3),(607,'OPENVPN3_RENEG_SEC',22,3),(608,'OPENVPN3_SECRET',22,3),(609,'OPENVPN3_USERNAME',22,3),(610,'OPENVPN4_AUTH',23,3),(611,'OPENVPN4_CA_CERT',23,3),(612,'OPENVPN4_COMP',23,3),(613,'OPENVPN4_DESCRIPTION',23,3),(614,'OPENVPN4_DH_PARAMS',23,3),(615,'OPENVPN4_ENABLED',23,3),(616,'OPENVPN4_EXTRA_OPTS',23,3),(617,'OPENVPN4_FRAGMENT',23,3),(618,'OPENVPN4_LOCAL_CERT',23,3),(619,'OPENVPN4_LOCAL_IF_IPADDR',23,3),(620,'OPENVPN4_LOCAL_KEY',23,3),(621,'OPENVPN4_NAT',23,3),(622,'OPENVPN4_PASSWORD',23,3),(623,'OPENVPN4_PING_INTVL',23,3),(624,'OPENVPN4_PING_TOUT',23,3),(625,'OPENVPN4_PORT',23,3),(626,'OPENVPN4_PROTO',23,3),(627,'OPENVPN4_REDIRECT_GW',23,3),(628,'OPENVPN4_REMOTE_IF_IPADDR',23,3),(629,'OPENVPN4_REMOTE_IPADDR',23,3),(630,'OPENVPN4_REMOTE_NETMASK',23,3),(631,'OPENVPN4_REMOTE_NETWORK',23,3),(632,'OPENVPN4_RENEG_SEC',23,3),(633,'OPENVPN4_SECRET',23,3),(634,'OPENVPN4_USERNAME',23,3),(635,'OPENVPN_AUTH',24,3),(636,'OPENVPN_CA_CERT',24,3),(637,'OPENVPN_COMP',24,3),(638,'OPENVPN_DESCRIPTION',24,3),(639,'OPENVPN_DH_PARAMS',24,3),(640,'OPENVPN_ENABLED',24,3),(641,'OPENVPN_EXTRA_OPTS',24,3),(642,'OPENVPN_FRAGMENT',24,3),(643,'OPENVPN_LOCAL_CERT',24,3),(644,'OPENVPN_LOCAL_IF_IPADDR',24,3),(645,'OPENVPN_LOCAL_KEY',24,3),(646,'OPENVPN_NAT',24,3),(647,'OPENVPN_PASSWORD',24,3),(648,'OPENVPN_PING_INTVL',24,3),(649,'OPENVPN_PING_TOUT',24,3),(650,'OPENVPN_PORT',24,3),(651,'OPENVPN_PROTO',24,3),(652,'OPENVPN_REDIRECT_GW',24,3),(653,'OPENVPN_REMOTE_IF_IPADDR',24,3),(654,'OPENVPN_REMOTE_IPADDR',24,3),(655,'OPENVPN_REMOTE_NETMASK',24,3),(656,'OPENVPN_REMOTE_NETWORK',24,3),(657,'OPENVPN_RENEG_SEC',24,3),(658,'OPENVPN_SECRET',24,3),(659,'OPENVPN_USERNAME',24,3),(660,'PAM_DEBUG',25,3),(661,'PAM_DEFAULT_ROLE',25,3),(662,'PAM_MODE',25,3),(663,'PAM_RADIUS1_ENABLED',25,3),(664,'PAM_RADIUS1_PORT',25,3),(665,'PAM_RADIUS1_SECRET',25,3),(666,'PAM_RADIUS1_SERVER',25,3),(667,'PAM_RADIUS1_TIMEOUT',25,3),(668,'PAM_RADIUS2_ENABLED',25,3),(669,'PAM_RADIUS2_PORT',25,3),(670,'PAM_RADIUS2_SECRET',25,3),(671,'PAM_RADIUS2_SERVER',25,3),(672,'PAM_RADIUS2_TIMEOUT',25,3),(673,'PAM_TACPLUS1_ENABLED',25,3),(674,'PAM_TACPLUS1_PORT',25,3),(675,'PAM_TACPLUS1_SECRET',25,3),(676,'PAM_TACPLUS1_SERVER',25,3),(677,'PAM_TACPLUS2_ENABLED',25,3),(678,'PAM_TACPLUS2_PORT',25,3),(679,'PAM_TACPLUS2_SECRET',25,3),(680,'PAM_TACPLUS2_SERVER',25,3),(681,'PAM_TACPLUS_LOGIN',25,3),(682,'PAM_TACPLUS_TIMEOUT',25,3),(683,'PAM_TAKE_OVER_USERS',25,3),(684,'POLICY_PWD_DIGITS',26,3),(685,'POLICY_PWD_LENGTH',26,3),(686,'POLICY_PWD_LOWERCASES',26,3),(687,'POLICY_PWD_UPPERCASES',26,3),(688,'PORT2_BAUDRATE',27,3),(689,'PORT2_DATABITS',27,3),(690,'PORT2_ENABLED',27,3),(691,'PORT2_INACT_TIME',27,3),(692,'PORT2_IPADDR',27,3),(693,'PORT2_KEEPALIVE',27,3),(694,'PORT2_KEEPALIVE_INTVL',27,3),(695,'PORT2_KEEPALIVE_PROBES',27,3),(696,'PORT2_KEEPALIVE_TIME',27,3),(697,'PORT2_MODE',27,3),(698,'PORT2_PARITY',27,3),(699,'PORT2_PORT',27,3),(700,'PORT2_PROTO',27,3),(701,'PORT2_REJECT_NEW',27,3),(702,'PORT2_SPLIT',27,3),(703,'PORT2_STOPBITS',27,3),(704,'PORT2_USE_CD',27,3),(705,'PORT2_USE_DTR',27,3),(706,'PORT_BAUDRATE',28,3),(707,'PORT_DATABITS',28,3),(708,'PORT_ENABLED',28,3),(709,'PORT_INACT_TIME',28,3),(710,'PORT_IPADDR',28,3),(711,'PORT_KEEPALIVE',28,3),(712,'PORT_KEEPALIVE_INTVL',28,3),(713,'PORT_KEEPALIVE_PROBES',28,3),(714,'PORT_KEEPALIVE_TIME',28,3),(715,'PORT_MODE',28,3),(716,'PORT_PARITY',28,3),(717,'PORT_PORT',28,3),(718,'PORT_PROTO',28,3),(719,'PORT_REJECT_NEW',28,3),(720,'PORT_SPLIT',28,3),(721,'PORT_STOPBITS',28,3),(722,'PORT_USE_CD',28,3),(723,'PORT_USE_DTR',28,3),(724,'PPPOE_AUTH',29,3),(725,'PPPOE_ENABLED',29,3),(726,'PPPOE_IFACE',29,3),(727,'PPPOE_MRU',29,3),(728,'PPPOE_MTU',29,3),(729,'PPPOE_PASSWORD',29,3),(730,'PPPOE_PRIMARY_DNS',29,3),(731,'PPPOE_USEPEERDNS',29,3),(732,'PPPOE_USERNAME',29,3),(733,'PPPOE_VLAN_ID',29,3),(734,'PPPOE_VLAN_TAG',29,3),(735,'PPP_APN',30,3),(736,'PPP_APN2',30,3),(737,'PPP_AUTH',30,3),(738,'PPP_AUTH2',30,3),(739,'PPP_DEFAULT_SIM',30,3),(740,'PPP_DNS_IPADDR',30,3),(741,'PPP_DNS_IPADDR2',30,3),(742,'PPP_ENABLED',30,3),(743,'PPP_IPADDR',30,3),(744,'PPP_IPADDR2',30,3),(745,'PPP_MONITORING',30,3),(746,'PPP_MONITORING2',30,3),(747,'PPP_MRU',30,3),(748,'PPP_MRU2',30,3),(749,'PPP_MTU',30,3),(750,'PPP_MTU2',30,3),(751,'PPP_NETTYPE',30,3),(752,'PPP_NETTYPE2',30,3),(753,'PPP_OPERATOR',30,3),(754,'PPP_OPERATOR2',30,3),(755,'PPP_PASSWORD',30,3),(756,'PPP_PASSWORD2',30,3),(757,'PPP_PHONE',30,3),(758,'PPP_PHONE2',30,3),(759,'PPP_PING',30,3),(760,'PPP_PING2',30,3),(761,'PPP_PING_BIND',30,3),(762,'PPP_PING_BIND2',30,3),(763,'PPP_PING_INTVL',30,3),(764,'PPP_PING_INTVL2',30,3),(765,'PPP_PING_IPADDR',30,3),(766,'PPP_PING_IPADDR2',30,3),(767,'PPP_PING_SINTVL',30,3),(768,'PPP_PING_SINTVL2',30,3),(769,'PPP_PING_TOUT',30,3),(770,'PPP_PING_TOUT2',30,3),(771,'PPP_PPPOE_BRIDGE',30,3),(772,'PPP_SIM_ENABLED',30,3),(773,'PPP_SIM_ENABLED2',30,3),(774,'PPP_SW_FAILURE',30,3),(775,'PPP_SW_INIT_STATE',30,3),(776,'PPP_SW_IO_BIN0',30,3),(777,'PPP_SW_IO_BIN0_2',30,3),(778,'PPP_SW_ROAMING',30,3),(779,'PPP_SW_ROAMING2',30,3),(780,'PPP_SW_TIMEOUT',30,3),(781,'PPP_SW_TIMEOUT_1ST',30,3),(782,'PPP_SW_TIMEOUT_2ND',30,3),(783,'PPP_SW_TIMEOUT_ADD',30,3),(784,'PPP_SW_TRAFFIC',30,3),(785,'PPP_SW_TRAFFIC2',30,3),(786,'PPP_SW_TRAFFIC_LIMIT',30,3),(787,'PPP_SW_TRAFFIC_LIMIT2',30,3),(788,'PPP_SW_TRAFFIC_START',30,3),(789,'PPP_SW_TRAFFIC_START2',30,3),(790,'PPP_SW_TRAFFIC_WARN',30,3),(791,'PPP_SW_TRAFFIC_WARN2',30,3),(792,'PPP_USEPEERDNS',30,3),(793,'PPP_USEPEERDNS2',30,3),(794,'PPP_USERNAME',30,3),(795,'PPP_USERNAME2',30,3),(796,'PPTP_CLIENT',31,3),(797,'PPTP_ENABLED',31,3),(798,'PPTP_LOCAL_IPADDR',31,3),(799,'PPTP_PASSWORD',31,3),(800,'PPTP_REMOTE_IPADDR',31,3),(801,'PPTP_REMOTE_NETMASK',31,3),(802,'PPTP_REMOTE_NETWORK',31,3),(803,'PPTP_SERVER_IPADDR',31,3),(804,'PPTP_USERNAME',31,3),(805,'SIM_ID',32,3),(806,'SIM_ID2',32,3),(807,'SIM_PIN',32,3),(808,'SIM_PIN2',32,3),(809,'SMS_EXT2_BAUDRATE',33,3),(810,'SMS_EXT2_ENABLED',33,3),(811,'SMS_EXT_BAUDRATE',33,3),(812,'SMS_EXT_ENABLED',33,3),(813,'SMS_IO_BIN0',33,3),(814,'SMS_RECV_COMMANDS',33,3),(815,'SMS_RECV_PHONE_NO1',33,3),(816,'SMS_RECV_PHONE_NO2',33,3),(817,'SMS_RECV_PHONE_NO3',33,3),(818,'SMS_SEND_CONNECT',33,3),(819,'SMS_SEND_DISCONNECT',33,3),(820,'SMS_SEND_IO',33,3),(821,'SMS_SEND_PHONE_NO1',33,3),(822,'SMS_SEND_PHONE_NO2',33,3),(823,'SMS_SEND_PHONE_NO3',33,3),(824,'SMS_SEND_POWERUP',33,3),(825,'SMS_SEND_TIMESTAMP',33,3),(826,'SMS_SEND_TRAFFIC',33,3),(827,'SMS_SEND_XCCNT',33,3),(828,'SMS_TCP_ENABLED',33,3),(829,'SMS_TCP_PORT',33,3),(830,'SMS_UNIT_ID',33,3),(831,'SMS_XCCNT_BIN1',33,3),(832,'SMS_XCCNT_BIN2',33,3),(833,'SMS_XCCNT_BIN3',33,3),(834,'SMS_XCCNT_BIN4',33,3),(835,'SMTP_EMAIL',34,3),(836,'SMTP_PASSWORD',34,3),(837,'SMTP_PORT',34,3),(838,'SMTP_SECURE',34,3),(839,'SMTP_SERVER',34,3),(840,'SMTP_USERNAME',34,3),(841,'SNMP_AUTH',35,3),(842,'SNMP_AUTH_PASSWORD',35,3),(843,'SNMP_AUTH_PASSWORD_RO',35,3),(844,'SNMP_AUTH_RO',35,3),(845,'SNMP_COMMUNITY',35,3),(846,'SNMP_COMMUNITY_RO',35,3),(847,'SNMP_CONTACT',35,3),(848,'SNMP_ENABLED',35,3),(849,'SNMP_IO_ENABLED',35,3),(850,'SNMP_LOCATION',35,3),(851,'SNMP_MBUS_BAUDRATE',35,3),(852,'SNMP_MBUS_ENABLED',35,3),(853,'SNMP_MBUS_PARITY',35,3),(854,'SNMP_MBUS_STOPBITS',35,3),(855,'SNMP_NAME',35,3),(856,'SNMP_PRIV',35,3),(857,'SNMP_PRIV_PASSWORD',35,3),(858,'SNMP_PRIV_PASSWORD_RO',35,3),(859,'SNMP_PRIV_RO',35,3),(860,'SNMP_REPORT_ENABLED',35,3),(861,'SNMP_REPORT_IPADDR',35,3),(862,'SNMP_REPORT_PERIOD',35,3),(863,'SNMP_USERNAME',35,3),(864,'SNMP_USERNAME_RO',35,3),(865,'SNMP_V1_ENABLED',35,3),(866,'SNMP_V3_ENABLED',35,3),(867,'SNMP_XCCNT_ENABLED',35,3),(868,'SSH_ENABLED',36,3),(869,'SSH_SESSION_TIMEOUT',36,3),(870,'STARTUP',37,3),(871,'STATRT_ENABLED',38,3),(872,'STATRT_ROUTE1_ENABLED',38,3),(873,'STATRT_ROUTE1_GATEWAY',38,3),(874,'STATRT_ROUTE1_IFACE',38,3),(875,'STATRT_ROUTE1_IPADDR',38,3),(876,'STATRT_ROUTE1_IPMASK',38,3),(877,'STATRT_ROUTE1_METRIC',38,3),(878,'STATRT_ROUTE2_ENABLED',38,3),(879,'STATRT_ROUTE2_GATEWAY',38,3),(880,'STATRT_ROUTE2_IFACE',38,3),(881,'STATRT_ROUTE2_IPADDR',38,3),(882,'STATRT_ROUTE2_IPMASK',38,3),(883,'STATRT_ROUTE2_METRIC',38,3),(884,'STATRT_ROUTE3_ENABLED',38,3),(885,'STATRT_ROUTE3_GATEWAY',38,3),(886,'STATRT_ROUTE3_IFACE',38,3),(887,'STATRT_ROUTE3_IPADDR',38,3),(888,'STATRT_ROUTE3_IPMASK',38,3),(889,'STATRT_ROUTE3_METRIC',38,3),(890,'STATRT_ROUTE4_ENABLED',38,3),(891,'STATRT_ROUTE4_GATEWAY',38,3),(892,'STATRT_ROUTE4_IFACE',38,3),(893,'STATRT_ROUTE4_IPADDR',38,3),(894,'STATRT_ROUTE4_IPMASK',38,3),(895,'STATRT_ROUTE4_METRIC',38,3),(896,'STATRT_ROUTE5_ENABLED',38,3),(897,'STATRT_ROUTE5_GATEWAY',38,3),(898,'STATRT_ROUTE5_IFACE',38,3),(899,'STATRT_ROUTE5_IPADDR',38,3),(900,'STATRT_ROUTE5_IPMASK',38,3),(901,'STATRT_ROUTE5_METRIC',38,3),(902,'STATRT_ROUTE6_ENABLED',38,3),(903,'STATRT_ROUTE6_GATEWAY',38,3),(904,'STATRT_ROUTE6_IFACE',38,3),(905,'STATRT_ROUTE6_IPADDR',38,3),(906,'STATRT_ROUTE6_IPMASK',38,3),(907,'STATRT_ROUTE6_METRIC',38,3),(908,'STATRT_ROUTE7_ENABLED',38,3),(909,'STATRT_ROUTE7_GATEWAY',38,3),(910,'STATRT_ROUTE7_IFACE',38,3),(911,'STATRT_ROUTE7_IPADDR',38,3),(912,'STATRT_ROUTE7_IPMASK',38,3),(913,'STATRT_ROUTE7_METRIC',38,3),(914,'STATRT_ROUTE8_ENABLED',38,3),(915,'STATRT_ROUTE8_GATEWAY',38,3),(916,'STATRT_ROUTE8_IFACE',38,3),(917,'STATRT_ROUTE8_IPADDR',38,3),(918,'STATRT_ROUTE8_IPMASK',38,3),(919,'STATRT_ROUTE8_METRIC',38,3),(920,'SYSLOG_LOG_SIZE',39,3),(921,'SYSLOG_REMOTE_IP',39,3),(922,'SYSLOG_REMOTE_PORT',39,3),(923,'TELNET_ENABLED',40,3),(924,'TELNET_MAX_SESSIONS',40,3),(925,'UPORT_BAUDRATE',41,3),(926,'UPORT_DATABITS',41,3),(927,'UPORT_ENABLED',41,3),(928,'UPORT_HANDSHAKE',41,3),(929,'UPORT_INACT_TIME',41,3),(930,'UPORT_IPADDR',41,3),(931,'UPORT_KEEPALIVE',41,3),(932,'UPORT_KEEPALIVE_INTVL',41,3),(933,'UPORT_KEEPALIVE_PROBES',41,3),(934,'UPORT_KEEPALIVE_TIME',41,3),(935,'UPORT_MODE',41,3),(936,'UPORT_PARITY',41,3),(937,'UPORT_PORT',41,3),(938,'UPORT_PROTO',41,3),(939,'UPORT_REJECT_NEW',41,3),(940,'UPORT_SPLIT',41,3),(941,'UPORT_STOPBITS',41,3),(942,'UPORT_USE_CD',41,3),(943,'UPORT_USE_DTR',41,3),(944,'VRRP2_ENABLED',42,3),(945,'VRRP2_HOST_PRIO',42,3),(946,'VRRP2_MONITORING',42,3),(947,'VRRP2_PING',42,3),(948,'VRRP2_PING_INTVL',42,3),(949,'VRRP2_PING_IPADDR',42,3),(950,'VRRP2_PING_PROBES',42,3),(951,'VRRP2_PING_TOUT',42,3),(952,'VRRP2_SERVER_ID',42,3),(953,'VRRP2_SERVER_IPADDR',42,3),(954,'VRRP2_VERSION',42,3),(955,'VRRP_ENABLED',43,3),(956,'VRRP_HOST_PRIO',43,3),(957,'VRRP_MONITORING',43,3),(958,'VRRP_PING',43,3),(959,'VRRP_PING_INTVL',43,3),(960,'VRRP_PING_IPADDR',43,3),(961,'VRRP_PING_PROBES',43,3),(962,'VRRP_PING_TOUT',43,3),(963,'VRRP_SERVER_ID',43,3),(964,'VRRP_SERVER_IPADDR',43,3),(965,'VRRP_VERSION',43,3),(966,'WIFI_AP_ACCLST',44,3),(967,'WIFI_AP_ACCLSTTYPE',44,3),(968,'WIFI_AP_AUTHBY',44,3),(969,'WIFI_AP_BCASTSSID',44,3),(970,'WIFI_AP_BRIDGED',44,3),(971,'WIFI_AP_CCODE',44,3),(972,'WIFI_AP_CHANNEL',44,3),(973,'WIFI_AP_DHCP_LEASE_TIME',44,3),(974,'WIFI_AP_DHCP_POOL_ENABLED',44,3),(975,'WIFI_AP_DHCP_POOL_HI',44,3),(976,'WIFI_AP_DHCP_POOL_LO',44,3),(977,'WIFI_AP_ENABLED',44,3),(978,'WIFI_AP_ENCRYPT',44,3),(979,'WIFI_AP_EXTRA_OPTS',44,3),(980,'WIFI_AP_HT40',44,3),(981,'WIFI_AP_HWMODE',44,3),(982,'WIFI_AP_IPADDR',44,3),(983,'WIFI_AP_ISOLATE',44,3),(984,'WIFI_AP_NETMASK',44,3),(985,'WIFI_AP_NETWORK',44,3),(986,'WIFI_AP_RADIUS_ACCT0_ADDR',44,3),(987,'WIFI_AP_RADIUS_ACCT0_PASS',44,3),(988,'WIFI_AP_RADIUS_ACCT0_PORT',44,3),(989,'WIFI_AP_RADIUS_AUTH0_ADDR',44,3),(990,'WIFI_AP_RADIUS_AUTH0_PASS',44,3),(991,'WIFI_AP_RADIUS_AUTH0_PORT',44,3),(992,'WIFI_AP_SHORT_GI',44,3),(993,'WIFI_AP_SSID',44,3),(994,'WIFI_AP_SYSLOGLEV',44,3),(995,'WIFI_AP_WEPKEY0',44,3),(996,'WIFI_AP_WEPKEY1',44,3),(997,'WIFI_AP_WEPKEY2',44,3),(998,'WIFI_AP_WEPKEY3',44,3),(999,'WIFI_AP_WEPKEYDEF',44,3),(1000,'WIFI_AP_WEPKEYTYPE',44,3),(1001,'WIFI_AP_WMM',44,3),(1002,'WIFI_AP_WPAPSK',44,3),(1003,'WIFI_AP_WPAPSKTYPE',44,3),(1004,'WIFI_STA_AUTHBY',44,3),(1005,'WIFI_STA_BOOTPROTO',44,3),(1006,'WIFI_STA_CCODE',44,3),(1007,'WIFI_STA_ENABLED',44,3),(1008,'WIFI_STA_ENCRYPT',44,3),(1009,'WIFI_STA_EXTRA_OPTS',44,3),(1010,'WIFI_STA_GATEWAY',44,3),(1011,'WIFI_STA_IPADDR',44,3),(1012,'WIFI_STA_NETMASK',44,3),(1013,'WIFI_STA_NETWORK',44,3),(1014,'WIFI_STA_PRIMARY_DNS',44,3),(1015,'WIFI_STA_PROBE_SSID',44,3),(1016,'WIFI_STA_RADIUS_CA_CERT',44,3),(1017,'WIFI_STA_RADIUS_EAP_AUTH',44,3),(1018,'WIFI_STA_RADIUS_IDENTITY',44,3),(1019,'WIFI_STA_RADIUS_LOCAL_CERT',44,3),(1020,'WIFI_STA_RADIUS_LOCAL_KEY',44,3),(1021,'WIFI_STA_RADIUS_PASSWORD',44,3),(1022,'WIFI_STA_SSID',44,3),(1023,'WIFI_STA_SYSLOGLEV',44,3),(1024,'WIFI_STA_WEPKEY0',44,3),(1025,'WIFI_STA_WEPKEY1',44,3),(1026,'WIFI_STA_WEPKEY2',44,3),(1027,'WIFI_STA_WEPKEY3',44,3),(1028,'WIFI_STA_WEPKEYDEF',44,3),(1029,'WIFI_STA_WEPKEYTYPE',44,3),(1030,'WIFI_STA_WPAPSK',44,3),(1031,'WIFI_STA_WPAPSKTYPE',44,3),(1032,'MOD_AMAMAS_ENABLED',45,3),(1033,'PROFILE',46,3);

--
-- Table structure for table `config_profile_map`
--

CREATE TABLE `config_profile_map` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `embracing` int(11) DEFAULT NULL,
  `included` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `embracing` (`embracing`),
  KEY `included` (`included`),
  CONSTRAINT `config_profile_map_ibfk_1` FOREIGN KEY (`embracing`) REFERENCES `config_profiles` (`id`),
  CONSTRAINT `config_profile_map_ibfk_2` FOREIGN KEY (`included`) REFERENCES `config_profiles` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `config_profile_map`
--


--
-- Table structure for table `config_profiles`
--

CREATE TABLE `config_profiles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL,
  `automatic` smallint(5) unsigned DEFAULT NULL,
  `defaults` tinyint(1) DEFAULT 0,
  `directive` tinyint(1) DEFAULT 1,
  `master` smallint(5) unsigned DEFAULT NULL,
  `os_version` int(11) DEFAULT NULL,
  `fwfname` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `os_version` (`os_version`),
  KEY `fwfname` (`fwfname`),
  KEY `automatic` (`automatic`),
  KEY `master` (`master`),
  CONSTRAINT `config_profiles_ibfk_1` FOREIGN KEY (`os_version`) REFERENCES `os_versions` (`id`),
  CONSTRAINT `config_profiles_ibfk_2` FOREIGN KEY (`fwfname`) REFERENCES `fwfnames` (`id`),
  CONSTRAINT `config_profiles_ibfk_3` FOREIGN KEY (`automatic`) REFERENCES `devices` (`id_device`),
  CONSTRAINT `config_profiles_ibfk_4` FOREIGN KEY (`master`) REFERENCES `devices` (`id_device`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `config_profiles`
--

INSERT INTO `config_profiles` VALUES (1,NULL,NULL,1,NULL,NULL,5,2),(2,NULL,63893,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `config_values`
--

CREATE TABLE `config_values` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `profile_id` int(11) NOT NULL,
  `key_name` smallint(5) unsigned NOT NULL,
  `key_value` text DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `key_name` (`key_name`),
  KEY `profile_id` (`profile_id`),
  CONSTRAINT `config_values_ibfk_1` FOREIGN KEY (`key_name`) REFERENCES `config_keys` (`id`),
  CONSTRAINT `config_values_ibfk_2` FOREIGN KEY (`profile_id`) REFERENCES `config_profiles` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1041 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `config_values`
--

INSERT INTO `config_values` VALUES (1,1,1,''),(2,1,2,'0'),(3,1,3,''),(4,1,4,'0'),(5,1,5,''),(6,1,6,''),(7,1,7,'web'),(8,1,8,''),(9,1,9,'0'),(10,1,10,'0'),(11,1,11,''),(12,1,12,''),(13,1,13,'10'),(14,1,14,'1'),(15,1,15,''),(16,1,16,'0'),(17,1,17,''),(18,1,18,''),(19,1,19,'10'),(20,1,20,'1'),(21,1,21,''),(22,1,22,'0'),(23,1,23,'0'),(24,1,24,'1'),(25,1,25,''),(26,1,26,'0'),(27,1,27,''),(28,1,28,''),(29,1,29,'10'),(30,1,30,'1'),(31,1,31,''),(32,1,32,'0'),(33,1,33,''),(34,1,34,''),(35,1,35,'10'),(36,1,36,'1'),(37,1,37,''),(38,1,38,'0'),(39,1,39,''),(40,1,40,''),(41,1,41,''),(42,1,42,''),(43,1,43,'static'),(44,1,44,'0'),(45,1,45,'600'),(46,1,46,'0'),(47,1,47,''),(48,1,48,''),(49,1,49,'0'),(50,1,50,''),(51,1,51,''),(52,1,52,''),(53,1,53,''),(54,1,54,''),(55,1,55,''),(56,1,56,''),(57,1,57,''),(58,1,58,''),(59,1,59,''),(60,1,60,''),(61,1,61,''),(62,1,62,''),(63,1,63,''),(64,1,64,'0'),(65,1,65,''),(66,1,66,''),(67,1,67,''),(68,1,68,'PEAP'),(69,1,69,''),(70,1,70,''),(71,1,71,''),(72,1,72,''),(73,1,73,''),(74,1,74,''),(75,1,75,'static'),(76,1,76,'0'),(77,1,77,'600'),(78,1,78,'1'),(79,1,79,'192.168.1.254'),(80,1,80,'192.168.1.2'),(81,1,81,'0'),(82,1,82,''),(83,1,83,''),(84,1,84,''),(85,1,85,''),(86,1,86,''),(87,1,87,''),(88,1,88,''),(89,1,89,''),(90,1,90,''),(91,1,91,''),(92,1,92,''),(93,1,93,''),(94,1,94,''),(95,1,95,''),(96,1,96,'0'),(97,1,97,''),(98,1,98,''),(99,1,99,''),(100,1,100,'PEAP'),(101,1,101,''),(102,1,102,'192.168.1.1'),(103,1,103,''),(104,1,104,'255.255.255.0'),(105,1,105,'192.168.1.0'),(106,1,106,''),(107,1,107,'0'),(108,1,108,'50'),(109,1,109,'600'),(110,1,110,'0'),(111,1,111,'allow'),(112,1,112,''),(113,1,113,''),(114,1,114,''),(115,1,115,'0'),(116,1,116,'all'),(117,1,117,''),(118,1,118,'allow'),(119,1,119,''),(120,1,120,''),(121,1,121,''),(122,1,122,'0'),(123,1,123,'all'),(124,1,124,''),(125,1,125,'allow'),(126,1,126,''),(127,1,127,''),(128,1,128,''),(129,1,129,'0'),(130,1,130,'all'),(131,1,131,''),(132,1,132,'allow'),(133,1,133,''),(134,1,134,''),(135,1,135,''),(136,1,136,'0'),(137,1,137,'all'),(138,1,138,''),(139,1,139,'allow'),(140,1,140,''),(141,1,141,''),(142,1,142,''),(143,1,143,'0'),(144,1,144,'all'),(145,1,145,''),(146,1,146,'allow'),(147,1,147,''),(148,1,148,''),(149,1,149,''),(150,1,150,'0'),(151,1,151,'all'),(152,1,152,''),(153,1,153,'allow'),(154,1,154,''),(155,1,155,''),(156,1,156,''),(157,1,157,'0'),(158,1,158,'all'),(159,1,159,''),(160,1,160,'allow'),(161,1,161,''),(162,1,162,''),(163,1,163,''),(164,1,164,'0'),(165,1,165,'all'),(166,1,166,''),(167,1,167,'0'),(168,1,168,'0'),(169,1,169,'0'),(170,1,170,'allow'),(171,1,171,''),(172,1,172,''),(173,1,173,'0'),(174,1,174,'all'),(175,1,175,''),(176,1,176,'allow'),(177,1,177,''),(178,1,178,''),(179,1,179,'0'),(180,1,180,'all'),(181,1,181,''),(182,1,182,'allow'),(183,1,183,''),(184,1,184,''),(185,1,185,'0'),(186,1,186,'all'),(187,1,187,''),(188,1,188,'allow'),(189,1,189,''),(190,1,190,''),(191,1,191,'0'),(192,1,192,'all'),(193,1,193,''),(194,1,194,'allow'),(195,1,195,''),(196,1,196,''),(197,1,197,'0'),(198,1,198,'all'),(199,1,199,''),(200,1,200,'allow'),(201,1,201,''),(202,1,202,''),(203,1,203,'0'),(204,1,204,'all'),(205,1,205,''),(206,1,206,'allow'),(207,1,207,''),(208,1,208,''),(209,1,209,'0'),(210,1,210,'all'),(211,1,211,''),(212,1,212,'allow'),(213,1,213,''),(214,1,214,''),(215,1,215,'0'),(216,1,216,'all'),(217,1,217,''),(218,1,218,''),(219,1,219,''),(220,1,220,'0'),(221,1,221,'0'),(222,1,222,''),(223,1,223,''),(224,1,224,''),(225,1,225,''),(226,1,226,''),(227,1,227,''),(228,1,228,''),(229,1,229,'0'),(230,1,230,'0'),(231,1,231,''),(232,1,232,''),(233,1,233,''),(234,1,234,''),(235,1,235,''),(236,1,236,''),(237,1,237,''),(238,1,238,'0'),(239,1,239,'0'),(240,1,240,''),(241,1,241,''),(242,1,242,''),(243,1,243,''),(244,1,244,''),(245,1,245,''),(246,1,246,''),(247,1,247,'0'),(248,1,248,'0'),(249,1,249,''),(250,1,250,''),(251,1,251,''),(252,1,252,''),(253,1,253,''),(254,1,254,'0'),(255,1,255,'1'),(256,1,256,'600'),(257,1,257,''),(258,1,258,'0'),(259,1,259,'secret'),(260,1,260,''),(261,1,261,'1'),(262,1,262,''),(263,1,263,''),(264,1,264,''),(265,1,265,'0'),(266,1,266,'tunnel'),(267,1,267,'auto'),(268,1,268,''),(269,1,269,''),(270,1,270,'0'),(271,1,271,'auto'),(272,1,272,''),(273,1,273,''),(274,1,274,''),(275,1,275,'3600'),(276,1,276,'ikev1'),(277,1,277,'1'),(278,1,278,'3600'),(279,1,279,''),(280,1,280,''),(281,1,281,''),(282,1,282,''),(283,1,283,''),(284,1,284,''),(285,1,285,''),(286,1,286,''),(287,1,287,''),(288,1,288,'0'),(289,1,289,''),(290,1,290,''),(291,1,291,'100'),(292,1,292,'540'),(293,1,293,''),(294,1,294,''),(295,1,295,''),(296,1,296,''),(297,1,297,''),(298,1,298,''),(299,1,299,''),(300,1,300,''),(301,1,301,'0'),(302,1,302,'client'),(303,1,303,''),(304,1,304,''),(305,1,305,'0'),(306,1,306,'secret'),(307,1,307,''),(308,1,308,'1'),(309,1,309,''),(310,1,310,''),(311,1,311,''),(312,1,312,'0'),(313,1,313,'tunnel'),(314,1,314,'auto'),(315,1,315,''),(316,1,316,''),(317,1,317,'0'),(318,1,318,'auto'),(319,1,319,''),(320,1,320,''),(321,1,321,''),(322,1,322,'3600'),(323,1,323,'ikev1'),(324,1,324,'1'),(325,1,325,'3600'),(326,1,326,''),(327,1,327,''),(328,1,328,''),(329,1,329,''),(330,1,330,''),(331,1,331,''),(332,1,332,''),(333,1,333,''),(334,1,334,''),(335,1,335,'0'),(336,1,336,''),(337,1,337,''),(338,1,338,'100'),(339,1,339,'540'),(340,1,340,''),(341,1,341,''),(342,1,342,''),(343,1,343,''),(344,1,344,''),(345,1,345,''),(346,1,346,''),(347,1,347,''),(348,1,348,'0'),(349,1,349,'client'),(350,1,350,''),(351,1,351,''),(352,1,352,'0'),(353,1,353,'secret'),(354,1,354,''),(355,1,355,'1'),(356,1,356,''),(357,1,357,''),(358,1,358,''),(359,1,359,'0'),(360,1,360,'tunnel'),(361,1,361,'auto'),(362,1,362,''),(363,1,363,''),(364,1,364,'0'),(365,1,365,'auto'),(366,1,366,''),(367,1,367,''),(368,1,368,''),(369,1,369,'3600'),(370,1,370,'ikev1'),(371,1,371,'1'),(372,1,372,'3600'),(373,1,373,''),(374,1,374,''),(375,1,375,''),(376,1,376,''),(377,1,377,''),(378,1,378,''),(379,1,379,''),(380,1,380,''),(381,1,381,''),(382,1,382,'0'),(383,1,383,''),(384,1,384,''),(385,1,385,'100'),(386,1,386,'540'),(387,1,387,''),(388,1,388,''),(389,1,389,''),(390,1,390,''),(391,1,391,''),(392,1,392,''),(393,1,393,''),(394,1,394,''),(395,1,395,'0'),(396,1,396,'client'),(397,1,397,''),(398,1,398,''),(399,1,399,'0'),(400,1,400,'secret'),(401,1,401,''),(402,1,402,'1'),(403,1,403,''),(404,1,404,''),(405,1,405,''),(406,1,406,'0'),(407,1,407,'tunnel'),(408,1,408,'auto'),(409,1,409,''),(410,1,410,''),(411,1,411,'0'),(412,1,412,'auto'),(413,1,413,''),(414,1,414,''),(415,1,415,''),(416,1,416,'3600'),(417,1,417,'ikev1'),(418,1,418,'1'),(419,1,419,'3600'),(420,1,420,''),(421,1,421,''),(422,1,422,''),(423,1,423,''),(424,1,424,''),(425,1,425,''),(426,1,426,''),(427,1,427,''),(428,1,428,''),(429,1,429,'0'),(430,1,430,''),(431,1,431,''),(432,1,432,'100'),(433,1,433,'540'),(434,1,434,''),(435,1,435,''),(436,1,436,''),(437,1,437,''),(438,1,438,''),(439,1,439,''),(440,1,440,''),(441,1,441,''),(442,1,442,'0'),(443,1,443,'client'),(444,1,444,''),(445,1,445,''),(446,1,446,'#!/bin/sh\n#\n# This script will be executed when PPP/WAN connection is lost.'),(447,1,447,'#!/bin/sh\n#\n# This script will be executed when PPP/WAN connection is established.'),(448,1,448,'1'),(449,1,449,''),(450,1,450,''),(451,1,451,'0'),(452,1,452,''),(453,1,453,''),(454,1,454,''),(455,1,455,''),(456,1,456,''),(457,1,457,''),(458,1,458,''),(459,1,459,'0'),(460,1,460,''),(461,1,461,'1'),(462,1,462,''),(463,1,463,''),(464,1,464,''),(465,1,465,''),(466,1,466,'0'),(467,1,467,''),(468,1,468,''),(469,1,469,''),(470,1,470,''),(471,1,471,'0'),(472,1,472,''),(473,1,473,''),(474,1,474,''),(475,1,475,''),(476,1,476,'0'),(477,1,477,''),(478,1,478,''),(479,1,479,''),(480,1,480,''),(481,1,481,'0'),(482,1,482,''),(483,1,483,''),(484,1,484,''),(485,1,485,''),(486,1,486,'0'),(487,1,487,''),(488,1,488,''),(489,1,489,''),(490,1,490,''),(491,1,491,'0'),(492,1,492,''),(493,1,493,''),(494,1,494,''),(495,1,495,''),(496,1,496,'0'),(497,1,497,''),(498,1,498,''),(499,1,499,''),(500,1,500,''),(501,1,501,'0'),(502,1,502,''),(503,1,503,''),(504,1,504,''),(505,1,505,''),(506,1,506,'0'),(507,1,507,''),(508,1,508,''),(509,1,509,''),(510,1,510,''),(511,1,511,'0'),(512,1,512,''),(513,1,513,''),(514,1,514,''),(515,1,515,''),(516,1,516,'0'),(517,1,517,''),(518,1,518,''),(519,1,519,''),(520,1,520,''),(521,1,521,'0'),(522,1,522,''),(523,1,523,''),(524,1,524,''),(525,1,525,''),(526,1,526,'0'),(527,1,527,''),(528,1,528,''),(529,1,529,''),(530,1,530,''),(531,1,531,'0'),(532,1,532,''),(533,1,533,''),(534,1,534,''),(535,1,535,''),(536,1,536,'0'),(537,1,537,''),(538,1,538,''),(539,1,539,''),(540,1,540,''),(541,1,541,'0'),(542,1,542,'0'),(543,1,543,'21'),(544,1,544,'0'),(545,1,545,'0'),(546,1,546,'443'),(547,1,547,'80'),(548,1,548,'0'),(549,1,549,'161'),(550,1,550,'0'),(551,1,551,'22'),(552,1,552,'0'),(553,1,553,'23'),(554,1,554,'0'),(555,1,555,'0'),(556,1,556,''),(557,1,557,''),(558,1,558,'0'),(559,1,559,''),(560,1,560,'none'),(561,1,561,''),(562,1,562,'lzo'),(563,1,563,''),(564,1,564,''),(565,1,565,'0'),(566,1,566,''),(567,1,567,''),(568,1,568,''),(569,1,569,''),(570,1,570,''),(571,1,571,'0'),(572,1,572,''),(573,1,573,''),(574,1,574,''),(575,1,575,'1194'),(576,1,576,'udp'),(577,1,577,'0'),(578,1,578,''),(579,1,579,''),(580,1,580,''),(581,1,581,''),(582,1,582,''),(583,1,583,''),(584,1,584,''),(585,1,585,'none'),(586,1,586,''),(587,1,587,'lzo'),(588,1,588,''),(589,1,589,''),(590,1,590,'0'),(591,1,591,''),(592,1,592,''),(593,1,593,''),(594,1,594,''),(595,1,595,''),(596,1,596,'0'),(597,1,597,''),(598,1,598,''),(599,1,599,''),(600,1,600,'1194'),(601,1,601,'udp'),(602,1,602,'0'),(603,1,603,''),(604,1,604,''),(605,1,605,''),(606,1,606,''),(607,1,607,''),(608,1,608,''),(609,1,609,''),(610,1,610,'none'),(611,1,611,''),(612,1,612,'lzo'),(613,1,613,''),(614,1,614,''),(615,1,615,'0'),(616,1,616,''),(617,1,617,''),(618,1,618,''),(619,1,619,''),(620,1,620,''),(621,1,621,'0'),(622,1,622,''),(623,1,623,''),(624,1,624,''),(625,1,625,'1194'),(626,1,626,'udp'),(627,1,627,'0'),(628,1,628,''),(629,1,629,''),(630,1,630,''),(631,1,631,''),(632,1,632,''),(633,1,633,''),(634,1,634,''),(635,1,635,'none'),(636,1,636,''),(637,1,637,'lzo'),(638,1,638,''),(639,1,639,''),(640,1,640,'0'),(641,1,641,''),(642,1,642,''),(643,1,643,''),(644,1,644,''),(645,1,645,''),(646,1,646,'0'),(647,1,647,''),(648,1,648,''),(649,1,649,''),(650,1,650,'1194'),(651,1,651,'udp'),(652,1,652,'0'),(653,1,653,''),(654,1,654,''),(655,1,655,''),(656,1,656,''),(657,1,657,''),(658,1,658,''),(659,1,659,''),(660,1,660,'0'),(661,1,661,'admin'),(662,1,662,'0'),(663,1,663,'0'),(664,1,664,''),(665,1,665,''),(666,1,666,''),(667,1,667,''),(668,1,668,'0'),(669,1,669,''),(670,1,670,''),(671,1,671,''),(672,1,672,''),(673,1,673,'0'),(674,1,674,''),(675,1,675,''),(676,1,676,''),(677,1,677,'0'),(678,1,678,''),(679,1,679,''),(680,1,680,''),(681,1,681,'login'),(682,1,682,''),(683,1,683,'0'),(684,1,684,'0'),(685,1,685,'4'),(686,1,686,'0'),(687,1,687,'0'),(688,1,688,'9600'),(689,1,689,'8'),(690,1,690,'0'),(691,1,691,''),(692,1,692,''),(693,1,693,'0'),(694,1,694,'10'),(695,1,695,'5'),(696,1,696,'3600'),(697,1,697,'server'),(698,1,698,'N'),(699,1,699,''),(700,1,700,'tcp'),(701,1,701,'0'),(702,1,702,'20'),(703,1,703,'1'),(704,1,704,'0'),(705,1,705,'0'),(706,1,706,'9600'),(707,1,707,'8'),(708,1,708,'0'),(709,1,709,''),(710,1,710,''),(711,1,711,'0'),(712,1,712,'10'),(713,1,713,'5'),(714,1,714,'3600'),(715,1,715,'server'),(716,1,716,'N'),(717,1,717,''),(718,1,718,'tcp'),(719,1,719,'0'),(720,1,720,'20'),(721,1,721,'1'),(722,1,722,'0'),(723,1,723,'0'),(724,1,724,'0'),(725,1,725,'0'),(726,1,726,'eth1'),(727,1,727,'1492'),(728,1,728,'1492'),(729,1,729,''),(730,1,730,''),(731,1,731,'1'),(732,1,732,''),(733,1,733,''),(734,1,734,'0'),(735,1,735,''),(736,1,736,''),(737,1,737,'0'),(738,1,738,'0'),(739,1,739,'1'),(740,1,740,''),(741,1,741,''),(742,1,742,'1'),(743,1,743,''),(744,1,744,''),(745,1,745,'0'),(746,1,746,'0'),(747,1,747,'1500'),(748,1,748,'1500'),(749,1,749,'1500'),(750,1,750,'1500'),(751,1,751,'0'),(752,1,752,'0'),(753,1,753,''),(754,1,754,''),(755,1,755,''),(756,1,756,''),(757,1,757,''),(758,1,758,''),(759,1,759,'0'),(760,1,760,'0'),(761,1,761,'0'),(762,1,762,'0'),(763,1,763,''),(764,1,764,''),(765,1,765,''),(766,1,766,''),(767,1,767,''),(768,1,768,''),(769,1,769,'10'),(770,1,770,'10'),(771,1,771,'0'),(772,1,772,'1'),(773,1,773,'1'),(774,1,774,'0'),(775,1,775,'1'),(776,1,776,'0'),(777,1,777,'0'),(778,1,778,'0'),(779,1,779,'0'),(780,1,780,'0'),(781,1,781,'60'),(782,1,782,''),(783,1,783,''),(784,1,784,'0'),(785,1,785,'0'),(786,1,786,''),(787,1,787,''),(788,1,788,'1'),(789,1,789,'1'),(790,1,790,''),(791,1,791,''),(792,1,792,'1'),(793,1,793,'1'),(794,1,794,''),(795,1,795,''),(796,1,796,'1'),(797,1,797,'0'),(798,1,798,''),(799,1,799,''),(800,1,800,''),(801,1,801,''),(802,1,802,''),(803,1,803,''),(804,1,804,''),(805,1,805,''),(806,1,806,''),(807,1,807,''),(808,1,808,''),(809,1,809,'9600'),(810,1,810,'0'),(811,1,811,'9600'),(812,1,812,'0'),(813,1,813,''),(814,1,814,'1'),(815,1,815,''),(816,1,816,''),(817,1,817,''),(818,1,818,'0'),(819,1,819,'0'),(820,1,820,'0'),(821,1,821,''),(822,1,822,''),(823,1,823,''),(824,1,824,'0'),(825,1,825,'0'),(826,1,826,'0'),(827,1,827,'0'),(828,1,828,'0'),(829,1,829,''),(830,1,830,''),(831,1,831,''),(832,1,832,''),(833,1,833,''),(834,1,834,''),(835,1,835,''),(836,1,836,''),(837,1,837,'25'),(838,1,838,''),(839,1,839,''),(840,1,840,''),(841,1,841,'MD5'),(842,1,842,''),(843,1,843,''),(844,1,844,'MD5'),(845,1,845,'private'),(846,1,846,'public'),(847,1,847,''),(848,1,848,'1'),(849,1,849,'0'),(850,1,850,''),(851,1,851,'300'),(852,1,852,'0'),(853,1,853,'E'),(854,1,854,'1'),(855,1,855,''),(856,1,856,'DES'),(857,1,857,''),(858,1,858,''),(859,1,859,'DES'),(860,1,860,'0'),(861,1,861,''),(862,1,862,''),(863,1,863,''),(864,1,864,''),(865,1,865,'1'),(866,1,866,'0'),(867,1,867,'0'),(868,1,868,'1'),(869,1,869,'600'),(870,1,870,'#!/bin/sh\n#\n# This script will be executed *after* all the other init scripts.\n# You can put your own initialization stuff in here.'),(871,1,871,'0'),(872,1,872,'0'),(873,1,873,''),(874,1,874,''),(875,1,875,''),(876,1,876,''),(877,1,877,''),(878,1,878,'0'),(879,1,879,''),(880,1,880,''),(881,1,881,''),(882,1,882,''),(883,1,883,''),(884,1,884,'0'),(885,1,885,''),(886,1,886,''),(887,1,887,''),(888,1,888,''),(889,1,889,''),(890,1,890,'0'),(891,1,891,''),(892,1,892,''),(893,1,893,''),(894,1,894,''),(895,1,895,''),(896,1,896,'0'),(897,1,897,''),(898,1,898,''),(899,1,899,''),(900,1,900,''),(901,1,901,''),(902,1,902,'0'),(903,1,903,''),(904,1,904,''),(905,1,905,''),(906,1,906,''),(907,1,907,''),(908,1,908,'0'),(909,1,909,''),(910,1,910,''),(911,1,911,''),(912,1,912,''),(913,1,913,''),(914,1,914,'0'),(915,1,915,''),(916,1,916,''),(917,1,917,''),(918,1,918,''),(919,1,919,''),(920,1,920,'1000'),(921,1,921,''),(922,1,922,'514'),(923,1,923,'0'),(924,1,924,'50'),(925,1,925,'9600'),(926,1,926,'8'),(927,1,927,'0'),(928,1,928,'0'),(929,1,929,''),(930,1,930,''),(931,1,931,'0'),(932,1,932,'10'),(933,1,933,'5'),(934,1,934,'3600'),(935,1,935,'server'),(936,1,936,'N'),(937,1,937,''),(938,1,938,'tcp'),(939,1,939,'0'),(940,1,940,'20'),(941,1,941,'1'),(942,1,942,'0'),(943,1,943,'0'),(944,1,944,'0'),(945,1,945,''),(946,1,946,'0'),(947,1,947,'0'),(948,1,948,''),(949,1,949,''),(950,1,950,''),(951,1,951,''),(952,1,952,''),(953,1,953,''),(954,1,954,'2'),(955,1,955,'0'),(956,1,956,''),(957,1,957,'0'),(958,1,958,'0'),(959,1,959,''),(960,1,960,''),(961,1,961,''),(962,1,962,''),(963,1,963,''),(964,1,964,''),(965,1,965,'2'),(966,1,966,''),(967,1,967,'none'),(968,1,968,'open'),(969,1,969,'0'),(970,1,970,'0'),(971,1,971,''),(972,1,972,'1'),(973,1,973,'600'),(974,1,974,'0'),(975,1,975,''),(976,1,976,''),(977,1,977,'0'),(978,1,978,'none'),(979,1,979,''),(980,1,980,'0'),(981,1,981,'b'),(982,1,982,''),(983,1,983,'0'),(984,1,984,''),(985,1,985,''),(986,1,986,''),(987,1,987,''),(988,1,988,'1813'),(989,1,989,''),(990,1,990,''),(991,1,991,'1812'),(992,1,992,'0'),(993,1,993,''),(994,1,994,'2'),(995,1,995,''),(996,1,996,''),(997,1,997,''),(998,1,998,''),(999,1,999,'0'),(1000,1,1000,'ascii'),(1001,1,1001,'0'),(1002,1,1002,''),(1003,1,1003,'secret'),(1004,1,1004,'open'),(1005,1,1005,'dhcp'),(1006,1,1006,''),(1007,1,1007,'0'),(1008,1,1008,'none'),(1009,1,1009,''),(1010,1,1010,''),(1011,1,1011,''),(1012,1,1012,''),(1013,1,1013,''),(1014,1,1014,''),(1015,1,1015,'0'),(1016,1,1016,''),(1017,1,1017,'PEAP'),(1018,1,1018,''),(1019,1,1019,''),(1020,1,1020,''),(1021,1,1021,''),(1022,1,1022,''),(1023,1,1023,'2'),(1024,1,1024,''),(1025,1,1025,''),(1026,1,1026,''),(1027,1,1027,''),(1028,1,1028,'0'),(1029,1,1029,'ascii'),(1030,1,1030,''),(1031,1,1031,'secret'),(1032,2,78,'0'),(1033,2,94,'172.17.0.1'),(1034,2,102,'172.17.1.131'),(1035,2,104,'255.255.252.0'),(1036,2,105,'172.17.0.0'),(1037,2,106,'172.17.0.1'),(1038,2,742,'0'),(1039,2,1032,'1'),(1040,2,1033,'');

--
-- Table structure for table `device_netdevs`
--

CREATE TABLE `device_netdevs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_device` smallint(5) unsigned DEFAULT NULL,
  `version` int(11) DEFAULT 0,
  `label` varchar(32) DEFAULT NULL,
  `active` tinyint(1) DEFAULT 1,
  `mac` varchar(20) DEFAULT '00:00:00:00:00:00',
  `ipaddr` varchar(16) DEFAULT '127.0.0.1',
  `ipmask` smallint(5) unsigned DEFAULT 24,
  `ip6addr` varchar(32) DEFAULT '',
  `ip6pref` smallint(5) unsigned DEFAULT 64,
  `collisions` int(10) unsigned DEFAULT 0,
  `rx_packets_mib` int(10) unsigned DEFAULT 0,
  `rx_bytes_gib` int(10) unsigned DEFAULT 0,
  `rx_errors` int(10) unsigned DEFAULT 0,
  `tx_packets_mib` int(10) unsigned DEFAULT 0,
  `tx_bytes_gib` int(10) unsigned DEFAULT 0,
  `tx_errors` int(10) unsigned DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `id_device` (`id_device`),
  CONSTRAINT `device_netdevs_ibfk_1` FOREIGN KEY (`id_device`) REFERENCES `devices` (`id_device`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `device_netdevs`
--

INSERT INTO `device_netdevs` VALUES (1,25828,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(2,25828,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(3,25828,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(4,25828,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(5,880,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(6,880,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(7,880,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(8,880,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(9,28394,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(10,28394,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(11,28394,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(12,28394,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(13,58991,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(14,58991,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(15,58991,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(16,58991,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(17,63893,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(18,63893,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(19,63893,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(20,63893,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(21,5986,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(22,5986,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(23,5986,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(24,5986,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(25,49551,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(26,49551,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(27,49551,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(28,49551,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(29,691,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(30,691,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(31,691,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(32,691,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(33,18980,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(34,18980,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(35,18980,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(36,18980,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(37,19201,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(38,19201,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(39,19201,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(40,19201,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(41,25650,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(42,25650,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(43,25650,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(44,25650,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(45,28718,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(46,28718,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(47,28718,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(48,28718,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(49,31703,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(50,31703,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(51,31703,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(52,31703,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(53,48941,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(54,48941,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(55,48941,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(56,48941,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(57,64110,0,'eth0',1,'00:0a:14:85:fa:f2','127.0.0.1',24,'',64,0,299,66,0,669,755,0),(58,64110,0,'eth1',1,'00:0a:14:85:fa:f3','127.0.0.1',24,'',64,0,667,746,4263,296,66,2376),(59,64110,0,'wlan0',1,'00:22:88:02:de:ea','127.0.0.1',24,'',64,0,0,0,0,0,0,0),(60,64110,0,'wlan1',1,'00:22:88:02:de:eb','127.0.0.1',24,'',64,0,0,0,0,0,0,0);

--
-- Table structure for table `device_stats`
--

CREATE TABLE `device_stats` (
  `id_device` smallint(5) unsigned NOT NULL,
  `livetime_class` smallint(5) unsigned DEFAULT 1,
  `livemiss_class` smallint(5) unsigned DEFAULT 1,
  `timeskew` int(11) DEFAULT 0,
  `voltage` float DEFAULT 0,
  `temperature` int(11) DEFAULT 0,
  `sync` smallint(5) unsigned DEFAULT 1,
  `uptime` int(10) unsigned DEFAULT 0,
  `mem_total` int(10) unsigned DEFAULT 0,
  `mem_avail` int(10) unsigned DEFAULT 0,
  `processes` smallint(5) unsigned DEFAULT 0,
  `root_avail` int(10) unsigned DEFAULT 0,
  `loadavg1` float DEFAULT 0,
  `loadavg5` float DEFAULT 0,
  `loadavg15` float DEFAULT 0,
  `last_reboot` timestamp NOT NULL DEFAULT current_timestamp(),
  `reboot_counter` int(10) unsigned DEFAULT 0,
  PRIMARY KEY (`id_device`),
  KEY `livetime_class` (`livetime_class`),
  KEY `livemiss_class` (`livemiss_class`),
  KEY `sync` (`sync`),
  CONSTRAINT `device_stats_ibfk_1` FOREIGN KEY (`id_device`) REFERENCES `devices` (`id_device`),
  CONSTRAINT `device_stats_ibfk_2` FOREIGN KEY (`livetime_class`) REFERENCES `liveness_time` (`id`),
  CONSTRAINT `device_stats_ibfk_3` FOREIGN KEY (`livemiss_class`) REFERENCES `liveness_misscount` (`id`),
  CONSTRAINT `device_stats_ibfk_4` FOREIGN KEY (`sync`) REFERENCES `sync_status` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `device_stats`
--

INSERT INTO `device_stats` VALUES (691,1,1,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(880,4,5,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(5986,3,4,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(18980,1,1,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(19201,1,1,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(23566,3,4,3600,11.9,42,3,0,0,0,0,0,0,0,0,'2021-09-24 10:25:57',0),(25650,1,1,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(25828,4,5,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(28394,4,5,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(28718,1,1,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(31703,1,1,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(48941,1,1,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(49551,3,4,3600,11.9,42,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(58991,4,5,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0),(63893,1,1,4654,12.2,38,3,1355524,57400,32924,40,0,0,0,0,'0000-00-00 00:00:00',0),(64110,1,1,3600,12.1,37,3,5120156,57400,34652,46,0,0,0,0,'0000-00-00 00:00:00',0);

--
-- Table structure for table `device_stats_device_type_map`
--

CREATE TABLE `device_stats_device_type_map` (
  `id_type` int(11) DEFAULT NULL,
  `livetime_class` tinyint(1) DEFAULT 0,
  `livemiss_class` tinyint(1) DEFAULT 0,
  `timeskew` tinyint(1) DEFAULT 0,
  `voltage` tinyint(1) DEFAULT 0,
  `temperature` tinyint(1) DEFAULT 0,
  `sync` tinyint(1) DEFAULT 0,
  `uptime` tinyint(1) DEFAULT 0,
  `mem_total` tinyint(1) DEFAULT 0,
  `mem_avail` tinyint(1) DEFAULT 0,
  `processes` tinyint(1) DEFAULT 0,
  `root_avail` tinyint(1) DEFAULT 0,
  `loadavg1` tinyint(1) DEFAULT 0,
  `loadavg5` tinyint(1) DEFAULT 0,
  `loadavg15` tinyint(1) DEFAULT 0,
  `last_reboot` tinyint(1) DEFAULT 0,
  `reboot_counter` tinyint(1) DEFAULT 0,
  KEY `id_type` (`id_type`),
  CONSTRAINT `device_stats_device_type_map_ibfk_1` FOREIGN KEY (`id_type`) REFERENCES `device_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `device_stats_device_type_map`
--

INSERT INTO `device_stats_device_type_map` VALUES (1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1),(2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);

--
-- Table structure for table `device_types`
--

CREATE TABLE `device_types` (
  `id` int(11) NOT NULL,
  `name` varchar(64) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `device_types`
--

INSERT INTO `device_types` VALUES (1,'Linux box'),(2,'Advantech router');

--
-- Table structure for table `devices`
--

CREATE TABLE `devices` (
  `id_device` smallint(5) unsigned NOT NULL,
  `devid` varchar(4) DEFAULT NULL,
  `deleted` tinyint(1) DEFAULT 0,
  `name` varchar(32) DEFAULT NULL,
  `dev_type` int(11) DEFAULT NULL,
  `os_ver` int(11) DEFAULT NULL,
  `os_ver_desired` int(11) DEFAULT NULL,
  `macaddr` varchar(12) DEFAULT NULL,
  `serno` varchar(32) DEFAULT NULL,
  `fwfname` int(11) NOT NULL DEFAULT 1,
  `hostname` varchar(64) DEFAULT NULL,
  `hostname_desired` varchar(64) DEFAULT NULL,
  `config_profile` int(11) DEFAULT NULL,
  `automatic_profile` int(11) DEFAULT NULL,
  `uuid` varchar(16) DEFAULT NULL,
  `registered` datetime DEFAULT current_timestamp(),
  `gui_version` int(11) DEFAULT 0,
  PRIMARY KEY (`id_device`),
  KEY `dev_type` (`dev_type`),
  KEY `os_ver` (`os_ver`),
  KEY `os_ver_desired` (`os_ver_desired`),
  KEY `config_profile` (`config_profile`),
  KEY `automatic_profile` (`automatic_profile`),
  KEY `fwfname` (`fwfname`),
  CONSTRAINT `devices_ibfk_1` FOREIGN KEY (`dev_type`) REFERENCES `device_types` (`id`),
  CONSTRAINT `devices_ibfk_2` FOREIGN KEY (`os_ver`) REFERENCES `os_versions` (`id`),
  CONSTRAINT `devices_ibfk_3` FOREIGN KEY (`os_ver_desired`) REFERENCES `os_versions` (`id`),
  CONSTRAINT `devices_ibfk_4` FOREIGN KEY (`config_profile`) REFERENCES `config_profiles` (`id`),
  CONSTRAINT `devices_ibfk_5` FOREIGN KEY (`automatic_profile`) REFERENCES `config_profiles` (`id`),
  CONSTRAINT `devices_ibfk_6` FOREIGN KEY (`fwfname`) REFERENCES `fwfnames` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `devices`
--

INSERT INTO `devices` VALUES (691,'ACUD',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:59:02',0),(880,'ADPA',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 08:32:52',0),(5986,'BPOC',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:24:56',0),(18980,'FTCF',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:59:02',0),(19201,'FUAB',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:59:02',0),(23566,'GVAY',0,NULL,2,6,NULL,NULL,'(null)',2,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:25:57',0),(25650,'OFDC',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:59:02',0),(25828,'OFYF',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 08:32:16',0),(28394,'OYYT',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 08:32:52',0),(28718,'PACY',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:59:02',0),(31703,'PUXP',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:59:02',0),(48941,'UZCX',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:59:02',0),(49551,'VBRZ',0,NULL,2,6,NULL,NULL,'(null)',2,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:26:57',0),(58991,'YOOZ',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 08:32:52',0),(63893,'ZSSG',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,2,NULL,'2021-09-24 12:06:48',0),(64110,'ZTOY',0,NULL,2,5,NULL,NULL,'(null)',1,NULL,NULL,NULL,NULL,NULL,'2021-09-24 12:59:02',0);

--
-- Table structure for table `event_log`
--

CREATE TABLE `event_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `evtype` int(11) NOT NULL,
  `value` int(11) DEFAULT NULL,
  `source` int(11) NOT NULL DEFAULT 1,
  `extra_id` int(11) DEFAULT NULL,
  `msg` varchar(64) DEFAULT NULL,
  `time` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `evtype` (`evtype`),
  KEY `source` (`source`),
  CONSTRAINT `event_log_ibfk_1` FOREIGN KEY (`evtype`) REFERENCES `event_type` (`id`),
  CONSTRAINT `event_log_ibfk_2` FOREIGN KEY (`source`) REFERENCES `event_source` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `event_log`
--

INSERT INTO `event_log` VALUES (1,1,0,1,0,'','2021-09-24 08:31:57'),(2,7,0,1,0,'Server IP was updated to: 127.0.0.1','2021-09-24 08:31:57'),(3,3,0,1,0,'','2021-09-24 08:31:58'),(4,1,0,1,0,'','2021-09-24 08:32:05'),(5,7,0,1,0,'Server IP was updated to: 127.0.0.1','2021-09-24 08:32:05'),(6,3,0,1,0,'','2021-09-24 08:32:09'),(7,1,0,1,0,'','2021-09-24 08:32:13'),(8,7,0,1,0,'Server IP was updated to: 127.0.0.1','2021-09-24 08:32:13'),(9,4,25828,1,0,'OFYF','2021-09-24 08:32:16'),(10,4,880,1,0,'ADPA','2021-09-24 08:32:52'),(11,4,28394,1,0,'OYYT','2021-09-24 08:32:52'),(12,4,58991,1,0,'YOOZ','2021-09-24 08:32:52'),(13,6,1,1,1,'','2021-09-24 08:37:43'),(14,4,63893,1,0,'ZSSG','2021-09-24 12:06:48'),(15,4,5986,1,0,'BPOC','2021-09-24 12:24:57'),(16,4,23566,1,0,'GVAY','2021-09-24 12:25:57'),(17,4,49551,1,0,'VBRZ','2021-09-24 12:26:57'),(18,4,691,1,0,'ACUD','2021-09-24 12:59:02'),(19,4,18980,1,0,'FTCF','2021-09-24 12:59:02'),(20,4,19201,1,0,'FUAB','2021-09-24 12:59:02'),(21,4,25650,1,0,'OFDC','2021-09-24 12:59:02'),(22,4,28718,1,0,'PACY','2021-09-24 12:59:02'),(23,4,31703,1,0,'PUXP','2021-09-24 12:59:02'),(24,4,48941,1,0,'UZCX','2021-09-24 12:59:02'),(25,4,64110,1,0,'ZTOY','2021-09-24 12:59:02'),(26,3,0,1,0,'','2021-09-24 13:01:30');

--
-- Table structure for table `event_source`
--

CREATE TABLE `event_source` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `event_source`
--

INSERT INTO `event_source` VALUES (1,'MAMAS Daemon'),(2,'MAMAS WebUI');

--
-- Table structure for table `event_type`
--

CREATE TABLE `event_type` (
  `id` int(11) NOT NULL,
  `source` int(11) NOT NULL,
  `name` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `source` (`source`),
  CONSTRAINT `event_type_ibfk_1` FOREIGN KEY (`source`) REFERENCES `event_source` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `event_type`
--

INSERT INTO `event_type` VALUES (1,1,'Start'),(2,1,'Critical error (daemon)'),(3,1,'Shutting down'),(4,1,'New device connected'),(5,1,'New FW available'),(6,1,'User-defined alert'),(7,1,'General notice'),(8,1,'Licensing issue'),(9,1,'Performing upgrade'),(10,1,'Eventsync (daemon)'),(11,1,'Device autoprofile update'),(51,1,'Daemon specific event 1'),(101,2,'User login'),(102,2,'Critical error (WebUI)'),(103,2,'Restart requested'),(104,2,'Device CFG user-update'),(105,2,'New FW version requested'),(106,2,'Alert config update'),(107,2,'General notice'),(108,2,'License uploaded'),(109,2,'Upgrade pkg uploaded'),(110,2,'Eventsync (UI)'),(111,2,'Profile update'),(151,2,'Monitoring group update'),(152,2,'CFG group update');

--
-- Table structure for table `flags`
--

CREATE TABLE `flags` (
  `id` enum('user_devchg_version','license_status','mamas_version','about_info','process_server_ip_update') NOT NULL,
  `version` int(11) DEFAULT NULL,
  `description` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `flags`
--

INSERT INTO `flags` VALUES ('user_devchg_version',0,NULL),('license_status',1,NULL),('mamas_version',1,NULL),('about_info',1,'MAMAS - Monitoring, Alerting, Management and Automation System'),('process_server_ip_update',0,NULL);

--
-- Table structure for table `fw_autoupgrade_policy`
--

CREATE TABLE `fw_autoupgrade_policy` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `fw_autoupgrade_policy`
--

INSERT INTO `fw_autoupgrade_policy` VALUES (1,'Manage on lastest approved major'),(2,'Keep major, manage on latest approved minor'),(3,'Keep major+minor, manage on latest approved patch'),(4,'Keep on specific version'),(5,'Do not touch');

--
-- Table structure for table `fw_freshness`
--

CREATE TABLE `fw_freshness` (
  `id` smallint(5) unsigned NOT NULL,
  `description` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `fw_freshness`
--

INSERT INTO `fw_freshness` VALUES (1,'Actual firmware'),(2,'1 patch version back'),(3,'On last minor (old patch)'),(4,'On last major (old minor)'),(5,'Obsolete');

--
-- Table structure for table `fwfnames`
--

CREATE TABLE `fwfnames` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fwfname` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `fwfnames`
--

INSERT INTO `fwfnames` VALUES (1,''),(2,'LR77-v2.bin'),(3,'SPECTRE-v3-LTE.bin');

--
-- Table structure for table `gui_commits`
--

CREATE TABLE `gui_commits` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `version` int(11) DEFAULT NULL,
  `affected` int(11) DEFAULT 1,
  `id_device` smallint(5) unsigned DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `id_device` (`id_device`),
  CONSTRAINT `gui_commits_ibfk_1` FOREIGN KEY (`id_device`) REFERENCES `devices` (`id_device`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `gui_commits`
--


--
-- Table structure for table `history_bit_types`
--

CREATE TABLE `history_bit_types` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `history_bit_types`
--

INSERT INTO `history_bit_types` VALUES (1,'Average'),(2,'Running Average');

--
-- Table structure for table `history_float`
--

CREATE TABLE `history_float` (
  `history_type` smallint(5) unsigned DEFAULT NULL,
  `id_device` smallint(5) unsigned DEFAULT NULL,
  `mongrp_id` smallint(5) unsigned DEFAULT NULL,
  `value_id` smallint(5) unsigned DEFAULT NULL,
  `last_used` smallint(5) unsigned DEFAULT 0,
  `data_1` float DEFAULT 0,
  `data_2` float DEFAULT 0,
  `data_3` float DEFAULT 0,
  `data_4` float DEFAULT 0,
  `data_5` float DEFAULT 0,
  `data_6` float DEFAULT 0,
  `data_7` float DEFAULT 0,
  `data_8` float DEFAULT 0,
  `data_9` float DEFAULT 0,
  `data_10` float DEFAULT 0,
  `data_11` float DEFAULT 0,
  `data_12` float DEFAULT 0,
  `data_13` float DEFAULT 0,
  `data_14` float DEFAULT 0,
  `data_15` float DEFAULT 0,
  `data_16` float DEFAULT 0,
  `data_17` float DEFAULT 0,
  `data_18` float DEFAULT 0,
  `data_19` float DEFAULT 0,
  `data_20` float DEFAULT 0,
  `data_21` float DEFAULT 0,
  `data_22` float DEFAULT 0,
  `data_23` float DEFAULT 0,
  `data_24` float DEFAULT 0,
  `data_25` float DEFAULT 0,
  `data_26` float DEFAULT 0,
  `data_27` float DEFAULT 0,
  `data_28` float DEFAULT 0,
  `data_29` float DEFAULT 0,
  `data_30` float DEFAULT 0,
  `data_31` float DEFAULT 0,
  `data_32` float DEFAULT 0,
  PRIMARY KEY (`id_device`,`value_id`),
  KEY `mongrp_id` (`mongrp_id`),
  KEY `value_id` (`value_id`),
  KEY `history_type` (`history_type`),
  CONSTRAINT `history_float_ibfk_1` FOREIGN KEY (`id_device`) REFERENCES `devices` (`id_device`),
  CONSTRAINT `history_float_ibfk_2` FOREIGN KEY (`mongrp_id`) REFERENCES `mon_groups` (`id`),
  CONSTRAINT `history_float_ibfk_3` FOREIGN KEY (`value_id`) REFERENCES `values_description` (`id`),
  CONSTRAINT `history_float_ibfk_4` FOREIGN KEY (`history_type`) REFERENCES `history_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `history_float`
--


--
-- Table structure for table `history_int`
--

CREATE TABLE `history_int` (
  `history_type` smallint(5) unsigned DEFAULT NULL,
  `id_device` smallint(5) unsigned NOT NULL,
  `mongrp_id` smallint(5) unsigned DEFAULT NULL,
  `value_id` smallint(5) unsigned NOT NULL,
  `last_used` smallint(5) unsigned DEFAULT 0,
  `data_1` int(11) DEFAULT 0,
  `data_2` int(11) DEFAULT 0,
  `data_3` int(11) DEFAULT 0,
  `data_4` int(11) DEFAULT 0,
  `data_5` int(11) DEFAULT 0,
  `data_6` int(11) DEFAULT 0,
  `data_7` int(11) DEFAULT 0,
  `data_8` int(11) DEFAULT 0,
  `data_9` int(11) DEFAULT 0,
  `data_10` int(11) DEFAULT 0,
  `data_11` int(11) DEFAULT 0,
  `data_12` int(11) DEFAULT 0,
  `data_13` int(11) DEFAULT 0,
  `data_14` int(11) DEFAULT 0,
  `data_15` int(11) DEFAULT 0,
  `data_16` int(11) DEFAULT 0,
  `data_17` int(11) DEFAULT 0,
  `data_18` int(11) DEFAULT 0,
  `data_19` int(11) DEFAULT 0,
  `data_20` int(11) DEFAULT 0,
  `data_21` int(11) DEFAULT 0,
  `data_22` int(11) DEFAULT 0,
  `data_23` int(11) DEFAULT 0,
  `data_24` int(11) DEFAULT 0,
  `data_25` int(11) DEFAULT 0,
  `data_26` int(11) DEFAULT 0,
  `data_27` int(11) DEFAULT 0,
  `data_28` int(11) DEFAULT 0,
  `data_29` int(11) DEFAULT 0,
  `data_30` int(11) DEFAULT 0,
  `data_31` int(11) DEFAULT 0,
  `data_32` int(11) DEFAULT 0,
  PRIMARY KEY (`id_device`,`value_id`),
  KEY `mongrp_id` (`mongrp_id`),
  KEY `value_id` (`value_id`),
  KEY `history_type` (`history_type`),
  CONSTRAINT `history_int_ibfk_1` FOREIGN KEY (`id_device`) REFERENCES `devices` (`id_device`),
  CONSTRAINT `history_int_ibfk_2` FOREIGN KEY (`mongrp_id`) REFERENCES `mon_groups` (`id`),
  CONSTRAINT `history_int_ibfk_3` FOREIGN KEY (`value_id`) REFERENCES `values_description` (`id`),
  CONSTRAINT `history_int_ibfk_4` FOREIGN KEY (`history_type`) REFERENCES `history_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `history_int`
--

INSERT INTO `history_int` VALUES (1,691,NULL,2,2,37,39,38,32,32,32,33,33,40,32,40,32,40,36,41,45,49,44,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,691,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,691,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,691,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,691,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,880,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,880,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,880,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,880,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,880,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,5986,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,5986,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,5986,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,5986,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,5986,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,18980,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,18980,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,18980,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,18980,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,18980,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,19201,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,19201,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,19201,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,19201,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,19201,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,23566,NULL,2,2,42,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,23566,NULL,3,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,23566,NULL,4,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,23566,NULL,5,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,23566,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,25650,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,25650,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,25650,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,25650,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,25650,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,25828,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,25828,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,25828,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,25828,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,25828,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,28394,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,28394,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,28394,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,28394,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,28394,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,28718,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,28718,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,28718,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,28718,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,28718,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,31703,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,31703,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,31703,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,31703,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,31703,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,48941,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,48941,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,48941,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,48941,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,48941,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,49551,NULL,2,5,40,42,42,40,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,49551,NULL,3,5,34652,34652,34652,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,49551,NULL,4,4,46,46,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,49551,NULL,5,4,364,364,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,49551,NULL,6,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,58991,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,58991,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,58991,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,58991,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,58991,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,63893,NULL,2,9,38,38,38,38,38,38,38,38,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,63893,NULL,3,9,32936,32924,32960,32951,32930,32905,32977,32960,32960,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,63893,NULL,4,13,40,40,40,40,40,41,40,40,40,40,40,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,63893,NULL,5,13,328,328,328,328,328,328,328,328,328,328,328,328,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,63893,NULL,6,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,64110,NULL,2,2,37,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,64110,NULL,3,2,34652,34652,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,64110,NULL,4,2,46,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(2,64110,NULL,5,2,364,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0),(1,64110,NULL,6,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);

--
-- Table structure for table `history_timeslot`
--

CREATE TABLE `history_timeslot` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(32) DEFAULT NULL,
  `unit` smallint(5) unsigned NOT NULL,
  `amount` smallint(5) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `unit` (`unit`),
  CONSTRAINT `history_timeslot_ibfk_1` FOREIGN KEY (`unit`) REFERENCES `time_units` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `history_timeslot`
--

INSERT INTO `history_timeslot` VALUES (1,'5m',1,5),(2,'15m',1,15),(3,'20m',1,20),(4,'1h',2,1),(5,'6h',2,6),(6,'1d',3,1),(7,'1w',4,1),(8,'1m',5,1),(9,'Q',6,1),(10,'Lifetime',7,1),(11,'Counter',1,0);

--
-- Table structure for table `history_type_map`
--

CREATE TABLE `history_type_map` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `history_type` smallint(5) unsigned DEFAULT NULL,
  `customizable` tinyint(1) DEFAULT 0,
  `visible` tinyint(1) DEFAULT 1,
  `bit_type` smallint(5) unsigned DEFAULT NULL,
  `timeslot` smallint(5) unsigned DEFAULT NULL,
  `bit_order` smallint(5) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `history_type` (`history_type`),
  KEY `bit_type` (`bit_type`),
  KEY `timeslot` (`timeslot`),
  CONSTRAINT `history_type_map_ibfk_1` FOREIGN KEY (`history_type`) REFERENCES `history_types` (`id`),
  CONSTRAINT `history_type_map_ibfk_2` FOREIGN KEY (`bit_type`) REFERENCES `history_bit_types` (`id`),
  CONSTRAINT `history_type_map_ibfk_3` FOREIGN KEY (`timeslot`) REFERENCES `history_timeslot` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `history_type_map`
--

INSERT INTO `history_type_map` VALUES (1,1,0,1,1,1,1),(2,1,0,1,1,1,2),(3,1,0,1,2,1,3),(4,1,0,1,1,2,4),(5,1,0,1,1,2,5),(6,1,0,1,1,2,6),(7,1,0,1,2,2,7),(8,1,0,1,1,4,8),(9,1,0,1,1,4,9),(10,1,0,1,1,4,10),(11,1,0,1,1,4,11),(12,1,0,1,1,4,12),(13,1,0,1,2,4,13),(14,1,0,1,1,5,14),(15,1,0,1,1,5,15),(16,1,0,1,1,5,16),(17,1,0,1,2,5,17),(18,1,0,1,1,6,18),(19,1,0,1,1,6,19),(20,1,0,1,1,6,20),(21,1,0,1,1,6,21),(22,1,0,1,1,6,22),(23,1,0,1,1,6,23),(24,1,0,1,2,6,24),(25,1,0,1,1,7,25),(26,1,0,1,1,7,26),(27,1,0,1,1,7,27),(28,1,0,1,2,7,28),(29,1,0,1,1,8,29),(30,1,0,1,1,8,30),(31,1,0,1,2,8,31),(32,1,0,1,2,9,32),(33,2,0,1,2,4,1),(34,2,0,0,2,11,2),(35,2,0,1,2,6,3),(36,2,0,0,2,11,4),(37,2,0,1,2,8,5),(38,2,0,0,2,11,6),(39,2,0,1,2,10,7),(40,2,0,0,2,11,8);

--
-- Table structure for table `history_types`
--

CREATE TABLE `history_types` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `customizable` tinyint(1) DEFAULT 0,
  `visible_dataparts` int(11) DEFAULT 0,
  `description` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `history_types`
--

INSERT INTO `history_types` VALUES (1,0,25,'Default history type'),(2,0,4,'Default small history type');

--
-- Table structure for table `labels`
--

CREATE TABLE `labels` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `label` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `label` (`label`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `labels`
--


--
-- Table structure for table `labels_map`
--

CREATE TABLE `labels_map` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_label` int(11) DEFAULT NULL,
  `id_system_label` int(11) DEFAULT NULL,
  `id_device` smallint(5) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id_label` (`id_label`),
  KEY `id_system_label` (`id_system_label`),
  KEY `id_device` (`id_device`),
  CONSTRAINT `labels_map_ibfk_1` FOREIGN KEY (`id_label`) REFERENCES `labels` (`id`),
  CONSTRAINT `labels_map_ibfk_2` FOREIGN KEY (`id_system_label`) REFERENCES `system_labels` (`id`),
  CONSTRAINT `labels_map_ibfk_3` FOREIGN KEY (`id_device`) REFERENCES `devices` (`id_device`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `labels_map`
--


--
-- Table structure for table `license_status`
--

CREATE TABLE `license_status` (
  `id` int(11) NOT NULL,
  `description` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `license_status`
--

INSERT INTO `license_status` VALUES (1,'License OK'),(2,'Too many devices'),(4,'License expired');

--
-- Table structure for table `liveness_misscount`
--

CREATE TABLE `liveness_misscount` (
  `id` smallint(5) unsigned NOT NULL,
  `description` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `liveness_misscount`
--

INSERT INTO `liveness_misscount` VALUES (1,'0 missed contacts'),(2,'1 missed contact'),(3,'2-5 missed contacts'),(4,'6-20 missed contacts'),(5,'> 20 missed contacts');

--
-- Table structure for table `liveness_time`
--

CREATE TABLE `liveness_time` (
  `id` smallint(5) unsigned NOT NULL,
  `description` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `liveness_time`
--

INSERT INTO `liveness_time` VALUES (1,'5 minutes'),(2,'15 minutes'),(3,'1 hour'),(4,'24 hours'),(5,'>24 hours');

--
-- Table structure for table `mamas_conf`
--

CREATE TABLE `mamas_conf` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` enum('IPaddr','DB version','AdminEmail','SlackToken','SlackChannel','SenderEmail','SmtpServer','SmtpPort','SmtpLogin','SmtpPassword','MamasLicDump','ServiceCoreName') NOT NULL,
  `valtype` smallint(5) unsigned DEFAULT 1,
  `system` tinyint(1) DEFAULT 0,
  `intval` int(11) DEFAULT NULL,
  `floatval` float DEFAULT NULL,
  `strval` varchar(512) DEFAULT NULL,
  `version` int(11) DEFAULT 0,
  `time` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `valtype` (`valtype`),
  CONSTRAINT `mamas_conf_ibfk_1` FOREIGN KEY (`valtype`) REFERENCES `value_types` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `mamas_conf`
--

INSERT INTO `mamas_conf` VALUES (1,'IPaddr',3,0,0,0,'127.0.0.1',0,'2021-09-24 08:31:52'),(2,'DB version',1,1,1,0,'0',0,'2021-09-24 08:31:52'),(3,'MamasLicDump',3,1,30,0,'Mamas license dump:\nVersion: 1\nSeats: 30\nValid from: 2021-03-26 07:18:03\nValid till: 2031-03-25 07:18:03\nMonitoring: 1\nAlerting: 1\nManagement: 1\nAutomation: 1\n',0,'2021-09-24 08:31:52'),(4,'ServiceCoreName',3,1,0,0,'mamas',0,'2021-09-24 08:31:52'),(5,'SlackToken',3,0,NULL,NULL,'xoxb-1808067617635-1793350365879-VBItPh1OfDVfMQsx1DFJ88gv',0,'2021-09-24 08:32:13'),(6,'SlackChannel',3,0,NULL,NULL,'app',0,'2021-09-24 08:32:13');

--
-- Table structure for table `mamas_versions`
--

CREATE TABLE `mamas_versions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `version_major` int(11) NOT NULL,
  `version_minor` int(11) NOT NULL,
  `version_patchlevel` int(11) NOT NULL,
  `version_string` varchar(16) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `major` tinyint(1) DEFAULT 0,
  `beta` tinyint(1) DEFAULT 0,
  `notification` tinyint(1) DEFAULT 0,
  `force_display` tinyint(1) DEFAULT 0,
  `installed` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `mamas_versions`
--

INSERT INTO `mamas_versions` VALUES (1,0,3,0,'beta2','<h3>MAMAS beta2 brings following</h3><ul><li>Additional data for a device:<ul><li>Memory usage</li><li>Device load</li><li>Count of running processes</li><li>Free space left on root FS</li><li>Device uptime and reboot counter</li></ul></li><li>Device statistics for selected metrics</li><li>Basic metrics and statistics per monitoring group</li></ul>Also dont forget:<ul><li>device agents can be downloaded from the top right menu</li><li>settings for slack notification (and others) again from the top right menu</li><li>use monitoring groups to help setup monitoring and alerting</li></ul>',0,1,0,1,'2021-09-24 08:31:50');

--
-- Table structure for table `mon_groups`
--

CREATE TABLE `mon_groups` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `mon_groups`
--

INSERT INTO `mon_groups` VALUES (1,'all');

--
-- Table structure for table `mongrp_map`
--

CREATE TABLE `mongrp_map` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_device` smallint(5) unsigned DEFAULT NULL,
  `mongrp_id` smallint(5) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id_device` (`id_device`),
  KEY `mongrp_id` (`mongrp_id`),
  CONSTRAINT `mongrp_map_ibfk_1` FOREIGN KEY (`id_device`) REFERENCES `devices` (`id_device`),
  CONSTRAINT `mongrp_map_ibfk_2` FOREIGN KEY (`mongrp_id`) REFERENCES `mon_groups` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `mongrp_map`
--

INSERT INTO `mongrp_map` VALUES (1,25828,1),(2,880,1),(3,28394,1),(4,58991,1),(5,63893,1),(6,5986,1),(7,23566,1),(8,49551,1),(9,691,1),(10,18980,1),(11,19201,1),(12,25650,1),(13,28718,1),(14,31703,1),(15,48941,1),(16,64110,1);

--
-- Table structure for table `notes`
--

CREATE TABLE `notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `txt` text DEFAULT NULL,
  `id_device` smallint(5) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `id_device` (`id_device`),
  CONSTRAINT `notes_ibfk_1` FOREIGN KEY (`id_device`) REFERENCES `devices` (`id_device`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `notes`
--


--
-- Table structure for table `operator_types`
--

CREATE TABLE `operator_types` (
  `id` smallint(6) NOT NULL,
  `name` varchar(32) DEFAULT NULL,
  `oper_txt` varchar(10) DEFAULT NULL,
  `oper_txt2` varchar(10) DEFAULT NULL,
  `oper_txt3` varchar(10) DEFAULT NULL,
  `operands` smallint(6) DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `operator_types`
--

INSERT INTO `operator_types` VALUES (0,'non-op',NULL,NULL,NULL,0),(1,'equal','=',NULL,NULL,1),(2,'not equal','!=',NULL,NULL,1),(3,'less than','<',NULL,NULL,1),(4,'less than or equal','<=',NULL,NULL,1),(5,'greater than','>',NULL,NULL,1),(6,'greater than or equal','>=',NULL,NULL,1),(7,'in between','>','AND','<',2),(8,'in between inclusive','>=','AND','<=',2),(9,'outside of','<','OR','>',2);

--
-- Table structure for table `os_autoupgrade_policy`
--

CREATE TABLE `os_autoupgrade_policy` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `os_autoupgrade_policy`
--

INSERT INTO `os_autoupgrade_policy` VALUES (1,'Manage on lastest approved'),(2,'Keep major, manage on latest approved minor'),(3,'Keep major+minor, manage on latest approved patch'),(4,'Keep on specific version'),(5,'Do not touch');

--
-- Table structure for table `os_types`
--

CREATE TABLE `os_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(64) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `os_types`
--

INSERT INTO `os_types` VALUES (1,'Unknown'),(2,'Generic Linux'),(3,'Conel OS'),(4,'Debian Linux');

--
-- Table structure for table `os_versions`
--

CREATE TABLE `os_versions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `os_type` int(11) DEFAULT NULL,
  `description` varchar(32) DEFAULT NULL,
  `available` tinyint(1) DEFAULT 0,
  `approved` tinyint(1) DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `os_type` (`os_type`),
  CONSTRAINT `os_versions_ibfk_1` FOREIGN KEY (`os_type`) REFERENCES `os_types` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `os_versions`
--

INSERT INTO `os_versions` VALUES (1,1,'Unrecognized',0,0),(2,2,'Unrecognized',0,0),(3,4,'Unrecognized',0,0),(4,3,'6.1.8',1,0),(5,3,'6.2.7',1,0),(6,3,'6.2.5',1,0);

--
-- Table structure for table `statistics`
--

CREATE TABLE `statistics` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) DEFAULT NULL,
  `val1` int(11) DEFAULT 0,
  `val2` int(11) DEFAULT 0,
  `val3` int(11) DEFAULT 0,
  `val4` int(11) DEFAULT 0,
  `val5` int(11) DEFAULT 0,
  `mongrp_id` smallint(5) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `mongrp_id` (`mongrp_id`),
  CONSTRAINT `statistics_ibfk_1` FOREIGN KEY (`mongrp_id`) REFERENCES `mon_groups` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `statistics`
--

INSERT INTO `statistics` VALUES (1,'liveness_time',9,0,3,4,0,1),(2,'liveness_miss_count',9,0,0,3,4,1),(3,'timeskew_class',0,0,0,0,0,1),(4,'fw_freshness',0,0,0,0,0,1),(5,'sync_status',0,0,16,0,0,1);

--
-- Table structure for table `sync_status`
--

CREATE TABLE `sync_status` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `sync_status`
--

INSERT INTO `sync_status` VALUES (1,'Arriving devices'),(2,'Being processed'),(3,'Synchronized'),(4,'Sync pending'),(5,'Sync error');

--
-- Table structure for table `system_labels`
--

CREATE TABLE `system_labels` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `label` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `system_labels`
--

INSERT INTO `system_labels` VALUES (1,'new to monitor'),(2,'new to config');

--
-- Table structure for table `time_units`
--

CREATE TABLE `time_units` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `time_units`
--

INSERT INTO `time_units` VALUES (1,'minutes'),(2,'hours'),(3,'days'),(4,'weeks'),(5,'months'),(6,'quarters'),(7,'lifetime');

--
-- Table structure for table `timeskew_time`
--

CREATE TABLE `timeskew_time` (
  `id` smallint(5) unsigned NOT NULL,
  `description` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `timeskew_time`
--

INSERT INTO `timeskew_time` VALUES (1,'< 20 seconds'),(2,'< 3 minutes'),(3,'< 1 hour'),(4,'< 1 day'),(5,'> 1 day');

--
-- Table structure for table `value_types`
--

CREATE TABLE `value_types` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(16) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `value_types`
--

INSERT INTO `value_types` VALUES (1,'int'),(2,'float'),(3,'string'),(4,'bool'),(5,'IPaddr'),(6,'Selection');

--
-- Table structure for table `values_description`
--

CREATE TABLE `values_description` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `description` varchar(128) DEFAULT NULL,
  `data_type` smallint(5) unsigned NOT NULL,
  `usual_min` smallint(5) DEFAULT 0,
  `usual_max` smallint(5) DEFAULT 100,
  `unit` varchar(16) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `data_type` (`data_type`),
  CONSTRAINT `values_description_ibfk_1` FOREIGN KEY (`data_type`) REFERENCES `value_types` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `values_description`
--

INSERT INTO `values_description` VALUES (1,'Voltage',1,0,48,'V'),(2,'Temperature',1,10,50,'C'),(3,'Available memory',1,8000,8000000,'KiB'),(4,'Processes',1,10,100,'#'),(5,'Root FS free space',1,0,1000000000,'KiB'),(6,'Reboot counter',1,1,100,'#');


