Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Google cloud storage metrics

Published and supported by JSTech


New-Relic plugin to monitor your google cloud storage activity.
A key point to keep backups in sight !
Check to kackup your database on google cloud storage !


  • Total size
  • Total elements
  • Size rate
  • Elements rate
  • Number of new elements within a day
  • Size gained within a day


Google cloud storage

  • Google developper account with cloud storage. See
  • Obviously, a google project with a bucket. For help see
  • Google cloud storage JSON API enabled. See
  • A service account key along with his email address, see


  • Ruby
  • Bundler

For ubuntu and debian install bundler (and also ruby if needed) with :

    $ sudo apt-get install bundler


  • Get the plugin folder and place it where you want
  • Inside the folder run

      $ bundle install

This should install the newrelic and google SDK

  • Fill the config/newrelic_plugin.yml file :
Parameter Description
google_storage_key_path The relative path of your service account key
google_storage_key_secret The secret of your key (default is notasecret)
google_storage_mail The email that goes with your service account key, like
google_storage_project_id The ID of your google Project (the one that contains your bucket)
google_storage_bucket_name The name of your bucket (the one you wish to monitor)
element_offset_alert Used to monitor the number of new elements per day. That value minus the number of new elements will be the value monitored. Like that we know there is a problem when the value is above the expected one.
size_offset_alert Like element_offset_alert but for the size. If you upload less than a gigabyte per day leave the default value
  • And finally, run the script with

      $ ruby /path/to/script/folder/newrelic_gcstorage_agent.rb
  • You can also launch it as a deamon with

      $ ./path/to/.../deamon.rb start


On newrelic, alerts only work when a value is above the expected one. To work with it, you can use Alert/elements and Alert/size. Those values work with the ones in the config file : element_offset_alert and size_offset_alert.
Alert/elements is element_offset_alert minus the number of new elements per day. If your expecting 4 new elements per day and element_offset_alert = 100, you will set your alert threshold to 93. The same for size_offset_alert.


Get the source at, download it as ZIP file and unzip it on your computer.


Licensed under the The MIT License (MIT).


For any support contact me on github. Please report new issues if found.

The Google cloud storage metrics plugin extends the power of New Relic's monitoring capabilities.

Get This Plugin

Already have a New Relic account? Log in and begin using this plugin.

If you don't have a New Relic account, follow these three simple steps:

How To Install A Plugin

Installing a plugin is simple and fast.

a Plugin
  1. Step One

    Sign in to your New Relic account

  2. Step Two

    Select and install plugin

  3. Step Three

    Start seeing data

That’s it. You’re done. Simple.

Sign Up for New Relic

Back to top icon