From 49ca50412a65a29261636bf97427cff10d087d0e Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Wed, 4 Dec 2024 21:58:51 -0500 Subject: [PATCH] Added debugging for ticket generation --- hwmonDaemon.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hwmonDaemon.py b/hwmonDaemon.py index 0ce4ea6..e096da8 100644 --- a/hwmonDaemon.py +++ b/hwmonDaemon.py @@ -101,6 +101,10 @@ class SystemHealthMonitor: "type": issue_type } + # Debug: Log the ticket payload being sent + print("Attempting to create ticket with payload:") + print(json.dumps(ticket_payload, indent=4)) + # Attempt to create the ticket via the API try: response = requests.post( @@ -108,6 +112,11 @@ class SystemHealthMonitor: json=ticket_payload, headers={'Content-Type': 'application/json'} ) + + # Debug: Log the response from the server + print(f"Response status code: {response.status_code}") + print(f"Response body: {response.text}") + if response.status_code in [200, 201]: print(f"Ticket created successfully: {ticket_title}") else: