|
@@ -0,0 +1,75 @@
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+insert into /test/malert_status (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 count(*) from /test/malert_status
|
|
|
|
|
+/**
|
|
|
|
|
+output()
|
|
|
|
|
+matchcount("count", 10001, 1)
|
|
|
|
|
+**/
|
|
|
|
|
+;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+update /test/malert_status set summary='xxx' where identifier='xxx'
|
|
|
|
|
+/**
|
|
|
|
|
+output()
|
|
|
|
|
+**/
|
|
|
|
|
+;
|
|
|
|
|
+
|
|
|
|
|
+select class,id,identifier,summary from /test/malert_status where identifier='xxx'
|
|
|
|
|
+/**
|
|
|
|
|
+output()
|
|
|
|
|
+matchcount(identifier, "xxx", summary, "xxx", 1)
|
|
|
|
|
+**/
|
|
|
|
|
+;
|
|
|
|
|
+
|
|
|
|
|
+update /test/malert_status set summary='aaa' where id='9953570177941151804'
|
|
|
|
|
+/**
|
|
|
|
|
+output()
|
|
|
|
|
+**/
|
|
|
|
|
+;
|
|
|
|
|
+
|
|
|
|
|
+select id,summary from /test/malert_status where id='9953570177941151804'
|
|
|
|
|
+/**
|
|
|
|
|
+output()
|
|
|
|
|
+matchcount(id, "9953570177941151804", summary, "aaa", 1)
|
|
|
|
|
+**/
|
|
|
|
|
+;
|
|
|
|
|
+
|
|
|
|
|
+update /test/malert_status set summary='xxx' where id='9953570177941151804'
|
|
|
|
|
+/**
|
|
|
|
|
+output()
|
|
|
|
|
+**/
|
|
|
|
|
+;
|
|
|
|
|
+
|
|
|
|
|
+select id,summary from /test/malert_status where id='9953570177941151804'
|
|
|
|
|
+/**
|
|
|
|
|
+output()
|
|
|
|
|
+matchcount(id, "9953570177941151804", summary, "xxx", 1)
|
|
|
|
|
+**/
|
|
|
|
|
+;
|
|
|
|
|
+
|
|
|
|
|
+delete from /test/malert_status where identifier='xxx'
|
|
|
|
|
+/**
|
|
|
|
|
+output()
|
|
|
|
|
+**/
|
|
|
|
|
+;
|
|
|
|
|
+
|
|
|
|
|
+select class,id,identifier,summary from /test/malert_status where identifier='xxx'
|
|
|
|
|
+/**
|
|
|
|
|
+output()
|
|
|
|
|
+count(0)
|
|
|
|
|
+**/
|
|
|
|
|
+;
|
|
|
|
|
+
|
|
|
|
|
+select count(*) from /test/malert_status
|
|
|
|
|
+/**
|
|
|
|
|
+output()
|
|
|
|
|
+matchcount("count", 10000, 1)
|
|
|
|
|
+**/
|
|
|
|
|
+;
|