PHP-SNMP-Server-Baseline-Monitor mysql_database_create.sql 痛定思痛。 2023-10-18 20:12 56阅读 0赞 CREATE TABLE \`applications\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`name\` varchar(500) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`datetime\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`type\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`devices\` ( \`device\_id\` int(11) NOT NULL AUTO\_INCREMENT, \`ip\` varchar(253) COLLATE utf8\_unicode\_ci NOT NULL, \`community\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, PRIMARY KEY (\`device\_id\`), UNIQUE KEY \`ip\` (\`ip\`) ) ENGINE=InnoDB AUTO\_INCREMENT=66 DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`interfaces\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`ifindex\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`descr\` varchar(500) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`type\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`mtu\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`speed\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`physaddress\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`adminstatus\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`operstatus\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`ipaddresses\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`ifindex\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`addr\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`netmask\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`bcastaddr\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`ipnettomedias\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`ifindex\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`physaddress\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`netaddress\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`type\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`iproutes\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`dest\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`ifindex\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`metric\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`nexthop\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`type\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`proto\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`mask\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`processes\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`process\_id\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`path\` varchar(500) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`name\` varchar(500) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`parameter\` varchar(500) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`status\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`type\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`memory\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`cpu\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`processors\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`cpu\_id\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`cpu\_load\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`snaps\` ( \`snap\_id\` int(11) unsigned NOT NULL AUTO\_INCREMENT, \`datetime\` timestamp NOT NULL DEFAULT CURRENT\_TIMESTAMP, PRIMARY KEY (\`snap\_id\`) ) ENGINE=InnoDB AUTO\_INCREMENT=156 DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`storages\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`storage\_id\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`description\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`sizeingb\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`usedingb\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`usedpercent\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`systems\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`name\` varchar(500) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`description\` varchar(500) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`uptime\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`datetime\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`device\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`parameter\` varchar(500) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`numusers\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`processes\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`maxprocesses\` varchar(255) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`tcpconns\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`localaddress\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`localport\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`remaddress\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`remport\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`state\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci; CREATE TABLE \`udpconns\` ( \`snap\_id\` int(11) unsigned NOT NULL, \`device\_id\` int(11) NOT NULL, \`localaddress\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL, \`localport\` varchar(50) COLLATE utf8\_unicode\_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8\_unicode\_ci;
还没有评论,来说两句吧...