Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Define all rule names here
- [Rules]
- rule_name_list = Demo1, SelfTest1-gettests, SelfTest1-getalerts, Test1, Test2, SelfTest21, SelfTest22, SelfTest23, SelfTest21-TE, SelfTest22-TE, SelfTest23-TE, SelfTest24, SelfTest25
- #Define all action names here
- [Actions]
- action_name_list = Demo1Action, SelfTest1-gettests-Action, SelfTest1-getalerts-Action, Test1_Action, Test2_Action, SelfTest21Action, SelfTest22Action, SelfTest23Action, SelfTest24Action, SelfTest25Action
- ##############
- # Self Tests #
- ##############
- [SelfTest21]
- description = Self test 21
- directive = selftest21
- meets_conditions = directive
- actions = SelfTest21Action
- [SelfTest22]
- description = Self test 22
- directive = selftest22
- meets_conditions = directive
- actions = SelfTest22Action
- [SelfTest23]
- description = Self test 23
- directive = selftest23
- meets_conditions = directive
- actions = SelfTest23Action
- [SelfTest24]
- description = Self test 24
- directive = selftest24
- meets_conditions = directive
- actions = SelfTest24Action
- [SelfTest25]
- description = Self test 25
- directive = selftest25
- meets_conditions = directive
- actions = SelfTest25Action
- [SelfTest21-TE]
- description = Self test 21 with evaluation in TEInterface
- mail_keys_list = source.mail_body
- source.mail_body = Test Type: Path Visualization pinkunicorn
- #Test Type: Path Visualization with result as link. pinkunicorn
- meets_conditions = source.mail_body
- actions = SelfTest21Action
- [SelfTest22-TE]
- description = Self test 22 with evaluation in TEInterface
- mail_keys_list = source.mail_body
- source.mail_body = Test Type: HTTP Server pinkunicorn
- meets_conditions = source.mail_body
- actions = SelfTest22Action
- [SelfTest23-TE]
- description = Self test 23 with evaluation in TEInterface
- mail_keys_list = source.mail_body, source.mail_subject
- source.mail_body = Test Type: Page Load pinkunicorn
- source.mail_subject = with JSON
- meets_conditions = source.mail_body and source.mail_subject
- actions = SelfTest23Action
- [SelfTest21Action]
- description = Self test 21 Action
- run_json_commands = no
- te_api_call = /net/path-vis/364081.json
- append_te_results_to_received = no
- save_json = yes
- save_json_as = selftest21.json
- save_json_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface
- add_attachment_to_post = no
- #attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/selftest21.json
- json_encoding_list = notessender_encoding, te_urls, te_url_text, long_email, slacksender_encoding, slack_msg
- 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 – "}
- #files = {"files":[ "selftest21.json" ]}
- te_urls = {"te_urls":""}
- te_url_text = {"te_url_text":"The Path Visualization Link(s)"}
- 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: "}}
- 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" }}
- 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: "}}
- post_to_list = http://9.27.234.43/BlueWasp/NotesSender, http://9.27.234.43/BlueWasp/SlackSender
- #post_attachment_to_list = http://9.27.234.43/BlueWasp/NotesSender/files, http://9.27.234.43/BlueWasp/SlackSender/files
- [SelfTest22Action]
- description = Self test 22
- run_json_commands = no
- te_api_call = /web/page-load/357326/1120
- pre_event_time = -45
- append_te_results_to_received = yes
- save_json = no
- add_attachment_to_post = no
- attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/selftest22.json
- json_encoding_list = notessender_encoding, te_urls, te_url_text, long_email, files
- 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 – "}
- files = {"files":[ "selftest22.json" ]}
- te_urls = {"te_urls":""}
- te_url_text = {"te_url_text":"The HTTP Server Link(s)"}
- 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: "}}
- post_to_list = http://9.27.234.43/BlueWasp/NotesSender
- post_attachment_to_list = http://9.27.234.43/BlueWasp/NotesSender/files
- [SelfTest23Action]
- description = Self test 23
- run_json_commands = yes
- te_api_call = /web/page-load/357326.json
- append_te_results_to_received = yes
- save_json = no
- add_attachment_to_post = yes
- attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/selftest23.json
- json_encoding_list = notessender_encoding, te_urls, te_data, te_url_text, long_email, files
- 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 – "}
- files = {"files":[ "selftest23.json" ]}
- te_urls = {"te_urls":""}
- te_data = {"te_data":""}
- te_url_text = {"te_url_text":"Page load link(s)"}
- 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: "}}
- post_to_list = http://9.27.234.43/BlueWasp/NotesSender
- post_attachment_to_list = http://9.27.234.43/BlueWasp/NotesSender/files
- [SelfTest24Action]
- description = Self test 24
- run_json_commands = no
- te_api_call = /tests/page-load/new
- append_te_results_to_received = no
- save_json = no
- add_attachment_to_post = no
- json_encoding_list = te_encoding, notessender_encoding, te_urls, te_url_text, long_email, files
- 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 – "}
- te_urls = {"te_urls":""}
- te_url_text = {"te_url_text":"The HTTP Server Link(s)"}
- te_encoding = {"/BlueWasp/TEInterface": {"create-test":{ "url":"www.google.com", "interval":"300", "agents":[ { "agentId":22 } ], "testName":"Kyung-APIPageLoadTest"} }}
- 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: "}}
- post_to_list = http://9.27.234.43/BlueWasp/NotesSender
- post_attachment_to_list =
- [SelfTest25Action]
- description = Self test 25
- run_json_commands = no
- te_api_call = /tests/page-load/408814/delete
- append_te_results_to_received = no
- save_json = no
- add_attachment_to_post = no
- json_encoding_list = notessender_encoding, te_urls, te_url_text, long_email, files
- 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 – "}
- te_urls = {"te_urls":""}
- te_url_text = {"te_url_text":"The HTTP Server Link(s)"}
- 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: "}}
- post_to_list = http://9.27.234.43/BlueWasp/NotesSender
- post_attachment_to_list =
- #########
- # Rules #
- #########
- [Demo1]
- description = Get pageload waterfall data
- directive = get_pageload_data
- meets_conditions = directive
- actions = Demo1Action
- [SelfTest1-gettests]
- description = self test to get tests
- directive = get
- meets_conditions = directive
- actions = SelfTest1-gettests-Action
- [SelfTest1-getalerts]
- description = self test to get alerts
- directive = get
- meets_conditions = directive
- actions = SelfTest1-getalerts-Action
- [Test1]
- description = testing sharing url
- directive = run_testFALSE
- meets_conditions = directive
- actions = Test1_Action
- [Test2]
- description = testing
- directive = app_name1
- meets_conditions = directive
- actions = Test2_Action
- ###########
- # ACTIONS #
- ###########
- [Demo1Action]
- description = post to NotesSender, post attachment to NotesSender
- run_json_commands = yes
- json_command_key = TE_command_for_demo_1
- append_te_results_to_received = no
- save_json = no
- save_json_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface
- save_json_as = pageloadwaterfalldata.json
- add_attachment_to_post = yes
- attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/pageloadwaterfalldata.json
- 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"]}
- post_to = http://9.27.234.43/BlueWasp/NotesSender, http://9.27.234.43/BlueWasp/SlackSender
- post_attachment_to = http://9.27.234.43/BlueWasp/NotesSender/files, http://9.27.234.43/BlueWasp/SlackSender/files
- [SelfTest1-gettests-Action]
- description = post to NotesSender, post attachment to NotesSender
- run_json_commands = yes
- json_command_key = TE_command_to_get_tests
- append_te_results_to_received = no
- save_json = yes
- save_json_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface
- save_json_as = tests.json
- add_attachment_to_post = yes
- attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/tests.json
- 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"]}
- post_to = http://9.27.234.43/BlueWasp/NotesSender, http://9.27.234.43/BlueWasp/SlackSender
- post_attachment_to = http://9.27.234.43/BlueWasp/NotesSender/files, http://9.27.234.43/BlueWasp/SlackSender/files
- [SelfTest1-getalerts-Action]
- description = post to NotesSender, post attachment to NotesSender
- run_json_commands = yes
- json_command_key = TE_command_to_get_alerts
- append_te_results_to_received = no
- save_json = no
- add_attachment_to_post = yes
- te_api_call = /alerts.json
- attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/alerts.json
- 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":"Alerts", "te_data":""}, "email":"kyung.baek@ibm.com, lingafel@us.ibm.com", "subject-TE":"TE Agent Selftest 1", "files":["alerts.json"]}
- post_to = http://9.27.234.43/BlueWasp/NotesSender, http://9.27.234.43/BlueWasp/SlackSender
- post_attachment_to = http://9.27.234.43/BlueWasp/NotesSender/files, http://9.27.234.43/BlueWasp/SlackSender/files
- [Test1_Action]
- description = posts to notessender, sends Kyung an email with data
- run_json_commands = yes
- json_command_key = TE_command
- #te_api_call = /tests/
- append_te_results_to_received = no
- save_json = no
- add_attachment_to_post = yes
- from_timerange = 2017-07-27T18:05:00
- end_timerange = 2017-07-27T18:05:01
- attachment_path = C:/Users/IBM_ADMIN/Downloads/BlueWasp/TEInterface/pathvis.json
- 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"]}
- post_to = http://9.27.234.43/BlueWasp/NotesSender
- post_attachment_to = http://9.27.234.43/BlueWasp/NotesSender/files
- [Test2_Action]
- description = test pre_event_time
- run_json_commands = yes
- json_command_key = TE_command
- #te_api_call = /web/page-load/357326
- from_timerange = 2017-07-31T18:05:00
- end_timerange = 2017-07-31T18:10:00
- pre_event_time = 30
- append_te_results_to_received = no
- save_json = yes
- save_json_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface
- save_json_as = pageload.json
- add_attachment_to_post = yes
- attachment_path = C:/Users/StevenLingafelt/Documents/BlueWasp/TEInterface/pageload.json
- json_encoding_list = notessender_encoding
- 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"]}
- post_to_list = http://9.27.234.43/BlueWasp/NotesSender
- post_attachment_to_list = http://9.27.234.43/BlueWasp/NotesSender/files
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement