Writing BetterCloud Audit Logs to a Google Sheet

  • 27 January 2021
  • 1 reply
  • 208 views
Writing BetterCloud Audit Logs to a Google Sheet
Userlevel 5
Badge +2

This guide will walk you through how you can use BetterCloud’s API offering to push your BetterCloud Audit Logs to an external service. In this case, we are using Google Sheets, but this is applicable to any other system you’d like to push your Audit Logs (or other information) out to. We put this guide together based on the following conversation: 

If you have any questions, suggestions, or issues leave a comment below.

 

Google Sheet / Apps Script

  1. Make a copy of this Sheet: https://docs.google.com/spreadsheets/d/1L1cst1jwEmrQms0JvOOrMzFQDJ3yZ_3rhtY_7IfJXrQ/edit#gid=0
  2. Navigate to Tools > Script Editor
  3. Replace the sheetId variable in Line 1 with your Sheet ID
    This will look something like: 1J8w43QDlUj6Lu3sRkFZEdswZYgTfSdsQIwU1xTxCM28
  4. Save the script by clicking the ‘Save project’ floppy disk icon
  5. On the top right of the script, click ‘Deploy’ > New Deployment

  6. Set a Description (ie .. BetterCloud Logs) and set ‘Who has Access’ to ‘Anyone’

     

  7. Click Deploy
  8. Authorize this app to have access to your Google account
  9. Copy the ‘Web App URL’

 

BetterCloud

Note: you will need to have the BetterCloud API in order to access this

  1. Navigate to: Integration Center > Create a Custom Integration
  2. Configure the Integration like so, and click Save:
     

     

  3. In the Extensions section, click  Get Started Send a Push Event > Next
  4. Configure the Push Event like so:
     
  5. In the Test your Push Event section, choose Event Log Written and click Run Test.
  6. Check the Google Sheet and confirm that a test log was written
  7. Click Save on the bottom right 

 


1 reply

Userlevel 1
Badge +2

Quick note for those who might have turned off public link sharing on your domain some time ago, to get the option to allow ‘Anyone’ to access the Web Application you need to change this setting. 

 

'Google Apps>Drive>Settings>Sharing Settings (On and check "Allow users in {your organization} to publish files on the web or make them visible to the world as public or unlisted files.'

 

My recommendation is to just make this change on the account (like a Service Account) that needs to have this setting changed.

Reply