diff --git a/functions/extensions/wazuh/custom-shuffle.py b/functions/extensions/wazuh/custom-shuffle.py index 92ffa66f..317b2b09 100644 --- a/functions/extensions/wazuh/custom-shuffle.py +++ b/functions/extensions/wazuh/custom-shuffle.py @@ -23,7 +23,6 @@ except Exception as e: # # Global vars - debug_enabled = True pwd = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) json_alert = {} @@ -32,6 +31,12 @@ now = time.strftime("%a %b %d %H:%M:%S %Z %Y") # Set paths log_file = 'integrations.log' +try: + with open("/tmp/shuffle_start.txt", "w+") as tmp: + tmp.write("Script started") +except: + pass + def main(args): debug("# Starting") @@ -68,6 +73,14 @@ def main(args): debug(msg) debug("# Sending message") + + try: + with open("/tmp/shuffle_end.txt", "w+") as tmp: + tmp.write("Script done pre-msg sending") + except: + pass + + send_msg(msg, webhook)