1. #!/usr/bin/env aspl 2. #ENVARG= -wsname CLUSTERED_TESTA_QMGRS -groupingclass IBMMQ_QMGR_GROUP 3. 4. ;;*********************************************************************** 5. ;; monitor_clustered_delta_qmgrs.aspl 6. ;; monitoring a cluster of qmgrs, if a change is detected then send email 7. ;; notifying what has been changed. 8. ;; Assuming the qmgr for TESTA Co. is installed on hosts NYNYMQ and VAVAMQ/ 9. ;; 10. ;; Copyright © 2021-2026 Bassem W. Jamaleddine 11. ;; All rights reserved. 12. ;; 13. ;;*********************************************************************** 14. 15. ;; Before running the script, a first initialization of group variable 16. ;; captures is required. The script issue varchangenotify on a set variable 17. ;; to detect any changes in the group (representing the qmgr configuration). 18. ;; # aspl -wsname CLUSTERED_TESTA_QMGRS -groupingclass IBMMQ_QMGR_GROUP 19. ;; aspl > nytesta = ggibmqmgrs(hostname,nynymq,qmgrname,TESTA) 20. ;; aspl > vatesta = ggibmqmgrs(hostname,vavamq,qmgrname,TESTA) 21. ;; aspl > nyvatesta = fU, nytesta vatesta 22. ;; NOTE: make the variables monitorable, but can also be done inline 23. ;; aspl > vsmonbits nytesta 11111111 24. ;; aspl > vsmonbits vatesta 11111111 25. ;; aspl > vsmonbits nyvatesta 11111111 26. ;; aspl > bye 27. 28. endScriptIfShellArgsLessThan 1 29. 30. ks- ALTDATE ALTTIME chksum 31. 32. ;; if you didn't set the monitoring bits in the variable, then you can do 33. ;; it inline 34. vsmonbits $1 11111111 35. 36. varchangenotify $1 emailsgroup1 37. 38. ;; uncomment the line below to save the last updated qmgrs otherwise 39. ;; last changes are not recorded, and script will keep sending emails 40. ;;save 41. 42. endscript 43. 44. __END__ 45. 46. $00 detects changes in the qmgr attributes of IBM MQ qmgr at ACME Co. 47. The qmgr TESTA is created on two hosts: nynymq and vavamq; it is 48. assumed to be a clustered qmgr. Using ASPL command varchangenotify, we can 49. monitor if there is any change in the group representing the clustered 50. qmgr TESTA; if a change is detected then an email showing what has 51. changed is sent to the list of emails tagged with emailsgroup1. 52. 53. You must provide the grouping variable for the qmgr or gmgrs 54. nytesta for qmgr TESTA hosted on NYNYMQ 55. vatesta for qmgr TESTA hosted on VAVAMQ 56. nyvatesta for qmgr TESTA hosted on NYNYMQ and VAVAMQ 57. 58. The nyvatesta is the group variable that represents both qmgrs 59. installed on hosts NYNYMQ and VAVAMQ, that is: nyvatesta = fU, nytesta vatesta