LukeMurphey / splunk-google-drive

A Splunk app designed to import and export data to/from Google Drive
Apache License 2.0
5 stars 3 forks source link

Spreadsheet import not working, throws generic exception #4

Open JensLederer opened 1 year ago

JensLederer commented 1 year ago

I try to set up a SpreadSheet import, but this ends in an exception thrown by google_spreadsheet.py:

image

2023-08-17 10:58:59,604 ERROR A general exception was thrown when executing the import
Traceback (most recent call last):
  File "/opt/splunk/etc/apps/google_drive/bin/google_spreadsheet.py", line 213, in import_file
    google_lookup_sync = GoogleLookupSync.from_service_key_file(key_file, logger=self.logger)
  File "/opt/splunk/etc/apps/google_drive/bin/google_drive_app/__init__.py", line 91, in from_service_key_file
    return GoogleLookupSync(key_file=key_file, logger=logger)
  File "/opt/splunk/etc/apps/google_drive/bin/google_drive_app/__init__.py", line 79, in __init__
    raise ValueError("Gspread client was not constructed")
ValueError: Gspread client was not constructed

Unfortunately no more details are available.

I've configured the input and the service account key file manually.

Key file: image

inputs.conf:

[google_spreadsheet]
disabled = 0
service_account_key_file = XXXXXX-splunkimporter-prod-XXXXXXXXXXX.json

[google_spreadsheet://SplunkAzureCloud_Thresholds]
interval = 1m
lookup_name = thresholds_google.csv
operation = import
spreadsheet = SplunkAzureCloud_Thresholds
worksheet = Thresholds
disabled = 0

I also tried to set the service account key file in stanza [google_spreadsheet://SplunkAzureCloud_Thresholds]

JensLederer commented 1 year ago

Found another log message, that might be related to this issue:

127.0.0.1 - splunk-system-user [17/Aug/2023:11:59:59.088 +0200] "GET /services/storage/passwords/google_service_key%3AGOOGLE_DRIVE_APP%3A?output_mode=json&count=0 HTTP/1.0" 404 102 "-" "Python-httplib2/0.20.4 (gzip)" - - - 0ms

image