4.3.concur.insertm.mql 4.8 KB

123456789101112131415161718
  1. insert into /test/malert_status (identifier, severity, lastoccurrence, maintenance, msg, type, agent, firstoccurrence, omni_class, nodealias, alertgroup, node, manager, _tokens, originalseverity, summary) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) on conflict update firstoccurrence=firstoccurrence, servicenowstate=servicenowstate, emailstatus=emailstatus, tally=tally+1
  2. /**
  3. params("222.129.134.178.1.3.6.1.4.1.2011.5.25.219.2.5.665.25.219.2.5.6.00999", 5, 1622249715000, 1, "设备:222.129.134.178电源整体功能恢复!", 2, "huawei mttrapd #00099", 1622211715023, "300", "222.129.134.178", "huawei_power_func", "222.129.134.178/00999", "MTTrapd Probe", {"_raw": "{\"1\":\"SNMP Trap Test.see more:http://www.micmiu.com\",\"1_hex\":\"53 4e 4d 50 20 54 72 61 70 20 54 65 73 74 2e 73 65 65 20 6d 6f 72 65 3a 68 74 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 6d 69 75 2e 63 6f 6d\",\"1_raw\":\"SNMP Trap Test.see more:http://www.micmiu.com\",\"1_text\":\"SNMP Trap Test.see more:http://www.micmiu.com\",\"2\":\"1000\",\"2_hex\":\"1000\",\"2_raw\":\"1000\",\"2_text\":\"1000\",\"3\":\".1.3.6.1.4.1.2011.5.25.219.2.5.6\",\"3_hex\":\".1.3.6.1.4.1.2011.5.25.219.2.5.6\",\"3_raw\":\".1.3.6.1.4.1.2011.5.25.219.2.5.6\",\"3_text\":\".1.3.6.1.4.1.2011.5.25.219.2.5.6\",\"4\":\"SNMPTEST\",\"4_hex\":\"53 4e 4d 50 54 45 53 54\",\"4_raw\":\"SNMPTEST\",\"4_text\":\"SNMPTEST\",\"5\":10,\"5_hex\":10,\"5_raw\":10,\"5_text\":10,\"6\":\"Sat May 29 08:55:14 CST 2021\",\"6_hex\":\"53 61 74 20 4d 61 79 20 32 39 20 30 38 3a 35 35 3a 31 34 20 43 53 54 20 32 30 32 31\",\"6_raw\":\"Sat May 29 08:55:14 CST 2021\",\"6_text\":\"Sat May 29 08:55:14 CST 2021\",\"IPaddress\":\"222.129.134.178\",\"Node\":\"222.129.134.178\",\"OID1\":\".1.3.6.1.2.1.1.1.1\",\"OID2\":\".1.3.6.1.2.1.1.3.0\",\"OID3\":\".1.3.6.1.6.3.1.1.4.1.0\",\"OID4\":\".1.3.6.1.4.1.2011.2.15.2.1.2.1.1.1.1\",\"OID5\":\".1.3.6.1.4.1.2011.2.15.2.1.2.1.1.1.2\",\"OID6\":\".1.3.6.1.4.1.2011.2.15.2.1.2.1.1.1.3\",\"PeerAddress\":\"222.129.134.178\",\"PeerIPaddress\":\"222.129.134.178\",\"Protocol\":\"udp\",\"ReceivedPort\":9162,\"ReceivedTime\":0,\"ReqId\":176301626,\"SNMP_Version\":\"2c\",\"UpTime\":\"1000\",\"Uptime\":\"8:16:40.00\",\"community\":\"public\",\"contextEngineID\":\"\",\"enterprise\":\"\",\"generic-trap\":0,\"notify\":\".1.3.6.1.4.1.2011.5.25.219.2.5.6\",\"securityEngineID\":\"1234\",\"securityLevel\":\"authPriv\",\"securityName\":\"user\",\"specific-trap\":0}"}, 5, "设备:222.129.134.178电源整体功能恢复!")
  4. parallel(500)
  5. loop(10000)
  6. retry(3)
  7. **/
  8. ;
  9. insert into /test/malert_status_seq (identifier, severity, lastoccurrence, maintenance, msg, type, agent, firstoccurrence, omni_class, nodealias, alertgroup, node, manager, _tokens, originalseverity, summary) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) on conflict sequence
  10. /**
  11. params("222.129.134.178.1.3.6.1.4.1.2011.5.25.219.2.5.665.25.219.2.5.6", 5, 1622249715000, 1, "设备:222.129.134.178电源整体功能恢复!", 2, "huawei mttrapd", 1622211715023, "300", "222.129.134.178", "huawei_power_func", "222.129.134.178", "MTTrapd Probe", {"_raw": "{\"1\":\"SNMP Trap Test.see more:http://www.micmiu.com\",\"1_hex\":\"53 4e 4d 50 20 54 72 61 70 20 54 65 73 74 2e 73 65 65 20 6d 6f 72 65 3a 68 74 74 70 3a 2f 2f 77 77 77 2e 6d 69 63 6d 69 75 2e 63 6f 6d\",\"1_raw\":\"SNMP Trap Test.see more:http://www.micmiu.com\",\"1_text\":\"SNMP Trap Test.see more:http://www.micmiu.com\",\"2\":\"1000\",\"2_hex\":\"1000\",\"2_raw\":\"1000\",\"2_text\":\"1000\",\"3\":\".1.3.6.1.4.1.2011.5.25.219.2.5.6\",\"3_hex\":\".1.3.6.1.4.1.2011.5.25.219.2.5.6\",\"3_raw\":\".1.3.6.1.4.1.2011.5.25.219.2.5.6\",\"3_text\":\".1.3.6.1.4.1.2011.5.25.219.2.5.6\",\"4\":\"SNMPTEST\",\"4_hex\":\"53 4e 4d 50 54 45 53 54\",\"4_raw\":\"SNMPTEST\",\"4_text\":\"SNMPTEST\",\"5\":10,\"5_hex\":10,\"5_raw\":10,\"5_text\":10,\"6\":\"Sat May 29 08:55:14 CST 2021\",\"6_hex\":\"53 61 74 20 4d 61 79 20 32 39 20 30 38 3a 35 35 3a 31 34 20 43 53 54 20 32 30 32 31\",\"6_raw\":\"Sat May 29 08:55:14 CST 2021\",\"6_text\":\"Sat May 29 08:55:14 CST 2021\",\"IPaddress\":\"222.129.134.178\",\"Node\":\"222.129.134.178\",\"OID1\":\".1.3.6.1.2.1.1.1.1\",\"OID2\":\".1.3.6.1.2.1.1.3.0\",\"OID3\":\".1.3.6.1.6.3.1.1.4.1.0\",\"OID4\":\".1.3.6.1.4.1.2011.2.15.2.1.2.1.1.1.1\",\"OID5\":\".1.3.6.1.4.1.2011.2.15.2.1.2.1.1.1.2\",\"OID6\":\".1.3.6.1.4.1.2011.2.15.2.1.2.1.1.1.3\",\"PeerAddress\":\"222.129.134.178\",\"PeerIPaddress\":\"222.129.134.178\",\"Protocol\":\"udp\",\"ReceivedPort\":9162,\"ReceivedTime\":0,\"ReqId\":176301626,\"SNMP_Version\":\"2c\",\"UpTime\":\"1000\",\"Uptime\":\"8:16:40.00\",\"community\":\"public\",\"contextEngineID\":\"\",\"enterprise\":\"\",\"generic-trap\":0,\"notify\":\".1.3.6.1.4.1.2011.5.25.219.2.5.6\",\"securityEngineID\":\"1234\",\"securityLevel\":\"authPriv\",\"securityName\":\"user\",\"specific-trap\":0}"}, 5, "设备:222.129.134.178电源整体功能恢复!")
  12. retry(3)
  13. **/
  14. ;