Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE DATABASE IF NOT EXISTS rsyslog;
- USE rsyslog;
- DROP TABLE IF EXISTS SystemEvents;
- CREATE TABLE IF NOT EXISTS SystemEvents
- (
- ID int unsigned not null auto_increment,
- CustomerID bigint,
- ReceivedAt timestamp NULL,
- DeviceReportedTime timestamp NULL,
- Facility smallint NULL,
- Priority smallint NULL,
- FromHost varchar(60) NULL,
- Message text,
- NTSeverity int NULL,
- Importance int NULL,
- EventSource varchar(60),
- EventUser varchar(60) NULL,
- EventCategory int NULL,
- EventID int NULL,
- EventBinaryData text NULL,
- MaxAvailable int NULL,
- CurrUsage int NULL,
- MinUsage int NULL,
- MaxUsage int NULL,
- InfoUnitID int NULL ,
- SysLogTag varchar(60),
- EventLogType varchar(60),
- GenericFileName VarChar(60),
- SystemID int NULL,
- PRIMARY KEY(`ID`,`DeviceReportedTime`)
- -- KEY(`DeviceReportedTime`)
- )
- PARTITION BY RANGE (UNIX_TIMESTAMP(`DeviceReportedTime`)) (
- PARTITION p042015 VALUES LESS THAN (UNIX_TIMESTAMP('2015-05-01 00:00:00')),
- PARTITION p052015 VALUES LESS THAN (UNIX_TIMESTAMP('2015-06-01 00:00:00')),
- PARTITION p062015 VALUES LESS THAN (UNIX_TIMESTAMP('2015-07-01 00:00:00')),
- PARTITION p072015 VALUES LESS THAN (UNIX_TIMESTAMP('2015-08-01 00:00:00')),
- PARTITION p082015 VALUES LESS THAN (UNIX_TIMESTAMP('2015-09-01 00:00:00')),
- PARTITION p092015 VALUES LESS THAN (UNIX_TIMESTAMP('2015-10-01 00:00:00')),
- PARTITION p102015 VALUES LESS THAN (UNIX_TIMESTAMP('2015-11-01 00:00:00')),
- PARTITION p112015 VALUES LESS THAN (UNIX_TIMESTAMP('2015-12-01 00:00:00')),
- PARTITION p122015 VALUES LESS THAN (UNIX_TIMESTAMP('2016-01-01 00:00:00')),
- PARTITION pmax VALUES LESS THAN MAXVALUE
- );
- DROP TABLE IF EXISTS SystemEventsProperties;
- CREATE TABLE IF NOT EXISTS SystemEventsProperties
- (
- ID int unsigned not null auto_increment primary key,
- SystemEventID int NULL ,
- ParamName varchar(255) NULL ,
- ParamValue text NULL
- );
- GRANT ALL ON syslog.* TO 'rsyslog'@'localhost' IDENTIFIED BY 'dupa123';
- FLUSH PRIVILEGES;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement