Host Template: Cloud - GCP - Storage
Overview Copied
Monitor your GCP Cloud Storage Buckets. Service Checks include API requests, Network Bytes and Bucket statistics (Object count, Total Bytes and Byte Seconds).
This Host Template includes the following Service Checks:
Service Check Name | Description | Default Thresholds (Metric: Warning, Critical) | UOM |
---|---|---|---|
GCP - Storage - Network Bytes | Bytes received and sent by the bucket. | N/A | B |
GCP - Storage - API Requests | Number of API requests to the bucket. | N/A | N/A |
GCP - Storage - Bucket Object Count | Total number of objects in the bucket. This value is measured once per day by Stackdriver, so changes will take 24hrs to appear. | N/A | N/A |
GCP - Storage - Bucket Bytes | Total bytes in the bucket. This value is measured once per day by Stackdriver, so changes will take 24hrs to appear. | N/A | B |
GCP - Storage - Bucket Byte Seconds | Total daily storage used by the bucket in byte-seconds. This value is measured once per day by Stackdriver, so changes will take 24hrs to appear. | N/A | Bs |
Note
See details about Monitoring Plugin thresholds here.
Usage Instructions Copied
Please review the overall Cloud - GCP Opspack documentation for details on prerequisites, known issues, and other necessary configurations that apply to all Host Templates in the Opspack.
Add this Host Template Copied
Add the Cloud - GCP - Storage Host Template to your Opsview Monitor host. If the resource you’re monitoring has no hostname or public IP, then open the Advanced settings pane and change Host Check Command to Always assumed to be UP.
Note
For more information, refer to the documentation on Adding Host Templates to Hosts.
Add and configure Variables Copied
The Service Checks in this Host Template use the following variables, and they will be added to your Opsview Monitor instance alongside the Host Template:
Note
For more information, refer to the documentation on Adding Variables to Hosts.
Apply Changes Copied
Apply Changes and the system will now be monitored:
Additional Information Copied
NOTE: The service account used must have storage.buckets.get
access to your bucket.
Available Variables Copied
GCP_PROJECT_ID Copied
Plugin Parameter | Position in Variable | Name | Description |
---|---|---|---|
--project-id |
Arg1 | Monitored Project ID | ID of the project to monitor |
GCP_BUCKET_NAME Copied
Plugin Parameter | Position in Variable | Name | Description |
---|---|---|---|
--bucket-name |
Arg1 | Bucket Name | Name of the bucket |
GCP_CREDENTIALS_FILE Copied
This argument is optional, to be used if you have a credentials file in a custom location. We recommend not setting it, and relying on the default location as follows: Create yourOpsview Cloud
For Opsview Cloud customers, please contact ITRS Support for assistance with these steps, as they require Orchestrator access.
credentials.json
file and run as opsview user /opt/opsview/orchestrator/bin/orchestratorimportscripts etc-plugins cloud-gcp /path/to/credentials.json
followed by an Apply Changes to set it up with the correct permissions in the default location (/opt/opsview/monitoringscripts/etc/plugins/cloud-gcp/credentials.json
) on all Opsview collectors.
Note
For more information on the credentials file, refer to Create access credentials
Plugin Parameter | Position in Variable | Name | Description |
---|---|---|---|
--credentials-file |
Arg1 | Credentials File | Path of the JSON file with GCP Service Account Credentials |
Plugin help Copied
Plugin: check_gcp
For mode-specific help, run the plugin with the -h -m <mode>
flags. This will list the required and optional Variable Arguments for that mode.
The appropriate mode for each Service Check is listed here:
Service Check Name | Mode |
---|---|
GCP - Storage - Network Bytes | GCP.Storage.Net.Bytes |
GCP - Storage - API Requests | GCP.Storage.API.Requests |
GCP - Storage - Bucket Object Count | GCP.Storage.Object.Count |
GCP - Storage - Bucket Bytes | GCP.Storage.Bytes |
GCP - Storage - Bucket Byte Seconds | GCP.Storage.Byte.Seconds |