2024-06-29 13:10:44 +01:00
|
|
|
CREATE TABLE monutil_hosts (
|
|
|
|
hostname NVARCHAR(255) PRIMARY KEY,
|
|
|
|
ipAddress VARCHAR(15) NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE monutil_hostlogs (
|
2024-08-19 16:25:22 +01:00
|
|
|
logID BIGINT IDENTITY(1, 1) PRIMARY KEY,
|
2024-06-29 13:10:44 +01:00
|
|
|
hostname NVARCHAR(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 (
|
2024-08-19 16:25:22 +01:00
|
|
|
logID BIGINT IDENTITY(1, 1) PRIMARY KEY,
|
2024-06-29 13:10:44 +01:00
|
|
|
hostname NVARCHAR(255) NOT NULL,
|
|
|
|
url NVARCHAR(MAX) NOT NULL,
|
|
|
|
logTime DATETIME NOT NULL,
|
|
|
|
responseTime DECIMAL(5, 2) NOT NULL,
|
|
|
|
FOREIGN KEY (hostname) REFERENCES monutil_hosts(hostname)
|
|
|
|
);
|
2024-08-19 16:25:22 +01:00
|
|
|
|
|
|
|
CREATE TABLE monutil_ipblock (
|
|
|
|
logID BIGINT IDENTITY(1, 1) PRIMARY KEY,
|
|
|
|
hostname NVARCHAR(255) NOT NULL,
|
|
|
|
blockedIPAddress NVARCHAR(45) NOT NULL,
|
|
|
|
jail NVARCHAR(255),
|
|
|
|
live BIT NOT NULL,
|
|
|
|
logTime DATETIME NOT NULL,
|
|
|
|
FOREIGN KEY (hostname) REFERENCES monutil_hosts(hostname)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE monutil_geoip (
|
|
|
|
geoID BIGINT IDENTITY(1,1) PRIMARY KEY,
|
|
|
|
logID BIGINT NOT NULL,
|
2024-08-19 18:56:56 +01:00
|
|
|
hostname NVARCHAR(255),
|
2024-08-19 16:25:22 +01:00
|
|
|
city NVARCHAR(255),
|
|
|
|
region NVARCHAR(255),
|
|
|
|
country NVARCHAR(255),
|
|
|
|
loc NVARCHAR(50),
|
|
|
|
org NVARCHAR(255),
|
|
|
|
postal NVARCHAR(20),
|
|
|
|
timezone NVARCHAR(50),
|
|
|
|
FOREIGN KEY (logID) REFERENCES monutil_ipblock(logID)
|
|
|
|
);
|