21.update.concur.mql 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. select id,identifier,agent,node,severity,msg,lastoccurrence,vtime from /test/malert_status
  2. where identifier=?
  3. refresh
  4. -- { output() params("222.129.134.178.1.3.6.1.4.1.2011.5.25.219.2.5.665.25.219.2.5.600009999") }
  5. ;
  6. insert into /test/malert_status (identifier, severity, lastoccurrence, maintenance, msg, type, agent, firstoccurrence, omni_class, nodealias, alertgroup, node, manager, originalseverity, summary) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
  7. -- { params("222.129.134.178.1.3.6.1.4.1.2011.5.25.219.2.5.665.25.219.2.5.600009999", 5, 1622249715000, 1, "设备:(222.129.134.178\u0029电源整体功能恢复! 000000009999", 2, "huawei mttrapd #0000999", 1622211715023, "300", "222.129.134.178", "huawei_power_func", "222.129.134.178", "MTTrapd Probe", 5, "设备:(222.129.134.178\u0029电源整体功能恢复! 000000009999") }
  8. ;
  9. select id,identifier,agent,node,severity,msg,lastoccurrence,vtime from /test/malert_status
  10. where identifier=?
  11. refresh
  12. -- { output() equal(0,severity,5) params("222.129.134.178.1.3.6.1.4.1.2011.5.25.219.2.5.665.25.219.2.5.600009999") }
  13. ;
  14. update /test/malert_status
  15. set severity=4,
  16. msg='设备:(222.129.134.178\u0029电源整体功能恢复! 000000009999'
  17. where id='7663188898751057475'
  18. -- { parallel(1000) loop(10000) }
  19. ;
  20. select id,identifier,agent,node,severity,msg,lastoccurrence,vtime from /test/malert_status
  21. where identifier=?
  22. refresh
  23. -- { output() equal(0,severity,4) params("222.129.134.178.1.3.6.1.4.1.2011.5.25.219.2.5.665.25.219.2.5.600009999") }
  24. ;
  25. update /test/malert_status
  26. set severity=4,
  27. msg='设备:(222.129.134.178\u0029电源整体功能恢复! 000000009999'
  28. where id=?
  29. -- { parallel(1000) loop(10000) params("7663188898751057475") }
  30. ;
  31. select id,identifier,agent,node,severity,msg,lastoccurrence,vtime from /test/malert_status
  32. where identifier=?
  33. refresh
  34. -- { output() equal(0,severity,4) params("222.129.134.178.1.3.6.1.4.1.2011.5.25.219.2.5.665.25.219.2.5.600009999") }
  35. ;
  36. update /test/malert_status
  37. set severity=3,
  38. msg='设备:(222.129.134.178\u0029电源整体功能恢复! 000000009999'
  39. where id=?
  40. -- { parallel(1) loop(1) params("7663188898751057475") }
  41. ;
  42. select identifier,agent,node,severity,msg,lastoccurrence,vtime from /test/malert_status
  43. where identifier=?
  44. refresh
  45. -- { output() equal(0,severity,3) params("222.129.134.178.1.3.6.1.4.1.2011.5.25.219.2.5.665.25.219.2.5.600009999") }
  46. ;
  47. update /test/malert_status
  48. set severity=2,
  49. msg='设备:(222.129.134.178\u0029电源整体功能恢复! 000000009999'
  50. where identifier=?
  51. -- { parallel(1) loop(1) params("222.129.134.178.1.3.6.1.4.1.2011.5.25.219.2.5.665.25.219.2.5.600009999") }
  52. ;
  53. select identifier,agent,node,severity,msg,lastoccurrence,vtime from /test/malert_status
  54. where identifier=?
  55. refresh
  56. -- { output() equal(0,severity,2) params("222.129.134.178.1.3.6.1.4.1.2011.5.25.219.2.5.665.25.219.2.5.600009999") }
  57. ;