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


Description

New-Relic plugin to monitor your google cloud storage activity.
A key point to keep backups in sight !
Check https://github.com/nkcr/Google-Cloud-Storage-Upload to kackup your database on google cloud storage !

Metrics

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

Requirements

Google cloud storage

  • Google developper account with cloud storage. See https://cloud.google.com/products/cloud-storage/
  • Obviously, a google project with a bucket. For help see https://developers.google.com/storage/docs/overview
  • Google cloud storage JSON API enabled. See http://s30.postimg.org/oe8wkrc35/Capture_d_cran_2014_06_16_13_14_25.png
  • A service account key along with his email address, see http://s4.postimg.org/3nsu1labx/Capture_d_cran_2014_06_16_13_25_13.png

Environment

  • Ruby
  • Bundler

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

    $ sudo apt-get install bundler

Installation

  • 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 xxxxxxx-xxxxx@developper.gserviceaccount.com
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
    

Alerts

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.


Source

Get the source at https://github.com/nkcr/Google-Cloud-Storage-Metric, download it as ZIP file and unzip it on your computer.


License

Licensed under the The MIT License (MIT).


Support

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.

Installing
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