Skip to content

Commit 3176111

Browse files
authored
Merge pull request #731 from Tenebriso/token_error_message
add logging for invalid/expired splunk tokens
2 parents 1e632b0 + 9dcf361 commit 3176111

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hubblestack/hec/obj.py

+3
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ def _send(self, *payload, **kwargs):
427427
possible_queue = True
428428
# If Splunk said it doesn't want this message, increment the opinion counter
429429
meta_data['bad_request'] += 1
430+
elif r.status == 403:
431+
log.error('invalid or expired token (%d %s)', r.status, r.reason)
432+
possible_queue = True
430433

431434
# if we get here and something above thinks a queue is a good idea
432435
# then queue it! \o/

0 commit comments

Comments
 (0)