Skip to main content

Google Storage

Monitoring Connector Assets​

Monitored Objects​

The Monitoring Connector Google Storage collects metrics for:

  • Bucket

Discovery rules​

The Centreon Monitoring Connector Google Storage includes a Host Discovery provider to automatically discover storages for a given Google Cloud Project.

This provider is named Google Storage:


Note that the key file must be deployed on the Poller(s) expected to discover GCP assets.

More information about the Host Discovery module is available in the Centreon documentation: Host Discovery

Collected Metrics​

For all collected metrics, we can choose the aggregation: average, minimum, maximum and total.

Metric nameDescriptionUnit
bucket_name~aggregation#storage.bucket.objects.countNumber of objects of bytes received over the networkB of bytes received per second over the networkB/s of bytes sent over the networkB of bytes sent per second over the networkB/s


Google Cloud Configuration​

Configure a service account key (download its private key as a JSON file) for which the following privileges have to be granted:

Google ScopeDescription and manage your data across Google Cloud Platform services

How to create a service account key:


Deploy the key file on every Poller expected to monitor Google Cloud resources. The key file should be readable by centreon-engine poller.


  1. Install the Centreon Plugin on every Poller:
yum install centreon-plugin-Cloud-Gcp-Storage-Api
  1. On the Centreon Web interface in Configuration > Monitoring Connector Manager, install the Google Storage Monitoring Connector

Host configuration​

  • Add a new Host and apply the Cloud-Gcp-Storage-custom Host Template

Once the template applied, some Macros have to be configured:

XGCPKEYFILEPATHService account key json file
XGCPDIMENSIONNAMEThe name of the dimension to filter on. Default: resource.labels.bucket_name
XGCPDIMENSIONOPERATORDefine the type of filter match to use. Default: equals
XGCPDIMENSIONVALUEName of the bucket you want to monitor.
PROXYURLConfigure proxy URL
GCPEXTRAOPTIONSAny extra option you may want to add to every command_line (eg. a --verbose flag)
DUMMYSTATUSHost state. Default is OK, do not modify it until you know what you are doing
DUMMYOUTPUTHost check output. Default is 'This is a dummy check'. Customize it with your own if needed

Service account key file must be stored on Centreon Poller. centreon-engine user account must have read privileges on that file.


How to test the Plugin and what are the main options for?​

Once the plugin installed, log into your Centreon Poller CLI using the centreon-engine user account and test the Plugin by running the following command:

/usr/lib/centreon/plugins/ \
--plugin=cloud::google::gcp::storage::plugin \
--mode=bucket \
--key-file=/var/lib/centreon-engine/centreon-dev-6e5531fc9e82.json \
--dimension-name='resource.labels.bucket_name' \
--dimension-operator='equals' \
--dimension-value='' \
--aggregation='average' \
--warning-bucket-objects='1000' \
--critical-bucket-objects='2000' \

Expected command output is shown below:

OK: Instance '' aggregation 'average' metrics objects: 0.00, received: 0.00 B, sent: 382.00 B | ''=0.00;0:1000;0:2000;0; ''=0.00B;;;0; ''=382.00B;;;0;
Checking ''
aggregation 'average' metrics objects: 0.00, received: 0.00 B, sent: 382.00 B

The command above monitors bucket usage of a Google Storage (--plugin=cloud::google::gcp::storage::plugin --mode=bucket) identified by the name (--dimension-name='resource.labels.bucket_name' --dimension-operator='equals' --dimension-value='').

This command would trigger a WARNING alarm if number of objects is more than 1000 (--warning-bucket-objects='1000') and a CRITICAL alarm for more than 2000 (--critical-bucket-objects='2000').

All the options as well as all the available thresholds can be displayed by adding the --help parameter to the command:

/usr/lib/centreon/plugins/ \
--plugin=cloud::google::gcp::storage::plugin \
--mode=bucket \

Why do I get the following result UNKNOWN: No metrics. Check your options or use --zeroed option to set 0 on undefined values ?​

This command result means that Google Cloud does not have any value for the requested period.

This result can be overriden by adding the --zeroed option in the command. This will force a value of 0 when no metric has been collected and will prevent the UNKNOWN error message.