
create class if not exists /oktest()
;

create class if not exists /oktest/alert_status_0000 ( 
    acknowledged          int        "acknowledged",
    msg                   varchar    "msg",
    agent                 varchar    "AAgent",
    alertgroup            varchar    "alertgroup",
    alertkey              varchar    "alertkey",
    bsm_classname         varchar    "bsm_classname",
    bsm_identity          varchar    "bsm_identity",
    bsm_subidentity       varchar    "bsm_subidentity",
    businessimpact        int        "businessimpact",
    causetype             int        "causetype",
    ciid                  varchar    "ciid",
    cmdbenrichstatus      int        "cmdbenrichstatus",
    corrscore             int        "corrscore",
    customer              varchar    "customer",
    domaingroup           varchar    "domaingroup",
    domainsubgroup        varchar    "domainsubgroup",
    duration              int        "duration",
    emailstatus           int        "emailstatus",
    eventid               varchar    "eventid",
    eventtype             enum {
        "10":["主机告警"],
        "11":["数据库告警"],
        "12":["中间件类告警"],
        "13":["应用类告警"],
        "14":["硬件类告警"],
        "99":["其他类告警"]}           "事件类型",
    expiretime            int        "expiretime",
    extendedattr          varchar    "extendedattr",
    firstoccurrence       timestamp  "firstoccurrence",
    flash                 int        "flash",
    grade                 int        "grade",
    identifier            varchar    "identifier",
    internallast          timestamp  "internallast",
    lastoccurrence        timestamp  "lastoccurrence",
    localnodealias        varchar    "localnodealias",
    localobjrelate        int        "localobjrelate",
    localpriobj           varchar    "localpriobj",
    localrootobj          varchar    "localrootobj",
    localsecobj           varchar    "localsecobj",
    localtertobj          varchar    "localtertobj",
    location              varchar    "location",
    logticket             int        "logticket",
    maintenance           enum {
        "0":["Unknown", "未知"],
        "1":["true", "维护期内"],
        "2":["false", "维护期外"]}     "级别",
    manager               varchar    "manager",
    market                varchar    "market",
    netype                varchar    "netype",
    nmoscausetype         int        "nmoscausetype",
    nmosdomainname        varchar    "nmosdomainname",
    nmosentityid          int        "nmosentityid",
    nmoseventmap          varchar    "nmoseventmap",
    nmosmanagedstatus     int        "nmosmanagedstatus",
    nmosobjinst           int        "nmosobjinst",
    nmosserial            varchar    "nmosserial",
    node                  varchar    "node",
    nodealias             varchar    "nodealias",
    nodename              varchar    "nodename",
    objectfullname        varchar    "objectfullname",
    oldrow                int        "oldrow",
    omni_class            varchar    "class",
    omni_serial           int        "serial",
    originalseverity      int        "originalseverity",
    ownergid              int        "ownergid",
    owneruid              int        "owneruid",
    physicalcard          varchar    "physicalcard",
    physicalport          int        "physicalport",
    physicalslot          int        "physicalslot",
    platform              varchar    "platform",
    poll                  int        "poll",
    probesubsecondid      int        "probesubsecondid",
    processreq            int        "processreq",
    region                varchar    "region",
    remotenodealias       varchar    "remotenodealias",
    remoteobjrelate       int        "remoteobjrelate",
    remotepriobj          varchar    "remotepriobj",
    remoterootobj         varchar    "remoterootobj",
    remotesecobj          varchar    "remotesecobj",
    remotetertobj         varchar    "remotetertobj",
    servername            varchar    "servername",
    serverserial          int        "serverserial",
    service               varchar    "service",
    servicenowerrorcode   int        "servicenowerrorcode",
    servicenowstate       int        "servicenowstate",
    servicenowsysid       varchar    "servicenowsysid",
    severity              enum {
        "0":["Unknown", "未知"],
        "1":["Trace", "追踪"],
        "2":["Debug", "调试"],
        "3":["Info", "消息"],
        "4":["Warn", "警告"],
        "5":["Error", "错误"],
        "6":["Fatal", "致命错误"]}    "级别",
    siteid                varchar    "siteid",
    statechange           timestamp  "statechange",
    summary               varchar    "summary",
    suppressescl          int        "suppressescl",
    tally                 int        "tally",
    tasklist              int        "tasklist",
    ticketstatus          varchar    "ticketstatus",
    ttnumber              varchar    "ttnumber",
    ttstate               int        "ttstate",
    ttuser                varchar    "ttuser",
    type                  enum {
        "0":["Type not set"],
        "1":["problem", "问题"],
        "2":["resolution", "恢复"],
        "7":["ISM new alarm", "问题"],
        "8":["ISM old alarm", "恢复"]} "类型",
    url                   varchar    "url",
    x733corrnotif         varchar    "x733corrnotif",
    x733eventtype         int        "x733eventtype",
    x733probablecause     int        "x733probablecause",
    x733specificprob      varchar    "x733specificprob",
    
    keys( identifier ) ,
    index( acknowledged,alertgroup,alertkey,bsm_classname,bsm_identity,bsm_subidentity,businessimpact,causetype,ciid,cmdbenrichstatus,corrscore,customer,domaingroup,domainsubgroup,emailstatus,eventid,eventtype,expiretime,extendedattr,firstoccurrence,flash,grade,identifier,internallast,lastoccurrence,localnodealias,localobjrelate,localpriobj,localrootobj,localsecobj,localtertobj,location,logticket,manager,market,netype,nmoscausetype,nmosdomainname,nmosentityid,nmoseventmap,nmosmanagedstatus,nmosobjinst,nmosserial,node,nodealias,nodename,objectfullname,oldrow,omni_serial,originalseverity,ownergid,owneruid,physicalcard,physicalport,physicalslot,platform,poll,probesubsecondid,processreq,region,remotenodealias,remoteobjrelate,remotepriobj,remoterootobj,remotesecobj,remotetertobj,servername,serverserial,service,servicenowerrorcode,servicenowstate,servicenowsysid,severity,siteid,statechange,summary,suppressescl,tally,tasklist,ticketstatus,ttnumber,ttstate,ttuser,type,url,x733corrnotif,x733eventtype,x733probablecause,x733specificprob) 
)with ttl=366 day, autosearch=true, version=true, key=manu, partition=(node), alias='alert_status_0000_oktest', nickname='alert_status_0000_oktest';



