
create class if not exists /test/interface ( 
		entityname		varchar	"EntityName",
		ifalias			varchar	"IfAlias",
		ifindex			varchar	"IfIndex",
		ifname			varchar	"IfName",
		iftype			varchar	"IfType",
		interface_perf		bucket 		{
				"crc": ["ip", "port"],
				"desc": ["入流量", "出流量", "端口", "IP"],
				"params": [
						["ip", "string", "", "${desc[3]}"],
						["in", "float", "%", "${desc[0]}"],
						["out", "float", "%", "${desc[1]}"],
						["port", "string", "", "${desc[2]}"]
				],
				"ttl": 365,
				"type": "tsdb"
		}	"端口性能",
		interfaceid		varchar	"InterfaceId",
		intname			varchar	"IntName",
		ipaddress		varchar	"IpAddress",
		nodename		varchar	"NodeName",
		parentid		varchar	"ParentId",
		rx_metric		bucket 		{
				"crc": ["deviceip", "portnumber"],
				"desc": [
						"Timestamp",
						"Device Name",
						"Device IP",
						"Port Number",
						"RX Metric 0",
						"RX Metric 1",
						"RX Metric 2",
						"RX Metric 3",
						"Retrieved Timestamp",
						"Timestamp2",
						"RX Metric4",
						"RX Unicast(Percent)",
						"RX Utilization(Percent)",
						"RX Broadcast(Percent)",
						"RX Metric 5",
						"RX Metric 6",
						"RX Throughput(Percent)",
						"RX Unicast2(Percent)",
						"RX Multicast(Percent)",
						"RX Broadcast2(Percent)",
						"RX Metric 7",
						"RX Throughput2(Percent)",
						"RX Metric 8",
						"RX Multicast2(Percent)",
						"RX Metric 9"
				],
				"params": [
						["timestamp", "string", "", "${desc[0]}"],
						["devicename", "string", "", "${desc[1]}"],
						["deviceip", "string", "", "${desc[2]}"],
						["portnumber", "string", "", "${desc[3]}"],
						["rxmetric0", "float", "", "${desc[4]}"],
						["rxmetric1", "float", "", "${desc[5]}"],
						["rxmetric2", "float", "", "${desc[6]}"],
						["rxmetric3", "float", "", "${desc[7]}"],
						["retrievedtimestamp", "string", "", "${desc[8]}"],
						["timestamp2", "string", "", "${desc[9]}"],
						["rxmetric4", "float", "", "${desc[10]}"],
						["rxunicast", "float", "", "${desc[11]}"],
						["rxutilization", "float", "%", "${desc[12]}"],
						["rxbroadcast", "float", "%", "${desc[13]}"],
						["rxmetric5", "float", "", "${desc[14]}"],
						["rxmetric6", "float", "", "${desc[15]}"],
						["rxthroughput", "float", "%", "${desc[16]}"],
						["rxunicast2", "float", "%", "${desc[17]}"],
						["rxmulticast", "float", "%", "${desc[18]}"],
						["rxbroadcast2", "float", "%", "${desc[19]}"],
						["rxmetric7", "float", "", "${desc[20]}"],
						["rxthroughput2", "float", "%", "${desc[21]}"],
						["rxmetric8", "float", "", "${desc[22]}"],
						["rxmulticast2", "float", "%", "${desc[23]}"],
						["rxmetric9", "float", "", "${desc[24]}"]
				],
				"ttl": 365,
				"type": "tsdb"
		}	"RX_METRIC",
		tx_metric		bucket 		{
				"crc": ["deviceip", "portnumber"],
				"desc": [
						"Timestamp",
						"Port Number",
						"TX Metric 0",
						"Device Name",
						"TX Metric 1",
						"TX Metric 2",
						"TX Throughput(Percent)",
						"TX Utilization(Percent)",
						"TX Broadcast(Percent)",
						"TX Unicast(Percent)",
						"TX Metric 3",
						"TX Metric 4",
						"TX Metric 5",
						"TX Metric 6",
						"Device IP",
						"TX Metric 7",
						"TX Utilization2(Percent)",
						"TX Multicast(Percent)",
						"TX Metric 8",
						"TX Throughput2(Percent)",
						"TX Utilization3(Percent)",
						"TX Unicast2(Percent)",
						"TX Throughput3(Percent)",
						"TX Metric 9",
						"Timestamp2",
						"TX Utilization4(Percent)",
						"TX Multicast(Percent)",
						"TX Metric 10",
						"TX Broadcast2(Percent)",
						"TX Throughput4(Percent)",
						"Retrieved Timestamp"
				],
				"params": [
						["timestamp", "string", "", "${desc[0]}"],
						["portnumber", "string", "", "${desc[1]}"],
						["txmetric0", "float", "", "${desc[2]}"],
						["devicename", "string", "", "${desc[3]}"],
						["txmetric1", "float", "", "${desc[4]}"],
						["txmetric2", "float", "", "${desc[5]}"],
						["txthroughput", "float", "%", "${desc[6]}"],
						["txutilization", "float", "%", "${desc[7]}"],
						["txbroadcast", "float", "%", "${desc[8]}"],
						["txunicast", "float", "%", "${desc[9]}"],
						["txmetric3", "float", "", "${desc[10]}"],
						["txmetric4", "float", "", "${desc[11]}"],
						["txmetric5", "float", "", "${desc[12]}"],
						["txmetric6", "float", "", "${desc[13]}"],
						["deviceip", "string", "", "${desc[14]}"],
						["txmetric7", "float", "", "${desc[15]}"],
						["txutilization2", "float", "%", "${desc[16]}"],
						["txmulticast", "float", "%", "${desc[17]}"],
						["txmetric8", "float", "", "${desc[18]}"],
						["txthroughput2", "float", "%", "${desc[19]}"],
						["txutilization3", "float", "%", "${desc[20]}"],
						["txunicast2", "float", "%", "${desc[21]}"],
						["txthroughput3", "float", "%", "${desc[22]}"],
						["txmetric9", "float", "", "${desc[23]}"],
						["timestamp2", "string", "", "${desc[24]}"],
						["txutilization4", "float", "%", "${desc[25]}"],
						["txmulticast", "float", "%", "${desc[26]}"],
						["txmetric10", "float", "", "${desc[27]}"],
						["txbroadcast2", "float", "%", "${desc[28]}"],
						["txthroughput4", "float", "%", "${desc[29]}"],
						["retrievedtimestamp", "string", "", "${desc[30]}"]
				],
				"ttl": 365,
				"type": "tsdb"
		}	"tx_metric",
		
		keys( interfaceid) ,
		index( entityname,ifalias,ifindex,ifname,iftype,interfaceid,intname,ipaddress,nodename,parentid) 
)with ttl=365 day , autosearch=true , version=true , key=manu, partition=nodename , alias='iinterface' , nickname='iinterface' ;



	create class if not exists /test/node ( 
		city				varchar	"City",
		classname		varchar	"ClassName",
		cpu_metric		bucket 		{
				"crc": ["nodeid", "CPU_ID"],
				"desc": [
						"NODE ID",
						"CPU ID",
						"SYSCP_WHSC",
						"User to System CPU(Percent)",
						"STEAL_WHSC",
						"Busy CPU(Percent)",
						"Time Stamp",
						"I/O Wait(Percent)",
						"WAITC_WHSC",
						"System CPU(Percent)",
						"TMZDIFF",
						"BUSYC_WHSC",
						"User CPU(Percent)",
						"WRITETIME",
						"Steal CPU(Percent)",
						"Idle CPU(Percent)",
						"IDLEC_WHSC",
						"User Nice CPU(Percent)"
				],
				"params": [
						["nodeid", "string", "", "${desc[0]}"],
						["CPU_ID", "string", "", "${desc[1]}"],
						["SYSCP_WHSC", "int", "", "${desc[2]}"],
						["User_Sys_Pct", "float", "%", "${desc[3]}"],
						["STEAL_WHSC", "int", "", "${desc[4]}"],
						["Busy_CPU", "float", "%", "${desc[5]}"],
						["Timestamp", "string", "", "${desc[6]}"],
						["Wait_IO_CPU", "float", "%", "${desc[7]}"],
						["WAITC_WHSC", "int", "", "${desc[8]}"],
						["System_CPU", "float", "%", "${desc[9]}"],
						["TMZDIFF", "int", "", "${desc[10]}"],
						["BUSYC_WHSC", "int", "", "${desc[11]}"],
						["User_CPU", "float", "%", "${desc[12]}"],
						["WRITETIME", "string", "", "${desc[13]}"],
						["Steal_CPU_Percent", "float", "%", "${desc[14]}"],
						["Idle_CPU", "float", "%", "${desc[15]}"],
						["IDLEC_WHSC", "int", "", "${desc[16]}"],
						["User_Nice_CPU", "float", "%", "${desc[17]}"]
				],
				"ttl": 365,
				"type": "tsdb"
		}	"cpu_metric",
		disk_metric		bucket 		{
				"crc": ["nodeid", "Mount_Point"],
				"desc": [
						"NODE ID",
						"Mount Point",
						"FS Type",
						"Inodes Used(Percent)",
						"Timestamp",
						"Disk_Free(Percent)",
						"TMZDIFF",
						"Mount Options",
						"Total Inodes",
						"Inodes Free",
						"WRITETIME",
						"Inodes Free(Percent)",
						"Disk Free",
						"File System Status",
						"Inodes Used",
						"Disk Used(Percent)",
						"Disk Used",
						"Disk Name",
						"Size"
				],
				"params": [
						["nodeid", "string", "", "${desc[0]}"],
						["Mount_Point", "string", "", "${desc[1]}"],
						["FS_Type", "string", "", "${desc[2]}"],
						["Inodes_Used_Percent", "float", "%", "${desc[3]}"],
						["Timestamp", "string", "", "${desc[4]}"],
						["Disk_Free_Percent", "float", "%", "${desc[5]}"],
						["TMZDIFF", "string", "", "${desc[6]}"],
						["Mount_Options", "string", "", "${desc[7]}"],
						["Total_Inodes", "float", "", "${desc[8]}"],
						["Inodes_Free", "float", "", "${desc[9]}"],
						["WRITETIME", "string", "", "${desc[10]}"],
						["Inodes_Free_Percent", "float", "%", "${desc[11]}"],
						["Disk_Free", "float", "", "${desc[12]}"],
						["File_System_Status", "int", "", "${desc[13]}"],
						["Inodes_Used", "float", "", "${desc[14]}"],
						["Disk_Used_Percent", "float", "%", "${desc[15]}"],
						["Disk_Used", "float", "", "${desc[16]}"],
						["Disk_Name", "string", "", "${desc[16]}"],
						["Size", "float", "", "${desc[17]}"]
				],
				"ttl": 365,
				"type": "tsdb"
		}	"disk_metric",
		diskio_metric		bucket 		{
				"crc": ["nodeid", "Dev_Name"],
				"desc": [
						"NODE ID",
						"Dev Name",
						"Bulk Read per second",
						"Bulks read",
						"Transfers per second",
						"Timestamp",
						"Dev Minor",
						"TMZDIFF",
						"Dev Name",
						"WRITETIME",
						"Dev Major",
						"Bulk Write per second",
						"Bulks written"
				],
				"params": [
						["nodeid", "string", "", "${desc[0]}"],
						["Dev_Name", "string", "", "${desc[1]}"],
						["Blk_Rds_per_sec", "float", "", "${desc[2]}"],
						["Blks_read", "float", "", "${desc[3]}"],
						["Transfers_per_sec", "float", "", "${desc[4]}"],
						["Timestamp", "string", "", "${desc[5]}"],
						["Dev_Minor", "int", "", "${desc[6]}"],
						["TMZDIFF", "string", "", "${desc[7]}"],
						["WRITETIME", "string", "", "${desc[8]}"],
						["Dev_Major", "int", "", "${desc[9]}"],
						["Blk_wrtn_per_sec", "float", "", "${desc[10]}"],
						["Blks_wrtn", "float", "", "${desc[11]}"]
				],
				"ttl": 365,
				"type": "tsdb"
		}	"KLZ_CPU_IO",
		ipaddress		varchar	"IpAddress",
		nodeid			varchar	"NodeId",
		nodename		varchar	"NodeName",
		state				varchar	"State",
		swaprate_metric		bucket 		{
				"crc": ["nodeid"],
				"desc": [
						"NODE ID",
						"Swap Usage Rate",
						"Timestamp",
						"Peak Swap Space Used",
						"Swap Space Used",
						"TMZDIFF",
						"WRITETIME",
						"Days to Swap Space Full",
						"Days to Peak Space Full",
						"Low Free Memory",
						"Moving Total Swap Space"
				],
				"params": [
						["nodeid", "string", "", "${desc[0]}"],
						["Swap_Usage_Rate", "float", "", "${desc[1]}"],
						["Timestamp", "string", "", "${desc[2]}"],
						["Peak_Swap_Space_Used", "float", "", "${desc[3]}"],
						["Swap_Space_Used", "float", "", "${desc[4]}"],
						["TMZDIFF", "string", "", "${desc[5]}"],
						["WRITETIME", "string", "", "${desc[6]}"],
						["Days_to_Swap_Space_Full", "int", "%", "${desc[7]}"],
						["Days_to_Peak_Space_Full", "int", "", "${desc[8]}"],
						["Low_Free_Memory", "float", "%", "${desc[9]}"],
						["Moving_Total_Swap_Space", "float", "", "${desc[10]}"]
				],
				"ttl": 365,
				"type": "tsdb"
		}	"KLZ_Swap_Rate",
		sysobjid		varchar	"SysObjId",
		systemstats_metric		bucket 		{
				"crc": ["nodeid"],
				"desc": [
						"NODE ID",
						"Page Faults per second",
						"System Load 5min",
						"Number Processes(Percent)",
						"Processes Zombie Count",
						"Pages paged in per second",
						"Pages paged out per second",
						"Processes per second",
						"Number of Users",
						"Open Files",
						"Pages Swap in per second",
						"Timestamp",
						"Total Number Processes",
						"WRITETIME",
						"Pages Swap out per second",
						"Major Faults per second",
						"System Load 1min",
						"System Uptime",
						"Pages Swapped in",
						"Pct Change Processes",
						"Pages paged in",
						"Number Threads Pct",
						"System Load 15min",
						"Max Process ID",
						"Pages paged out",
						"Max Open Files",
						"Open Files(Percent)",
						"TMZDIFF",
						"Pct Change Ctxt Switches",
						"Ctxt Switches per second",
						"Max Number Threads",
						"Pages Swapped out",
						"Total Number Threads"
				],
				"params": [
						["nodeid", "string", "", "${desc[0]}"],
						["Page_Faults_per_sec", "float", "", "${desc[1]}"],
						["System_Load_5min", "float", "", "${desc[2]}"],
						["Number_Processes_Pct", "float", "%", "${desc[3]}"],
						["Processes_Zombie_Count", "int", "", "${desc[4]}"],
						["Pages_paged_in_per_sec", "float", "", "${desc[5]}"],
						["Pages_paged_out_per_sec", "float", "", "${desc[6]}"],
						["Processes_per_sec", "float", "", "${desc[7]}"],
						["Number_of_Users", "int", "", "${desc[8]}"],
						["Open_Files", "int", "", "${desc[9]}"],
						["Pages_Swap_in_per_sec", "float", "", "${desc[10]}"],
						["Timestamp", "string", "", "${desc[11]}"],
						["Total_Number_Processes", "int", "", "${desc[12]}"],
						["WRITETIME", "string", "", "${desc[13]}"],
						["Pages_Swap_out_per_sec", "float", "", "${desc[14]}"],
						["Major_Faults_per_sec", "float", "%", "${desc[15]}"],
						["System_Load_1min", "float", "", "${desc[16]}"],
						["System_Uptime", "float", "", "${desc[17]}"],
						["Pages_Swapped_in", "float", "", "${desc[18]}"],
						["Pct_Change_Processes", "float", "", "${desc[19]}"],
						["Pages_paged_in", "float", "", "${desc[20]}"],
						["Number_Threads_Pct", "float", "%", "${desc[21]}"],
						["System_Load_15min", "float", "", "${desc[22]}"],
						["Max_Process_ID", "float", "", "${desc[23]}"],
						["Pages_paged_out", "float", "", "${desc[24]}"],
						["Max_Open_Files", "float", "", "${desc[25]}"],
						["Open_Files_Pct", "float", "%", "${desc[26]}"],
						["TMZDIFF", "string", "", "${desc[27]}"],
						["Pct_Change_Ctxt_Switches", "float", "", "${desc[28]}"],
						["Ctxt_Switches_per_sec", "float", "%", "${desc[29]}"],
						["Max_Number_Threads", "float", "", "${desc[30]}"],
						["Pages_Swapped_out", "float", "", "${desc[31]}"],
						["Total_Number_Threads", "float", "", "${desc[32]}"]
				],
				"ttl": 365,
				"type": "tsdb"
		}	"KLZ_System_Statistics",
		vmstats_metric		bucket 		{
				"crc": ["nodeid"],
				"desc": [
						"NODE ID",
						"NETME WHSC",
						"Memory Cached(Percent)",
						"Used Virtual Storage(Percent)",
						"TOTMF WHSC",
						"Net Memory Used",
						"NETMP WHSC",
						"MEMUP WHSC",
						"Total Memory Free(Percent)",
						"Used Virtual Storage",
						"Memory Cached",
						"Timestamp",
						"Processes Blocked State",
						"Swap Space Used",
						"WRITETIME",
						"Memory in Buffers",
						"MEMFR WHSC",
						"Memory Used",
						"Total Memory",
						"Memory Free",
						"Net Memory Used(Percent)",
						"TOMFP WHSC",
						"Memory Free(Percent)",
						"Processes Waiting RunTime",
						"Swap Free(Percent)",
						"Total Swap Space",
						"Free Virtual Storage",
						"Swap Space Free",
						"MEMFP WHSC",
						"Free Virtual Storage(Percent)",
						"Memory Used(Percent)",
						"Swap Used(Percent)",
						"TMZDIFF",
						"Shared Memory",
						"Total Virtual Storage",
						"Total Memory Free",
						"MEMUS WHSC"
				],
				"params": [
						["nodeid", "string", "", "${desc[0]}"],
						["NETME_WHSC", "int", "", "${desc[1]}"],
						["Memory_Cached_Pct", "float", "%", "${desc[2]}"],
						["Used_Virtual_Storage_Pct", "float", "%", "${desc[3]}"],
						["TOTMF_WHSC", "int", "", "${desc[4]}"],
						["Net_Memory_Used", "float", "", "${desc[5]}"],
						["NETMP_WHSC", "int", "", "${desc[6]}"],
						["MEMUP_WHSC", "int", "", "${desc[7]}"],
						["Total_Memory_Free_Pct", "float", "%", "${desc[8]}"],
						["Used_Virtual_Storage", "float", "", "${desc[9]}"],
						["Memory_Cached", "float", "", "${desc[10]}"],
						["Timestamp", "string", "", "${desc[11]}"],
						["Processes_Blocked_State", "int", "", "${desc[12]}"],
						["Swap_Space_Used", "float", "%", "${desc[13]}"],
						["WRITETIME", "string", "", "${desc[14]}"],
						["Memory_in_Buffers", "float", "", "${desc[15]}"],
						["MEMFR_WHSC", "int", "", "${desc[16]}"],
						["Memory_Used", "float", "", "${desc[17]}"],
						["Total_Memory", "float", "", "${desc[18]}"],
						["Memory_Free", "float", "", "${desc[19]}"],
						["Net_Memory_Used_Pct", "float", "%", "${desc[20]}"],
						["TOMFP_WHSC", "int", "", "${desc[21]}"],
						["Memory_Free_Pct", "float", "%", "${desc[22]}"],
						["Processes_Waiting_RunTime", "int", "", "${desc[23]}"],
						["Swap_Free_Pct", "float", "%", "${desc[24]}"],
						["Total_Swap_Space", "float", "", "${desc[25]}"],
						["Free_Virtual_Storage", "float", "", "${desc[26]}"],
						["Swap_Space_Free", "float", "", "${desc[27]}"],
						["MEMFP_WHSC", "int", "", "${desc[28]}"],
						["Free_Virtual_Storage_Pct", "float", "", "${desc[29]}"],
						["Memory_Used_Pct", "float", "", "${desc[30]}"],
						["Swap_Used_Pct", "float", "", "${desc[31]}"],
						["TMZDIFF", "string", "", "${desc[32]}"],
						["Shared_Memory", "float", "", "${desc[33]}"],
						["Total_Virtual_Storage", "float", "", "${desc[34]}"],
						["Total_Memory_Free", "float", "", "${desc[35]}"],
						["MEMUS_WHSC", "int", "", "${desc[36]}"]
				],
				"ttl": 365,
				"type": "tsdb"
		}	"KLZ_VM_Stats",
		
		keys( nodeid) ,
		index( city,classname,ipaddress,nodeid,nodename,state,sysobjid) 
)with ttl=365 day , autosearch=true , version=true , key=manu, partition=state , alias='nnode' , nickname='nnode' ;

