Project

General

Profile

How to setup app » History » Version 7

Version 6 (Luke Murphey, 08/09/2016 05:36 AM) → Version 7/8 (Luke Murphey, 05/07/2017 12:18 AM)

h1. How to setup the Google Drive app with a service account key

*1.* Go to the "Google Developers Console":https://console.developers.google.com/project 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"

!drive_api.png!

*3.* Click Go to “IAM “API Manager” and Admin” and select enable the "Service Accounts" "Drive API"

!select_service_account.png!

*4.* Click "Create Service Account" and select "Furnish a new private key" of type "JSON"

!new_service_account_dialog.png!

If you want to use an existing account, create a new key for the existing account. Make sure it is a JSON key.

!new_key.png!
!service_account_key.png!

*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.

!setup.png!

*6.* Share the files in "drive.google.com":http://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.

!share_file.png!

Alternatively, you can manually setup the key via the file-system (see below at the bottom of the page for instructions).

h2. 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:

<pre>
[google_spreadsheet]
disabled = 0
service_account_key_file = myserviceaccountkey-837fa6bc1.json
</pre>

This should result in a file in a location something like this: +/opt/splunk/etc/apps/google_drive/local/inputs.conf+