How to setup app » History » Version 7
« Previous -
Version 7/8
(diff) -
Next » -
Current version
Luke Murphey, 05/07/2017 12:18 AM
How to setup the Google Drive app with a service account key¶
1. Go to the Google Developers Console and create a new project or select an existing one. Click the project to edit the settings for that project.
2. Go to “API Manager” and enable the "Drive API"
3. Click to “IAM and Admin” and select the "Service Accounts"
4. Click "Create Service Account" and select "Furnish a new private key" of type "JSON"
If you want to use an existing account, create a new key for the existing account. Make sure it is a JSON key.
4. Complete the form and press create. Your browser will download a JSON file.
5. Upload the file to the Google Drive app by clicking "Set up" from within the list of apps of Splunk Manager.
6. Share the files in drive.google.com that you want the Google Drive app to read or edit with the email address specified in the service account. You can do this on a per-file basis or you can share an entire directory to avoid setting individual files.
Alternatively, you can manually setup the key via the file-system (see below at the bottom of the page for instructions).
Manually configuring the key via file-system¶
1. Upload your service account key to the following path: $SPLUNK_HOME/etc/apps/google_drive/service_account_keys. You will have to create the "service_account_keys" directory if it doesn't exist.
This should result in a file in a location something like this: /opt/splunk/etc/apps/google_drive/service_account_keys/myserviceaccountkey-837fa6bc1.json
2. Create configuration telling the app to use your key
Go to your Splunk install and open the following path: $SPLUNK_HOME/etc/apps/google_drive/local/inputs.conf. You may have to create the "local" directory if it doesn't exist.
Populate this file with the following, substituting your service account key file accordingly:
[google_spreadsheet] disabled = 0 service_account_key_file = myserviceaccountkey-837fa6bc1.json
This should result in a file in a location something like this: /opt/splunk/etc/apps/google_drive/local/inputs.conf