SensorDisplayItem ing
This commit is contained in:
parent
448469b006
commit
20af559831
|
@ -18,6 +18,7 @@ public class MetaSensorDisplayItem {
|
||||||
private MetaCrawler crawler;
|
private MetaCrawler crawler;
|
||||||
private MetaSensorItemUnit unit;
|
private MetaSensorItemUnit unit;
|
||||||
private Date createDate;
|
private Date createDate;
|
||||||
|
private boolean isDefault;
|
||||||
|
|
||||||
public MetaSensorDisplayItem() {
|
public MetaSensorDisplayItem() {
|
||||||
|
|
||||||
|
@ -93,4 +94,14 @@ public class MetaSensorDisplayItem {
|
||||||
this.createDate = createDate;
|
this.createDate = createDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Basic
|
||||||
|
@Column(name="IS_DEFAULT", nullable = false, columnDefinition = "boolean default false")
|
||||||
|
public boolean getDefault() {
|
||||||
|
return isDefault;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDefault(boolean aDefault) {
|
||||||
|
isDefault = aDefault;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -925,38 +925,57 @@ INSERT INTO meta_sensor_item_key (id,create_date,froms,"key",option_json,crawler
|
||||||
INSERT INTO meta_sensor_item_key (id,create_date,froms,"key",option_json,crawler_id,item_id,unit_id) VALUES (
|
INSERT INTO meta_sensor_item_key (id,create_date,froms,"key",option_json,crawler_id,item_id,unit_id) VALUES (
|
||||||
'146','2017-06-26 19:49:04','Win32_OperatingSystem ','FreeSpaceInPagingFiles','','23','146','3');
|
'146','2017-06-26 19:49:04','Win32_OperatingSystem ','FreeSpaceInPagingFiles','','23','146','3');
|
||||||
|
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
|
||||||
'1','2017-11-07 16:08:59','','CPU Total usage (%)','ssh.cpu.usage.total','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'1','2017-11-07 16:08:59','true','','CPU Total usage (%)','ssh.cpu.usage.total','21','1');
|
||||||
'2','2017-11-07 16:08:59','','CPU User (%)','ssh.cpu.usage.user','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'2','2017-11-07 16:08:59','false','','CPU User (%)','ssh.cpu.usage.user','21','1');
|
||||||
'3','2017-11-07 16:08:59','','CPU Nice (%)','ssh.cpu.usage.nice','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'3','2017-11-07 16:08:59','false','','CPU Nice (%)','ssh.cpu.usage.nice','21','1');
|
||||||
'4','2017-11-07 16:08:59','','CPU System (%)','ssh.cpu.usage.system','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'4','2017-11-07 16:08:59','false','','CPU System (%)','ssh.cpu.usage.system','21','1');
|
||||||
'5','2017-11-07 16:08:59','','CPU Idle (%)','ssh.cpu.usage.idle','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'5','2017-11-07 16:08:59','false','','CPU Idle (%)','ssh.cpu.usage.idle','21','1');
|
||||||
'6','2017-11-07 16:08:59','','CPU IO wait (%)','ssh.cpu.usage.iowait','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'6','2017-11-07 16:08:59','false','','CPU IO wait (%)','ssh.cpu.usage.iowait','21','1');
|
||||||
'7','2017-11-07 16:08:59','','CPU IRQ (%)','ssh.cpu.usage.irq','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'7','2017-11-07 16:08:59','false','','CPU IRQ (%)','ssh.cpu.usage.irq','21','1');
|
||||||
'8','2017-11-07 16:08:59','','CPU Soft IRQ (%)','ssh.cpu.usage.softirq','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'8','2017-11-07 16:08:59','false','','CPU Soft IRQ (%)','ssh.cpu.usage.softirq','21','1');
|
||||||
'9','2017-11-07 16:08:59','','CPU Steal (%)','ssh.cpu.usage.steal','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'9','2017-11-07 16:08:59','false','','CPU Steal (%)','ssh.cpu.usage.steal','21','1');
|
||||||
'10','2017-11-07 16:08:59','','CPU Guest (%)','ssh.cpu.usage.guest','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'10','2017-11-07 16:08:59','false','','CPU Guest (%)','ssh.cpu.usage.guest','21','1');
|
||||||
'11','2017-11-07 16:08:59','','CPU Guest Nice (%)','ssh.cpu.usage.gnice','21','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'11','2017-11-07 16:08:59','false','','CPU Guest Nice (%)','ssh.cpu.usage.gnice','21','1');
|
||||||
'12','2017-11-07 16:08:59','','CPU Total usage (%)','wmi.cpu.usage.total','23','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'12','2017-11-07 16:08:59','true','','CPU Total usage (%)','wmi.cpu.usage.total','23','1');
|
||||||
'13','2017-11-07 16:08:59','','CPU Idle (%)','wmi.cpu.usage.idle','23','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'13','2017-11-07 16:08:59','false','','CPU Idle (%)','wmi.cpu.usage.idle','23','1');
|
||||||
'14','2017-11-07 16:08:59','','CPU Processor (%)','wmi.cpu.usage.processor','23','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'14','2017-11-07 16:08:59','false','','CPU Processor (%)','wmi.cpu.usage.processor','23','1');
|
||||||
'15','2017-11-07 16:08:59','','CPU User (%)','wmi.cpu.usage.user','23','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
INSERT INTO meta_sensor_display_item (id,create_date,description,display_name,"key",crawler_id,unit_id) VALUES (
|
'15','2017-11-07 16:08:59','false','','CPU User (%)','wmi.cpu.usage.user','23','1');
|
||||||
'16','2017-11-07 16:08:59','','CPU Privilege (%)','wmi.cpu.usage.privilege','23','1');
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
|
'16','2017-11-07 16:08:59','false','','CPU Privilege (%)','wmi.cpu.usage.privilege','23','1');
|
||||||
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
|
'17','2017-11-07 16:08:59','true','','Memory Total Usage (%)','ssh.mem.usage.total','21','1');
|
||||||
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
|
'18','2017-11-07 16:08:59','false','','Memory Free space (mb)','ssh.mem.usage.free','21','4');
|
||||||
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
|
'19','2017-11-07 16:08:59','false','','Buffered Memory (mb)','ssh.mem.usage.buffers','21','4');
|
||||||
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
|
'20','2017-11-07 16:08:59','false','','Cached Memory (mb)','ssh.mem.usage.cached','21','4');
|
||||||
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
|
'21','2017-11-07 16:08:59','true','','Swap Total Usage (%)','ssh.mem.swap.usage.total','21','1');
|
||||||
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
|
'22','2017-11-07 16:08:59','false','','Cached Swap (mb)','ssh.mem.swap.usage.cached','21','4');
|
||||||
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
|
'23','2017-11-07 16:08:59','true','','Memory Total usage (%)','wmi.mem.usage.total','23','1');
|
||||||
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
|
'24','2017-11-07 16:08:59','false','','Virtual Memory Usage (%)','wmi.mem.virtual.usage.total','23','1');
|
||||||
|
INSERT INTO meta_sensor_display_item (id,create_date,is_default,description,display_name,"key",crawler_id,unit_id) VALUES (
|
||||||
|
'25','2017-11-07 16:08:59','false','','Paging Usage (%)','wmi.mem.paging.usage.total','23','1');
|
||||||
|
|
||||||
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
'1','1','119');
|
'1','1','119');
|
||||||
|
@ -1014,6 +1033,50 @@ INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES
|
||||||
'27','15','131');
|
'27','15','131');
|
||||||
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
'28','16','132');
|
'28','16','132');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'29','17','133');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'30','17','134');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'31','17','135');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'32','17','136');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'33','17','137');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'34','18','134');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'35','19','136');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'36','20','137');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'37','21','138');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'38','21','139');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'39','21','140');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'40','22','140');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'41','23','141');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'42','23','142');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'43','23','143');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'44','23','144');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'45','23','145');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'46','23','146');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'47','24','143');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'48','24','144');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'49','25','145');
|
||||||
|
INSERT INTO meta_sensor_display_mapping (id,display_item_id,item_key_id) VALUES (
|
||||||
|
'50','25','146');
|
||||||
|
|
||||||
INSERT INTO public.meta_vendor_crawler (id,create_date,crawler_id,vendor_id) VALUES (
|
INSERT INTO public.meta_vendor_crawler (id,create_date,crawler_id,vendor_id) VALUES (
|
||||||
1,'2017-07-27 15:29:48.634',23,26);
|
1,'2017-07-27 15:29:48.634',23,26);
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class MetaSensorDisplayItemServiceTest {
|
||||||
@Ignore
|
@Ignore
|
||||||
public void regist() throws Exception {
|
public void regist() throws Exception {
|
||||||
MetaSensorDisplayItem cpuTotal = new MetaSensorDisplayItem();
|
MetaSensorDisplayItem cpuTotal = new MetaSensorDisplayItem();
|
||||||
cpuTotal.setId(1);
|
cpuTotal.setId(120);
|
||||||
cpuTotal.setCrawler(new MetaCrawler((short)21));
|
cpuTotal.setCrawler(new MetaCrawler((short)21));
|
||||||
cpuTotal.setCreateDate(new Date());
|
cpuTotal.setCreateDate(new Date());
|
||||||
cpuTotal.setKey("CPU_TOTAL");
|
cpuTotal.setKey("CPU_TOTAL");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user