Project

General

Profile

How to setup app » History » Version 6

« Previous - Version 6/8 (diff) - Next » - Current version
Luke Murphey, 08/09/2016 05:36 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. Go to “API Manager” and enable the "Drive API"

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

drive_api.png View (18.1 KB) Luke Murphey, 01/19/2016 07:17 PM

service_account_key.png View (49.1 KB) Luke Murphey, 01/19/2016 07:20 PM

share_file.png View (20.6 KB) Luke Murphey, 01/19/2016 07:25 PM

setup.png View (42.7 KB) Luke Murphey, 01/21/2016 07:42 PM

select_service_account.png View (28.2 KB) Luke Murphey, 05/07/2017 12:17 AM

new_service_account_dialog.png View (72 KB) Luke Murphey, 05/07/2017 12:17 AM

new_key.png View (43.8 KB) Luke Murphey, 05/07/2017 12:17 AM

create_service_account.png View (90.2 KB) Luke Murphey, 05/07/2017 12:17 AM