Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.96 KB | None | 0 0
  1. #Define all rule names here
  2. [Rules]
  3. rule_name_list = Demo1, SelfTest1-gettests, SelfTest1-getalerts, Test1, Test2, SelfTest21, SelfTest22, SelfTest23, SelfTest21-TE, SelfTest22-TE, SelfTest23-TE, SelfTest24, SelfTest25
  4.  
  5. #Define all action names here
  6. [Actions]
  7. action_name_list = Demo1Action, SelfTest1-gettests-Action, SelfTest1-getalerts-Action, Test1_Action, Test2_Action, SelfTest21Action, SelfTest22Action, SelfTest23Action, SelfTest24Action, SelfTest25Action
  8.  
  9.  
  10. ##############
  11. # Self Tests #
  12. ##############
  13.  
  14. [SelfTest21]
  15. description = Self test 21
  16. directive = selftest21
  17. meets_conditions = directive
  18. actions = SelfTest21Action
  19.  
  20. [SelfTest22]
  21. description = Self test 22
  22. directive = selftest22
  23. meets_conditions = directive
  24. actions = SelfTest22Action
  25.  
  26. [SelfTest23]
  27. description = Self test 23
  28. directive = selftest23
  29. meets_conditions = directive
  30. actions = SelfTest23Action
  31.  
  32. [SelfTest24]
  33. description = Self test 24
  34. directive = selftest24
  35. meets_conditions = directive
  36. actions = SelfTest24Action
  37.  
  38. [SelfTest25]
  39. description = Self test 25
  40. directive = selftest25
  41. meets_conditions = directive
  42. actions = SelfTest25Action
  43.  
  44. [SelfTest21-TE]
  45. description = Self test 21 with evaluation in TEInterface
  46. mail_keys_list = source.mail_body
  47. source.mail_body = Test Type: Path Visualization pinkunicorn
  48. #Test Type: Path Visualization with result as link. pinkunicorn
  49. meets_conditions = source.mail_body
  50. actions = SelfTest21Action
  51.  
  52. [SelfTest22-TE]
  53. description = Self test 22 with evaluation in TEInterface
  54. mail_keys_list = source.mail_body
  55. source.mail_body = Test Type: HTTP Server pinkunicorn
  56. meets_conditions = source.mail_body
  57. actions = SelfTest22Action
  58.  
  59. [SelfTest23-TE]
  60. description = Self test 23 with evaluation in TEInterface
  61. mail_keys_list = source.mail_body, source.mail_subject
  62. source.mail_body = Test Type: Page Load pinkunicorn
  63. source.mail_subject = with JSON
  64. meets_conditions = source.mail_body and source.mail_subject
  65. actions = SelfTest23Action
  66.  
  67. [SelfTest21Action]
  68. description = Self test 21 Action
  69. run_json_commands = no
  70. te_api_call = /net/path-vis/364081.json
  71. append_te_results_to_received = no
  72. save_json = yes
  73. save_json_as = selftest21.json
  74. save_json_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface
  75. add_attachment_to_post = no
  76. #attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/selftest21.json
  77. json_encoding_list = notessender_encoding, te_urls, te_url_text, long_email, slacksender_encoding, slack_msg
  78. notessender_encoding = {"/BlueWasp/NotesSender": {"mail_sendto": "source.mail_sender", "mail_subject": "subject, source.mail_subject", "mail_keys": "body.prefix, te_url_text, te_urls, body.line_text, body.time_text, source.mail_datetime, body.from_text, source.mail_sender, body.subject_text, source.mail_subject, body.body_text, source.mail_body"}, "subject": "TEInterface Result – "}
  79. #files = {"files":[ "selftest21.json" ]}
  80. te_urls = {"te_urls":""}
  81. te_url_text = {"te_url_text":"The Path Visualization Link(s)"}
  82. long_email = {"body": {"prefix": "This email is from the BlueWasp system – SelfTest 21. An email was sent to the NotesReceiver which then commanded TEInteface retrieve a Path Visualization test result from the TE tool. The TEInterface then commanded NotesSender to send this email with the test results.\r\n", "line_text":"===========================\r\nEmail received:\r\n", "time_text": "Time received by NotesReceiver: ", "from_text": "\r\nFrom: ", "subject_text": "\r\nSubject: ", "body_text": "\r\nBody: "}}
  83. slacksender_encoding = {"/BlueWasp/SlackSender":{ "slack_url":"https://hooks.slack.com/services/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", "slack_channel":"#bluewasp-test-c1", "slack_username":"BlueWasp_TEInterface", "message_keys":"slack_body.prefix, te_url_text, te_urls, body.line_text, body.time_text, source.mail_datetime, body.from_text, source.mail_sender, body.subject_text, source.mail_subject, body.body_text, source.mail_body" }}
  84. slack_msg = {"slack_body": {"prefix": "This slack message is from the BlueWasp system – SelfTest 21. An email was sent to the NotesReceiver which then commanded TEInteface retrieve a Path Visualization test result from the TE tool. The TEInterface then commanded SlackSender to send this message with the test results.\r\n", "line_text":"===========================\r\nEmail received:\r\n", "time_text": "Time received by NotesReceiver: ", "from_text": "\r\nFrom: ", "subject_text": "\r\nSubject: ", "body_text": "\r\nBody: "}}
  85. post_to_list = http://9.27.234.43/BlueWasp/NotesSender, http://9.27.234.43/BlueWasp/SlackSender
  86. #post_attachment_to_list = http://9.27.234.43/BlueWasp/NotesSender/files, http://9.27.234.43/BlueWasp/SlackSender/files
  87.  
  88.  
  89. [SelfTest22Action]
  90. description = Self test 22
  91. run_json_commands = no
  92. te_api_call = /web/page-load/357326/1120
  93. pre_event_time = -45
  94. append_te_results_to_received = yes
  95. save_json = no
  96. add_attachment_to_post = no
  97. attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/selftest22.json
  98. json_encoding_list = notessender_encoding, te_urls, te_url_text, long_email, files
  99. notessender_encoding = {"/BlueWasp/NotesSender": {"mail_sendto": "source.mail_sender", "mail_subject": "subject, source.mail_subject", "mail_keys": "body.prefix, source.mail_epoch, te_url_text, te_urls, body.line_text, body.time_text, source.mail_datetime, body.from_text, source.mail_sender, body.subject_text, source.mail_subject, body.body_text, source.mail_body"}, "subject": "TEInterface Result – "}
  100. files = {"files":[ "selftest22.json" ]}
  101. te_urls = {"te_urls":""}
  102. te_url_text = {"te_url_text":"The HTTP Server Link(s)"}
  103. long_email = {"body": {"prefix": "This email is from the BlueWasp system – SelfTest 22. An email was sent to the NotesReceiver which then commanded TEInteface retrieve a HTTP Server test result from the TE tool 45 minutes prior to the email notification. The TEInterface then commanded NotesSender to send this email with the test results.\r\n\r\nTest Time (epoch):", "line_text":"===========================\r\nEmail received:\r\n", "time_text": "Time received by NotesReceiver: ", "from_text": "\r\nFrom: ", "subject_text": "\r\nSubject: ", "body_text": "\r\nBody: "}}
  104. post_to_list = http://9.27.234.43/BlueWasp/NotesSender
  105. post_attachment_to_list = http://9.27.234.43/BlueWasp/NotesSender/files
  106.  
  107. [SelfTest23Action]
  108. description = Self test 23
  109. run_json_commands = yes
  110. te_api_call = /web/page-load/357326.json
  111. append_te_results_to_received = yes
  112. save_json = no
  113. add_attachment_to_post = yes
  114. attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/selftest23.json
  115. json_encoding_list = notessender_encoding, te_urls, te_data, te_url_text, long_email, files
  116. notessender_encoding = {"/BlueWasp/NotesSender": {"mail_sendto": "source.mail_sender", "mail_subject": "subject, source.mail_subject", "mail_keys": "body.correlator_text, source.mail_sourceID, body.prefix, te_url_text, te_urls, body.line_text, body.time_text, source.mail_datetime, body.from_text, source.mail_sender, body.subject_text, source.mail_subject, body.body_text, source.mail_body, te_data"}, "subject": "TEInterface Result – "}
  117. files = {"files":[ "selftest23.json" ]}
  118. te_urls = {"te_urls":""}
  119. te_data = {"te_data":""}
  120. te_url_text = {"te_url_text":"Page load link(s)"}
  121. long_email = {"body": {"correlator_text":"Correlator Value: ", "prefix": "This email is from the BlueWasp system – SelfTest 23. An email was sent to the NotesReceiver which then commanded TEInteface retrieve a Page Load test result JSON file from the TE tool. The TEInterface then commanded NotesSender to send this email with the test results as a JSON file as text in the body of email and as a file attachment.", "line_text":"===========================\r\nEmail received:\r\n", "time_text": "Time received by NotesReceiver: ", "from_text": "\r\nFrom: ", "subject_text": "\r\nSubject: ", "body_text": "\r\nBody: "}}
  122. post_to_list = http://9.27.234.43/BlueWasp/NotesSender
  123. post_attachment_to_list = http://9.27.234.43/BlueWasp/NotesSender/files
  124.  
  125. [SelfTest24Action]
  126. description = Self test 24
  127. run_json_commands = no
  128. te_api_call = /tests/page-load/new
  129. append_te_results_to_received = no
  130. save_json = no
  131. add_attachment_to_post = no
  132. json_encoding_list = te_encoding, notessender_encoding, te_urls, te_url_text, long_email, files
  133. notessender_encoding = {"/BlueWasp/NotesSender": {"mail_sendto": "source.mail_sender", "mail_subject": "subject, source.mail_subject", "mail_keys": "body.prefix, te_url_text, te_urls, body.line_text, body.time_text, source.mail_datetime, body.from_text, source.mail_sender, body.subject_text, source.mail_subject, body.body_text, source.mail_body"}, "subject": "TEInterface Result – "}
  134. te_urls = {"te_urls":""}
  135. te_url_text = {"te_url_text":"The HTTP Server Link(s)"}
  136. te_encoding = {"/BlueWasp/TEInterface": {"create-test":{ "url":"www.google.com", "interval":"300", "agents":[ { "agentId":22 } ], "testName":"Kyung-APIPageLoadTest"} }}
  137. long_email = {"body": {"prefix": "This email is from the BlueWasp system – SelfTest 24. An email was sent to the NotesReceiver which then commanded TEInteface to create a page load test. The TEInterface then commanded NotesSender to send this email with the test results.\r\n", "line_text":"===========================\r\nEmail received:\r\n", "time_text": "Time received by NotesReceiver: ", "from_text": "\r\nFrom: ", "subject_text": "\r\nSubject: ", "body_text": "\r\nBody: "}}
  138. post_to_list = http://9.27.234.43/BlueWasp/NotesSender
  139. post_attachment_to_list =
  140.  
  141. [SelfTest25Action]
  142. description = Self test 25
  143. run_json_commands = no
  144. te_api_call = /tests/page-load/408814/delete
  145. append_te_results_to_received = no
  146. save_json = no
  147. add_attachment_to_post = no
  148. json_encoding_list = notessender_encoding, te_urls, te_url_text, long_email, files
  149. notessender_encoding = {"/BlueWasp/NotesSender": {"mail_sendto": "source.mail_sender", "mail_subject": "subject, source.mail_subject", "mail_keys": "body.prefix, te_url_text, te_urls, body.line_text, body.time_text, source.mail_datetime, body.from_text, source.mail_sender, body.subject_text, source.mail_subject, body.body_text, source.mail_body"}, "subject": "TEInterface Result – "}
  150. te_urls = {"te_urls":""}
  151. te_url_text = {"te_url_text":"The HTTP Server Link(s)"}
  152. long_email = {"body": {"prefix": "This email is from the BlueWasp system – SelfTest 25. An email was sent to the NotesReceiver which then commanded TEInteface to delete a test. The TEInterface then commanded NotesSender to send this email with the test results.\r\n", "line_text":"===========================\r\nEmail received:\r\n", "time_text": "Time received by NotesReceiver: ", "from_text": "\r\nFrom: ", "subject_text": "\r\nSubject: ", "body_text": "\r\nBody: "}}
  153. post_to_list = http://9.27.234.43/BlueWasp/NotesSender
  154. post_attachment_to_list =
  155.  
  156.  
  157. #########
  158. # Rules #
  159. #########
  160.  
  161. [Demo1]
  162. description = Get pageload waterfall data
  163. directive = get_pageload_data
  164. meets_conditions = directive
  165. actions = Demo1Action
  166.  
  167. [SelfTest1-gettests]
  168. description = self test to get tests
  169. directive = get
  170. meets_conditions = directive
  171. actions = SelfTest1-gettests-Action
  172.  
  173. [SelfTest1-getalerts]
  174. description = self test to get alerts
  175. directive = get
  176. meets_conditions = directive
  177. actions = SelfTest1-getalerts-Action
  178.  
  179. [Test1]
  180. description = testing sharing url
  181. directive = run_testFALSE
  182. meets_conditions = directive
  183. actions = Test1_Action
  184.  
  185. [Test2]
  186. description = testing
  187. directive = app_name1
  188. meets_conditions = directive
  189. actions = Test2_Action
  190.  
  191.  
  192. ###########
  193. # ACTIONS #
  194. ###########
  195.  
  196. [Demo1Action]
  197. description = post to NotesSender, post attachment to NotesSender
  198. run_json_commands = yes
  199. json_command_key = TE_command_for_demo_1
  200. append_te_results_to_received = no
  201. save_json = no
  202. save_json_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface
  203. save_json_as = pageloadwaterfalldata.json
  204. add_attachment_to_post = yes
  205. attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/pageloadwaterfalldata.json
  206. json_encoding = {"/BlueWasp/SlackSender":{"slack_url":"https://hooks.slack.com/services/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", "slack_channel":"#bluewasp-test-c1", "slack_username":"BlueWasp_TEInterface", "message_keys":"/BlueWasp/NotesSender.test_info, /BlueWasp/NotesSender.source"}, "/BlueWasp/NotesSender":{"mail_sendto":"email", "mail_subject":"subject-TE", "mail_keys":"source.mail_body, /BlueWasp/NotesSender.test_info, /BlueWasp/NotesSender.te_data", "test_info":"ibm.webex.com pageload waterfall data", "te_data":""}, "source.mail_body":"", "email":"kyung.baek@ibm.com, lingafel@us.ibm.com", "subject-TE":"This is from TE Interface Agent", "files":["pageloadwaterfalldata.json"]}
  207. post_to = http://9.27.234.43/BlueWasp/NotesSender, http://9.27.234.43/BlueWasp/SlackSender
  208. post_attachment_to = http://9.27.234.43/BlueWasp/NotesSender/files, http://9.27.234.43/BlueWasp/SlackSender/files
  209.  
  210.  
  211. [SelfTest1-gettests-Action]
  212. description = post to NotesSender, post attachment to NotesSender
  213. run_json_commands = yes
  214. json_command_key = TE_command_to_get_tests
  215. append_te_results_to_received = no
  216. save_json = yes
  217. save_json_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface
  218. save_json_as = tests.json
  219. add_attachment_to_post = yes
  220. attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/tests.json
  221. json_encoding = {"/BlueWasp/SlackSender":{"slack_url":"https://hooks.slack.com/services/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", "slack_channel":"#bluewasp-test-c1", "slack_username":"BlueWasp_TEInterface", "message_keys":"/BlueWasp/NotesSender.test_info, /BlueWasp/NotesSender.source"}, "/BlueWasp/NotesSender":{"mail_sendto":"email", "mail_subject":"subject-TE", "mail_keys":"/BlueWasp/NotesSender.test_info, /BlueWasp/NotesSender.te_data", "test_info":"Tests", "te_data":""}, "email":"kyung.baek@ibm.com, lingafel@us.ibm.com", "subject-TE":"TE Agent Selftest 1", "files":["tests.json"]}
  222. post_to = http://9.27.234.43/BlueWasp/NotesSender, http://9.27.234.43/BlueWasp/SlackSender
  223. post_attachment_to = http://9.27.234.43/BlueWasp/NotesSender/files, http://9.27.234.43/BlueWasp/SlackSender/files
  224.  
  225. [SelfTest1-getalerts-Action]
  226. description = post to NotesSender, post attachment to NotesSender
  227. run_json_commands = yes
  228. json_command_key = TE_command_to_get_alerts
  229. append_te_results_to_received = no
  230. save_json = no
  231. add_attachment_to_post = yes
  232. te_api_call = /alerts.json
  233. attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/alerts.json
  234. json_encoding = {"/BlueWasp/SlackSender":{"slack_url":"https://hooks.slack.com/services/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", "slack_channel":"#bluewasp-test-c1", "slack_username":"BlueWasp_TEInterface", "message_keys":"/BlueWasp/NotesSender.test_info, /BlueWasp/NotesSender.source"},
  235. "/BlueWasp/NotesSender":{"mail_sendto":"email", "mail_subject":"subject-TE", "mail_keys":"/BlueWasp/NotesSender.test_info, /BlueWasp/NotesSender.te_data", "test_info":"Alerts", "te_data":""}, "email":"kyung.baek@ibm.com, lingafel@us.ibm.com", "subject-TE":"TE Agent Selftest 1", "files":["alerts.json"]}
  236. post_to = http://9.27.234.43/BlueWasp/NotesSender, http://9.27.234.43/BlueWasp/SlackSender
  237. post_attachment_to = http://9.27.234.43/BlueWasp/NotesSender/files, http://9.27.234.43/BlueWasp/SlackSender/files
  238.  
  239. [Test1_Action]
  240. description = posts to notessender, sends Kyung an email with data
  241. run_json_commands = yes
  242. json_command_key = TE_command
  243. #te_api_call = /tests/
  244. append_te_results_to_received = no
  245. save_json = no
  246. add_attachment_to_post = yes
  247. from_timerange = 2017-07-27T18:05:00
  248. end_timerange = 2017-07-27T18:05:01
  249. attachment_path = C:/Users/IBM_ADMIN/Downloads/BlueWasp/TEInterface/pathvis.json
  250. json_encoding = {"/BlueWasp/NotesSender":{"mail_sendto":"email", "mail_subject":"subject-TE", "mail_keys":"/BlueWasp/NotesSender.test_info, /BlueWasp/NotesSender.te_data", "test_info":"Path Vis", "te_data":""}, "email":"kyung.baek@ibm.com", "subject-TE":"Getting path vis info", "files":["pathvis.json"]}
  251. post_to = http://9.27.234.43/BlueWasp/NotesSender
  252. post_attachment_to = http://9.27.234.43/BlueWasp/NotesSender/files
  253.  
  254. [Test2_Action]
  255. description = test pre_event_time
  256. run_json_commands = yes
  257. json_command_key = TE_command
  258. #te_api_call = /web/page-load/357326
  259. from_timerange = 2017-07-31T18:05:00
  260. end_timerange = 2017-07-31T18:10:00
  261. pre_event_time = 30
  262. append_te_results_to_received = no
  263. save_json = yes
  264. save_json_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface
  265. save_json_as = pageload.json
  266. add_attachment_to_post = yes
  267. attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/pageload.json
  268.  
  269. json_encoding_list = notessender_encoding
  270. notessender_encoding = {"/BlueWasp/NotesSender":{"mail_sendto":"email", "mail_subject":"subject-TE", "mail_keys":"/BlueWasp/NotesSender.test_info, /BlueWasp/NotesSender.te_data, /BlueWasp/NotesSender.te_urls", "te_urls":"", "test_info":"page load waterfall data", "te_data":""}, "email":"kyung.baek@ibm.com", "subject-TE":"Testing pre event time", "files":["pageload.json"]}
  271.  
  272. post_to_list = http://9.27.234.43/BlueWasp/NotesSender
  273. post_attachment_to_list = http://9.27.234.43/BlueWasp/NotesSender/files
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement