|
|
@@ -0,0 +1,81 @@
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+insert into /test/malert_status_cache (identifier, severity, lastoccurrence, maintenance, msg, type, agent, firstoccurrence, omni_class, nodealias, alertgroup, node, manager, originalseverity, summary, tags) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) on conflict update firstoccurrence=firstoccurrence, servicenowstate=servicenowstate, emailstatus=emailstatus, tally=tally+1
|
|
|
+/**
|
|
|
+params("xxx", 5, 1622249715000, 1, "设备:222.129.134.178电源整体功能恢复!", 1, "huawei mttrapd #1", 1622211715023, "300", "222.129.134.178", "huawei_power_func", "222.129.134.178", "MTTrapd Probe", 5, "设备:222.129.134.178电源整体功能恢复!", "xxx")
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+select * from /test/malert_status_cache limit -1
|
|
|
+/**
|
|
|
+output()
|
|
|
+count(2001)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+
|
|
|
+update /test/malert_status_cache set summary='xxx' where identifier='xxx'
|
|
|
+/**
|
|
|
+output()
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+select class,id,identifier,summary from /test/malert_status_cache where identifier='xxx'
|
|
|
+/**
|
|
|
+output()
|
|
|
+matchcount(identifier, "xxx", summary, "xxx", 1)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+update /test/malert_status_cache set summary='aaa' where id='z0000000000012CewoVSJrp'
|
|
|
+/**
|
|
|
+output()
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+select class,id,identifier,summary from /test/malert_status_cache where id='z0000000000012CewoVSJrp'
|
|
|
+/**
|
|
|
+output()
|
|
|
+matchcount(id, "z0000000000012CewoVSJrp", summary, "aaa", 1)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+update /test/malert_status_cache set summary='xxx' where id='z0000000000012CewoVSJrp'
|
|
|
+/**
|
|
|
+output()
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+select class,id,identifier,summary from /test/malert_status_cache where id='z0000000000012CewoVSJrp'
|
|
|
+/**
|
|
|
+output()
|
|
|
+matchcount(id, "z0000000000012CewoVSJrp", summary, "xxx", 1)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+select class,id,identifier,summary from /test/malert_status_cache where identifier='xxx'
|
|
|
+/**
|
|
|
+output()
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+delete from /test/malert_status_cache where identifier='xxx'
|
|
|
+/**
|
|
|
+output()
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+select class,id,identifier,summary from /test/malert_status_cache where identifier='xxx'
|
|
|
+/**
|
|
|
+output()
|
|
|
+count(0)
|
|
|
+**/
|
|
|
+;
|
|
|
+
|
|
|
+select count(*) from /test/malert_status_cache
|
|
|
+/**
|
|
|
+output()
|
|
|
+matchcount("count", 2000, 1)
|
|
|
+**/
|
|
|
+;
|