23 lines
650 B
MySQL
23 lines
650 B
MySQL
|
CREATE TABLE monutil_hosts (
|
||
|
hostname VARCHAR(255) PRIMARY KEY,
|
||
|
ipAddress VARCHAR(15) NOT NULL
|
||
|
);
|
||
|
|
||
|
CREATE TABLE monutil_hostlogs (
|
||
|
logID INT AUTO_INCREMENT PRIMARY KEY,
|
||
|
hostname VARCHAR(255) NOT NULL,
|
||
|
logTime DATETIME NOT NULL,
|
||
|
cpu DECIMAL(5, 2) NOT NULL,
|
||
|
memory DECIMAL(5, 2) NOT NULL,
|
||
|
FOREIGN KEY (hostname) REFERENCES monutil_hosts(hostname)
|
||
|
);
|
||
|
|
||
|
CREATE TABLE monutil_urlLogs (
|
||
|
logID INT AUTO_INCREMENT PRIMARY KEY,
|
||
|
hostname VARCHAR(255) NOT NULL,
|
||
|
url TEXT NOT NULL,
|
||
|
logTime DATETIME NOT NULL,
|
||
|
responseTime DECIMAL(5, 2) NOT NULL,
|
||
|
FOREIGN KEY (hostname) REFERENCES monutil_hosts(hostname)
|
||
|
);
|