create class if not exists /test/interface2 ( 
		entityname		varchar	"EntityName",
		ifalias			varchar	"IfAlias",
		ifindex			varchar	"IfIndex",
		ifname			varchar	"IfName",
		iftype			varchar	"IfType",
		interfaceid		varchar	"InterfaceId",
		intname			varchar	"IntName",
		ipaddress		varchar	"IpAddress",
		nodename		varchar	"NodeName",
		parentid		varchar	"ParentId",
		subinterface		interface2[1..?]	"subinterface",
		
		keys( interfaceid) ,
		index( entityname,ifalias,ifindex,ifname,iftype,interfaceid,intname,ipaddress,nodename,parentid) 
)with version_ttl=365 day , autosearch=true , version=true , key=manu, partition=nodename , alias='interface2' , nickname='interface2' ;

create class if not exists /test/node2 ( 
		city				varchar	"City",
		classname		varchar	"ClassName",
		ipaddress		varchar	"IpAddress",
		nodeid			varchar	"NodeId",
		nodename		varchar	"NodeName",
		state				varchar	"State",
		sysobjid		varchar	"SysObjId",
		interface		interface2[1..?]	"interface",
		
		keys( nodeid) ,
		index( city,classname,ipaddress,nodeid,nodename,state,sysobjid) 
)with version_ttl=365 day , autosearch=true , version=true , key=manu, partition=state , alias='node2' , nickname='node2'
;