Available solutions
GCP by HTTP
Overview
This template is designed to monitor GCP by HTTP. It works without any external scripts and uses the script item. Currently, the template supports the discovery of Compute Engine instances, Cloud SQL instances (Microsoft SQL Server, MySQL, and PostgreSQL, including replicas), Cloud Run services, Application Load Balancers, Cost Monitoring, and Cloud Storage resources.
Included Monitoring Templates
- GCP Application Load Balancer by HTTP
- GCP Cost Monitoring by HTTP
- GCP Compute Engine Instance by HTTP
- GCP Cloud SQL MSSQL by HTTP
- GCP Cloud SQL MSSQL Replica by HTTP
- GCP Cloud SQL MySQL by HTTP
- GCP Cloud SQL MySQL Replica by HTTP
- GCP Cloud SQL PostgreSQL by HTTP
- GCP Cloud SQL PostgreSQL Replica by HTTP
- GCP Cloud Run Service by HTTP
- GCP Cloud Storage Bucket by HTTP
The template additionally supports the collection of Compute Engine project quota metrics.
Requirements
Zabbix version: 8.0 and higher.
Tested versions
This template has been tested on:
- Google Cloud Platform
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable the Stackdriver Monitoring API for the GCP project you wish to monitor.
More on enabling Monitoring API.
- Create a service account in Google Cloud Console for the same GCP project.
More on managing service accounts.
- Create and download the service account key in JSON format.
More on service account keys.
- If you want to monitor Cloud SQL services - don't forget to activate the Cloud SQL Admin API.
More on Cloud SQL Admin API.
- For monitoring Cloud Run services - activate the Cloud Run Admin API.
More on Cloud Run APIs.
- Copy the
project_id,private_key_id,private_key,client_emailfrom the JSON key file and add them to their corresponding macros{$GCP.PROJECT.ID},{$GCP.PRIVATE.KEY.ID},{$GCP.PRIVATE.KEY},{$GCP.CLIENT.EMAIL}on the Zabbix template/host.
Notes
- Make sure that you're creating the Google Cloud Console service account using the credentials with the Project Owner/Project IAM Admin/Service Account Admin role.
- The service account JSON key file can only be downloaded **once**: regenerate it if the previous key has been lost.
- The service account should have Project Viewer permissions or granular permissions for the GCP Compute Engine API/GCP Cloud SQL/Cloud Run Viewer.
- You can copy and paste `private_key` string data from the Service Account JSON key file as is, or replace the new line metasymbol (`\n`) with actual line breaks.
Refer to the vendor documentation on managing access to service accounts.
IMPORTANT
- The Zabbix secret authorization token (used for GCP API authentication) is defined as a plain text in host prototype settings by default due to template export/import limitations. It is highly recommended to change the user macro `{$GCP.AUTH.TOKEN}` value type to `SECRET` for all host prototypes after importing the *GCP by HTTP* template.
- All the discovered instances/quotas/metrics are related to a particular GCP project. To monitor several GCP projects, create their corresponding service accounts and Zabbix hosts.
- The GCP Access Token is available for 1 hour (3600 seconds) after the generation request.
- To avoid GCP token inconsistencies between the Zabbix database and Zabbix server configuration cache, do not set the Zabbix server configuration parameter `CacheUpdateFrequency` above 45 minutes, and do not set the GCP authorization item update interval above 1 hour (the maximum `CacheUpdateFrequency` value).
More on metrics and used API methods:
Macros used
| Name | Description | Default |
|---|---|---|
| {$GCP.PROJECT.ID} | GCP project ID. |
|
| {$GCP.CLIENT.EMAIL} | Service account client e-mail. |
|
| {$GCP.PRIVATE.KEY.ID} | Service account private key id. |
|
| {$GCP.PRIVATE.KEY} | Service account private key data. |
|
| {$GCP.AUTH.FREQUENCY} | The update interval for the GCP Authorization item, which also equals to the access token regeneration request frequency. Check the template documentation notes carefully for more details. |
45m |
| {$GCP.RUN.LOCATION.FILTER} | Cloud Run Service filter locations. If empty - all locations are monitored. The value must be a string. The operator must be either Example: |
|
| {$GCP.GCE.QUOTA.PUSED.MIN.WARN} | GCP Compute Engine project quota warning utilization threshold. |
80 |
| {$GCP.GCE.QUOTA.PUSED.MIN.CRIT} | GCP Compute Engine project quota critical quota utilization threshold. |
95 |
| {$GCP.DATA.TIMEOUT} | Response timeout for API. |
15s |
| {$GCP.PROXY} | Sets HTTP proxy value. If this macro is empty, then no proxy is used. |
|
| {$HTTP.TLS.VERIFY} | TLS certificate verification for script items and JavaScript preprocessing: "none" - disabled, "peer" - verify the certificate chain and expiration, "full" - full verification. Any other value enables full verification. To override the setting for this template only, define the macro with the context "GCP", e.g. {$HTTP.TLS.VERIFY:"GCP"}. |
full |
| {$GCP.GCE.INST.NAME.MATCHES} | The filter to include GCP Compute Engine instances by namespace. |
.* |
| {$GCP.GCE.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.ZONE.MATCHES} | The filter to include GCP Compute Engine instances by zone. |
.* |
| {$GCP.GCE.ZONE.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by namespace. |
.* |
| {$GCP.MYSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by zone. |
.* |
| {$GCP.MYSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by type (standalone/replica). |
.* |
| {$GCP.MYSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by namespace. |
.* |
| {$GCP.PGSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by zone. |
.* |
| {$GCP.PGSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by type (standalone/replica). |
.* |
| {$GCP.PGSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by namespace. |
.* |
| {$GCP.MSSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by zone. |
.* |
| {$GCP.MSSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by type (standalone/replica). |
.* |
| {$GCP.MSSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.QUOTA.MATCHES} | The filter to include GCP Compute Engine project quotas by namespace. |
.* |
| {$GCP.GCE.QUOTA.NOT_MATCHES} | The filter to exclude GCP Compute Engine project quotas by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.CLOUD.RUN.SERVICE.NAME.MATCHES} | The filter to include GCP Cloud Run services by name. |
.* |
| {$GCP.CLOUD.RUN.SERVICE.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud Run services by name. |
CHANGE_IF_NEEDED |
| {$GCP.CLOUD.RUN.SERVICE.CONDITION.MATCHES} | The filter to include GCP Cloud Run services by condition. |
.* |
| {$GCP.CLOUD.RUN.SERVICE.CONDITION.NOT_MATCHES} | The filter to exclude GCP Cloud Run services by condition. |
CHANGE_IF_NEEDED |
| {$GCP.BUCKET.NAME.MATCHES} | The filter to include GCP Cloud Storage buckets by name. |
.* |
| {$GCP.BUCKET.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud Storage buckets by name. |
CHANGE_IF_NEEDED |
| {$GCP.LB.NAME.MATCHES} | The filter to include load balancers by name. |
.* |
| {$GCP.LB.NAME.NOT_MATCHES} | The filter to exclude load balancers by name. |
CHANGE_IF_NEEDED |
| {$GCP.LB.SCHEME.MATCHES} | The filter to include load balancers by scheme. |
.* |
| {$GCP.LB.SCHEME.NOT_MATCHES} | The filter to exclude load balancers by scheme. |
CHANGE_IF_NEEDED |
| {$GCP.LB.PROTOCOL.MATCHES} | The filter to include load balancers by protocol. |
.* |
| {$GCP.LB.PROTOCOL.NOT_MATCHES} | The filter to exclude load balancers by protocol. |
CHANGE_IF_NEEDED |
| {$GCP.LB.SCOPE.MATCHES} | The filter to include load balancers by scope. |
.* |
| {$GCP.LB.SCOPE.NOT_MATCHES} | The filter to exclude load balancers by scope. |
CHANGE_IF_NEEDED |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Authorization | Google Cloud Platform REST authorization with service account authentication parameters and temporary-generated RSA-based JWT-token usage. The necessary scopes are pre-defined. Returns a signed authorization token with 1 hour lifetime; it is required only once, and is used for all the dependent script items. Check the template documentation for the details. |
Script | gcp.authorization |
| GCE instances get | Get GCP Compute Engine instances. |
Dependent item | gcp.gce.instances.get Preprocessing
|
| Cloud Run service get | Get GCP Cloud Run services. |
Dependent item | gcp.run.services.get Preprocessing
|
| Authorization errors check | A list of errors from API requests. |
Dependent item | gcp.auth.err.check Preprocessing
|
| Cloud SQL instances get | GCP Cloud SQL: Instances get. |
Dependent item | gcp.cloudsql.instances.get Preprocessing
|
| Cloud SQL instances total | GCP Cloud SQL instances total count. |
Dependent item | gcp.cloudsql.instances.total Preprocessing
|
| MSSQL instances count | GCP Cloud SQL MSSQL instances count. |
Dependent item | gcp.cloudsql.instances.mssql_count Preprocessing
|
| MySQL instances count | GCP Cloud SQL MySQL instances count. |
Dependent item | gcp.cloudsql.instances.mysql_count Preprocessing
|
| PostgreSQL instances count | GCP Cloud SQL PostgreSQL instances count. |
Dependent item | gcp.cloudsql.instances.pgsql_count Preprocessing
|
| GCE instances total | GCP Compute Engine instances total count. |
Dependent item | gcp.gce.instances.total Preprocessing
|
| Regular GCE instances count | GCP Compute Engine: Regular instances count. |
Dependent item | gcp.gce.instances.regular_count Preprocessing
|
| Container-optimized GCE instances count | GCP Compute Engine: count of instances with Container-Optimized OS used. |
Dependent item | gcp.gce.instances.cos_count Preprocessing
|
| Project quotas get | GCP Compute Engine resource quotas available for the particular project. |
Dependent item | gcp.gce.quotas.get Preprocessing
|
| Cloud Run service total | GCP Cloud Run services total count. |
Dependent item | gcp.run.service.total Preprocessing
|
| Cloud Storage buckets get | GCP Cloud Storage: Buckets get. |
Dependent item | gcp.storage.buckets.get Preprocessing
|
| Cloud Storage buckets total | GCP Cloud Storage buckets total count. |
Dependent item | gcp.storage.buckets.total Preprocessing
|
| Load balancers (forwarding rules) get | GCP Application Load Balancing forwarding rules. |
Dependent item | gcp.lb.forwarding_rules.get Preprocessing
|
| Global load balancers total | GCP Application Load Balancing global forwarding rules total count. |
Dependent item | gcp.lb.forwarding_rules.global.total Preprocessing
|
| Regional load balancers total | GCP Application Load Balancing regional forwarding rules total count. |
Dependent item | gcp.lb.forwarding_rules.regional.total Preprocessing
|
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP: Authorization has failed | GCP: Authorization has failed. |
length(last(/GCP by HTTP/gcp.auth.err.check)) > 0 |
Average |
LLD rule GCP Compute Engine: Instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Instances discovery | GCP Compute Engine: Instances discovery. |
Dependent item | gcp.gce.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: PostgreSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: PostgreSQL instances discovery | GCP Cloud SQL: PostgreSQL instances discovery. |
Dependent item | gcp.cloudsql.pgsql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MSSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MSSQL instances discovery | GCP Cloud SQL: MSSQL instances discovery. |
Dependent item | gcp.cloudsql.mssql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MySQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MySQL instances discovery | GCP Cloud SQL: MySQL instances discovery. |
Dependent item | gcp.cloudsql.mysql.inst.discovery Preprocessing
|
LLD rule GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Project quotas discovery | GCP Compute Engine: Quotas discovery. |
Dependent item | gcp.gce.quotas.discovery Preprocessing
|
Item prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quota [{#GCE.QUOTA.NAME}]: Raw data | GCP Compute Engine: Get metrics for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.single.raw[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Usage | GCP Compute Engine: The current usage value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.usage[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Limit | GCP Compute Engine: The current limit value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.limit[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Percentage used | GCP Compute Engine: Percentage usage for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.pused[{#GCE.QUOTA.NAME}] Preprocessing
|
Trigger prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP: Quota [{#GCE.QUOTA.NAME}] limit has been changed | GCP Compute Engine: The limit for the |
change(/GCP by HTTP/gcp.gce.quota.limit[{#GCE.QUOTA.NAME}]) <> 0 |
Info | Manual close: Yes |
| GCP: Quota [{#GCE.QUOTA.NAME}] usage is close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.WARN:"{#GCE.QUOTA.NAME}"} |
Warning | Manual close: Yes Depends on:
|
| GCP: Quota [{#GCE.QUOTA.NAME}] usage is critically close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.CRIT:"{#GCE.QUOTA.NAME}"} |
Average | Manual close: Yes |
LLD rule GCP Cloud Run: Service discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud Run: Service discovery | GCP Cloud Run services discovery. |
Dependent item | gcp.run.service.discovery Preprocessing
|
LLD rule GCP Cloud Storage: Buckets discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud Storage: Buckets discovery | GCP Cloud Storage: Buckets discovery. |
Dependent item | gcp.storage.buckets.discovery Preprocessing
|
LLD rule GCP Application Load Balancing: Load balancer discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Application Load Balancing: Load balancer discovery | Discovers GCP forwarding rules representing Load Balancers using the Compute Engine aggregated forwardingRules API. The discovery automatically creates monitored hosts for: - Global external Application Load Balancers - Regional external Application Load Balancers - Internal Application Load Balancers It also supports discovery of Network Load Balancers. |
Dependent item | gcp.lb.discovery Preprocessing
|
GCP Security by HTTP
Overview
This template monitors the security and compliance posture of a Google Cloud Platform (GCP) project. It works without any external scripts and uses the script items.
Six master items collect data from independent Google Cloud APIs, so that a service that is disabled, unavailable, or not licensed on a given project degrades on its own without affecting the rest of the template:
- Cloud Logging - Admin Activity audit log: IAM changes, service account and key lifecycle, firewall and organization policy changes.
- Cloud Asset Inventory and IAM - publicly accessible resources, principals able to escalate privileges, service account key age.
- Cloud Security Compliance (Compliance Manager) - framework compliance and failing controls.
- Security Command Center - active findings by severity, and the number of registered detectors.
- Compute Engine - load balancer SSL certificate expiry.
- Cloud Monitoring - log entry rate by severity, as a coarse anomaly counter.
A metric that could not be collected is left absent rather than reported as zero, so a failure is never mistaken for a clean result.
Requirements
Zabbix version: 8.0 and higher.
Tested versions
This template has been tested on:
- Google Cloud Platform
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
-
Create a service account in the GCP project you want to monitor. More on managing service accounts.
-
Grant the service account the following roles on the project:
roles/logging.viewer,roles/cloudasset.viewer,roles/iam.securityReviewer,roles/cloudsecuritycompliance.viewer,roles/securitycenter.findingsViewer,roles/compute.viewer,roles/monitoring.viewer -
Enable the APIs used by the template:
gcloud services enable logging.googleapis.com cloudasset.googleapis.com iam.googleapis.com cloudsecuritycompliance.googleapis.com securitycenter.googleapis.com compute.googleapis.com monitoring.googleapis.com --project=<project_id>
(If any of the APIs are not enabled, some metrics will be absent.)
4. Create and download a JSON key for the service account.
More on service account keys.
5. Link this template to a Zabbix host.
6. Configure the macros: {$GCP.PROJECT.ID}, {$GCP.CLIENT.EMAIL}, {$GCP.PRIVATE.KEY.ID}, {$GCP.PRIVATE.KEY}.
Notes
- If this template is co-hosted with
GCP by HTTP, the authorization macros are shared - configure them once at the host level. - All data is refreshed when the authorization item runs, so
{$GCP.AUTH.FREQUENCY}also controls how often security metrics are collected. Keep{$GCP.SECURITY.AUDIT.WINDOW}longer than{$GCP.AUTH.FREQUENCY}so that no audit event falls between two collections. roles/cloudsecuritycompliance.vieweris not included in Project Viewer and must be granted explicitly.- Security Command Center detectors are tier-dependent. On a project with no detectors registered, the findings
count is legitimately zero; the
No security detectors registeredtrigger exists so that this is not read as a clean result. - Collection runs in JavaScript preprocessing, which Zabbix limits to 10 seconds per script.
{$GCP.SECURITY.BUDGET}is the share of that used to start new requests; the rest is headroom for the request still in flight, whose duration is governed by theTimeoutparameter inzabbix_server.confand cannot be set from the template. Keep{$GCP.SECURITY.BUDGET}at or below10 - Timeout. A project large enough to exhaust the budget reports it through the truncation items rather than failing, and the metrics derived from the incomplete data are withheld. - Data Access audit logs are disabled by default in GCP. Only Admin Activity logs, which cannot be disabled, are required by this template.
See references to the APIs used by the template below:
Macros used
| Name | Description | Default |
|---|---|---|
| {$GCP.PROJECT.ID} | GCP project ID. |
|
| {$GCP.CLIENT.EMAIL} | Service account client e-mail. |
|
| {$GCP.PRIVATE.KEY.ID} | Service account private key ID. |
|
| {$GCP.PRIVATE.KEY} | Service account private key data. |
|
| {$GCP.AUTH.FREQUENCY} | The update interval for the GCP Cost Authorization item, which also equals to the access token regeneration request frequency. The GCP Access Token is available for 1 hour (3600 seconds) after the generation request. |
45m |
| {$GCP.SECURITY.NODATA.TIMEOUT} | The period without data after which the "No security data received" trigger fires. Items are collected when the authorization token is refreshed, and an unchanged value is stored only once per heartbeat hour, so the gap between two stored values reaches {$GCP.AUTH.FREQUENCY} plus one hour. Keep this macro above that sum or the trigger will fire between two collections. |
3h |
| {$GCP.SECURITY.AUDIT.WINDOW} | The period (in minutes) of Admin Activity audit log history examined on every collection. Keep it longer than {$GCP.AUTH.FREQUENCY} so that no event falls between two collections. |
60 |
| {$GCP.SECURITY.PRINCIPAL.MATCHES} | Filter to include audit log events by the principal that performed them. The pattern is read by a JavaScript preprocessing step, so a backslash cannot be used: write a character class such as [.] instead of an escape such as . A pattern containing an unsupported character is ignored, and every principal is then included. |
.* |
| {$GCP.SECURITY.PRINCIPAL.NOT_MATCHES} | Filter to exclude audit log events by the principal that performed them. The pattern is read by a JavaScript preprocessing step, so a backslash cannot be used: write a character class such as [.] instead of an escape such as . A pattern containing an unsupported character is ignored, and no principal is then excluded. |
CHANGE_IF_NEEDED |
| {$GCP.SECURITY.PRIVILEGED.ROLE.MATCHES} | Regex matching the role names considered privileged when an IAM binding is added. The pattern is read by a JavaScript preprocessing step, so a backslash cannot be used: write a character class such as [.] instead of an escape such as . A pattern containing an unsupported character falls back to the default. |
owner|editor|admin |
| {$GCP.SECURITY.CERT.SELF_MANAGED.ONLY} | Set to 1 to consider only self-managed certificates when reporting the closest expiry. |
0 |
| {$GCP.SECURITY.BUDGET} | The number of seconds a master item may spend starting new API requests. JavaScript preprocessing has a 10 second execution limit, and a request already in flight cannot be shortened from the script, so this must stay below that limit by at least the Zabbix server Timeout parameter. With the default server Timeout of 3 seconds, 7 is the highest safe value. |
7 |
| {$GCP.SECURITY.PAGES.MAX} | The maximum number of API result pages retrieved per request. Raising it collects more data per item, but every collection has a fixed time budget: once the budget runs out, paging stops and the affected item reports the truncation in its errors item. |
5 |
| {$GCP.SECURITY.SA.KEY.LOOKBACK} | The period the key age trigger looks back over. On a project with more than {$GCP.SECURITY.SA.MAX} service accounts the accounts are checked in rotating slices, so a stale key is seen in only one slice per cycle. This must be long enough to cover a full rotation. |
25h |
| {$GCP.SECURITY.SA.MAX} | The maximum number of service accounts checked for user-managed key age. Checking a service account costs one request, so a project with many of them can exhaust the collection time budget; the remaining accounts are then reported in the errors item instead of being checked. |
50 |
| {$GCP.SECURITY.KEY.AGE.MAX} | The age at which a user-managed service account key is considered stale. |
90d |
| {$GCP.SECURITY.CERT.WARN} | Warning threshold for the time left before the closest SSL certificate expiry. |
30d |
| {$GCP.SECURITY.CERT.CRIT} | Critical threshold for the time left before the closest SSL certificate expiry. |
7d |
| {$GCP.SECURITY.CALLER.IPS.MAX} | The number of distinct source addresses expected to perform administrative changes. |
2 |
| {$GCP.SECURITY.FIREWALL.MAX} | The number of firewall rule changes tolerated during one collection window. |
0 |
| {$GCP.SECURITY.IAM.CHANGES.MAX} | The number of IAM policy changes tolerated during one collection window. |
5 |
| {$GCP.SECURITY.FINDING.AGE.MAX} | The period after which a still-active security finding is considered to be going unremediated. |
90d |
| {$GCP.SECURITY.DELEGATED.MAX} | The number of impersonated (delegated) configuration changes tolerated during one collection window. |
0 |
| {$GCP.SECURITY.SCC.HIGH.MAX} | The number of active high severity Security Command Center findings tolerated. |
0 |
| {$GCP.SECURITY.SCC.MEDIUM.MAX} | The number of active medium severity Security Command Center findings tolerated. |
10 |
| {$GCP.SECURITY.COMPLIANCE.FAILED.MAX} | The number of failing compliance controls tolerated. |
0 |
| {$GCP.DATA.TIMEOUT} | Response timeout for API. |
15s |
| {$GCP.PROXY} | Sets HTTP proxy value. If this macro is empty, then no proxy is used. |
|
| {$HTTP.TLS.VERIFY} | TLS certificate verification for script items and JavaScript preprocessing: "none" - disabled, "peer" - verify the certificate chain and expiration, "full" - full verification. Any other value enables full verification. To override the setting for this template only, define the macro with the context "GCP Security", e.g. {$HTTP.TLS.VERIFY:"GCP Security"}. |
full |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Authorization | Google Cloud Platform REST authorization with service account authentication parameters and temporary-generated RSA-based JWT-token usage. The necessary scopes are pre-defined. Returns a signed authorization token with 1 hour lifetime; it is required only once, and is used for all the dependent script items. Check the template documentation for the details. |
Script | gcp.security.authorization |
| Authorization errors check | A list of errors from authorization requests. |
Dependent item | gcp.security.auth.err.check Preprocessing
|
| Get audit events | Collects the Admin Activity audit log for the period defined in {$GCP.SECURITY.AUDIT.WINDOW}. Every entry in the Admin Activity log is a configuration change, so the whole log is collected and classified. |
Dependent item | gcp.security.get.audit.events Preprocessing
|
| Get audit events truncation | Reports a Cloud Logging collection that returned only part of its data. The metrics derived from it are withheld while this is set, so they are absent rather than understated. |
Dependent item | gcp.security.get.audit.events.truncated Preprocessing
|
| Get audit events errors | A list of errors from the Cloud Logging API requests. |
Dependent item | gcp.security.get.audit.events.errors Preprocessing
|
| Audit: Total events | The total number of configuration changes recorded in the Admin Activity audit log during the collection window. |
Dependent item | gcp.security.audit.events.total Preprocessing
|
| Audit: Collected pages | The number of audit log pages retrieved during the last collection. |
Dependent item | gcp.security.audit.pages Preprocessing
|
| Audit: IAM policy changes | The number of SetIamPolicy calls (IAM permission grants and revocations). |
Dependent item | gcp.security.iam.changes Preprocessing
|
| Audit: Privileged role grants | The number of IAM bindings added for a role matching {$GCP.SECURITY.PRIVILEGED.ROLE.MATCHES} during the collection window. A principal granted such a role can usually escalate its own permissions further. Only Resource Manager reports the binding delta in the audit log, so this covers grants made on the project itself, not those made on an individual resource. |
Dependent item | gcp.security.privileged.grants Preprocessing
|
| Audit: Service accounts created | The number of service accounts created during the collection window. |
Dependent item | gcp.security.sa.created Preprocessing
|
| Audit: Service accounts deleted | The number of service accounts deleted during the collection window. |
Dependent item | gcp.security.sa.deleted Preprocessing
|
| Audit: Service account keys created | The number of user-managed service account keys created during the collection window. |
Dependent item | gcp.security.sa.keys.created Preprocessing
|
| Audit: Firewall rule changes | The number of firewall rule changes during the collection window. |
Dependent item | gcp.security.firewall.changes Preprocessing
|
| Audit: Organization policy changes | The number of organization policy changes during the collection window. |
Dependent item | gcp.security.orgpolicy.changes Preprocessing
|
| Audit: Administrative source addresses | The number of distinct source addresses that performed configuration changes during the collection window. |
Dependent item | gcp.security.caller.ips Preprocessing
|
| Audit: Active principals | The number of distinct principals that performed configuration changes during the collection window. |
Dependent item | gcp.security.principals.active Preprocessing
|
| Audit: Services changed | The number of distinct Google Cloud services whose configuration changed during the collection window. |
Dependent item | gcp.security.services.touched Preprocessing
|
| Audit: Resources changed | The number of distinct resources that changed during the collection window, as opposed to the number of API calls. |
Dependent item | gcp.security.resources.modified Preprocessing
|
| Audit: Administrative writes | The number of operations that exercised an ADMIN_WRITE permission during the collection window. An operation is counted once however many permissions it checked, so this never exceeds the number of events. |
Dependent item | gcp.security.admin.writes Preprocessing
|
| Audit: Failed operations | The number of configuration changes that failed during the collection window, including permission denials, quota exhaustion, and precondition failures. |
Dependent item | gcp.security.failed.ops Preprocessing
|
| Audit: Delegated calls | The number of changes made by one identity impersonating another. Impersonation is legitimate, but it is also the usual route by which an initial foothold is widened, so a change in the baseline is worth review. |
Dependent item | gcp.security.delegated.calls Preprocessing
|
| Audit: Time of the last event | The time elapsed since the most recent configuration change found in the collection window. No value is reported when the window contains no changes, which is the normal state for a quiet project, so this item measures recency of activity rather than collection health. A broken collection is detected by the 'No security data received' trigger on the master item. |
Dependent item | gcp.security.latest.event.time Preprocessing
|
| Audit: Last change | The most recent configuration change: when it happened, which method was called, by which principal, from which address, and on which resource. Collected so that a trigger can be understood without opening the audit log. |
Dependent item | gcp.security.audit.latest.event Preprocessing
|
| Audit: Active principals list | The principals that changed configuration during the collection window. Collected for the dashboards: the first 10 entries are listed followed by the number omitted, so it is an overview rather than a complete record. |
Dependent item | gcp.security.principals.list Preprocessing
|
| Audit: Source addresses list | The source addresses that configuration changes originated from during the collection window. This is the detail behind the administrative source address trigger. Collected for the dashboards and for the event name of "Administrative access from more source addresses than expected": the first 10 entries are listed followed by the number omitted, so it is an overview rather than a complete record. |
Dependent item | gcp.security.caller.ips.list Preprocessing
|
| Get posture | Collects publicly accessible resources and privileged bindings from Cloud Asset Inventory, and service account key age from the IAM API. Cloud Asset Inventory is free and covers every service in the project with a single call. |
Dependent item | gcp.security.get.posture Preprocessing
|
| Get posture truncation | Reports a Cloud Asset Inventory and IAM collection that returned only part of its data. The metrics derived from it are withheld while this is set, so they are absent rather than understated. |
Dependent item | gcp.security.get.posture.truncated Preprocessing
|
| Get posture errors | A list of errors from the Cloud Asset Inventory and IAM API requests. |
Dependent item | gcp.security.get.posture.errors Preprocessing
|
| Posture: Publicly accessible resources | The number of IAM bindings granted to allUsers or allAuthenticatedUsers anywhere in the project, such as public storage buckets, public Cloud Run services, or public Pub/Sub topics. Zero is the expected state. |
Dependent item | gcp.security.public.bindings Preprocessing
|
| Posture: Policies allowing privilege escalation | The number of resource policies that grant a role able to rewrite the IAM policy, custom roles included. A principal holding such a role can grant itself any further permission, so the count is expected to be small and stable. One policy can name several principals, so this counts the policies rather than the principals; the companion item lists the resources they belong to. |
Dependent item | gcp.security.privileged.bindings Preprocessing
|
| Posture: Resources | The total number of resources in the project, collected as context for the other posture metrics. |
Dependent item | gcp.security.assets.total Preprocessing
|
| Posture: Resource types | The number of distinct resource types in the project, that is, how many Google Cloud services are actually in use. |
Dependent item | gcp.security.assets.types Preprocessing
|
| Posture: Resource locations | The number of distinct locations the project's resources live in. A change can mean data has moved jurisdiction. |
Dependent item | gcp.security.assets.locations Preprocessing
|
| Posture: Unlabeled resources | The number of resources carrying no labels, and therefore no recorded owner. |
Dependent item | gcp.security.assets.unlabeled Preprocessing
|
| Posture: User managed service account keys | The number of user-managed service account keys across all service accounts in the project. Google's own system-managed keys are excluded: they rotate automatically and are never actionable. |
Dependent item | gcp.security.sa.keys.usermanaged Preprocessing
|
| Posture: Service accounts | The number of service accounts in the project, which is the identity surface the key checks cover. |
Dependent item | gcp.security.sa.accounts.total Preprocessing
|
| Posture: Service accounts checked for key age | How many service accounts were checked for key age on this run. Below the total, the accounts are checked in rotating slices of {$GCP.SECURITY.SA.MAX}, so every account is covered within one cycle rather than the accounts past the limit never being checked at all. |
Dependent item | gcp.security.sa.accounts.checked Preprocessing
|
| Posture: Oldest service account key age | The age of the oldest user-managed service account key in the project. Reports zero when no user-managed key exists. |
Dependent item | gcp.security.sa.keys.max.age Preprocessing
|
| Posture: Publicly accessible resources list | The resources that are readable by anyone on the internet. This is the detail behind the publicly accessible resources trigger. Collected for the dashboards and for the event name of "Publicly accessible resources detected": the first 10 entries are listed followed by the number omitted, so it is an overview rather than a complete record. |
Dependent item | gcp.security.public.bindings.list Preprocessing
|
| Posture: Escalation capable resources list | The resources on which a principal holds a role able to rewrite the IAM policy. Collected for the dashboards: the first 10 entries are listed followed by the number omitted, so it is an overview rather than a complete record. |
Dependent item | gcp.security.privileged.bindings.list Preprocessing
|
| Posture: Oldest key owner | The service account that owns the oldest user-managed key in the project. |
Dependent item | gcp.security.sa.keys.oldest.account Preprocessing
|
| Get compliance | Collects framework compliance summaries and framework deployments from Compliance Manager. |
Dependent item | gcp.security.get.compliance Preprocessing
|
| Get compliance truncation | Reports a Cloud Security Compliance collection that returned only part of its data. The metrics derived from it are withheld while this is set, so they are absent rather than understated. |
Dependent item | gcp.security.get.compliance.truncated Preprocessing
|
| Get compliance errors | A list of errors from the Cloud Security Compliance API requests. |
Dependent item | gcp.security.get.compliance.errors Preprocessing
|
| Compliance: Frameworks | The number of compliance frameworks reporting a compliance summary for this project. |
Dependent item | gcp.security.compliance.frameworks Preprocessing
|
| Compliance: Framework deployments | The number of compliance frameworks actually deployed on this project. Collected so that an absent compliance result can be told apart from a compliant one. |
Dependent item | gcp.security.compliance.deployments Preprocessing
|
| Compliance: Passing controls | The number of compliance controls currently passing across all deployed frameworks. |
Dependent item | gcp.security.compliance.controls.passed Preprocessing
|
| Compliance: Failing controls | The number of compliance controls currently failing across all deployed frameworks. |
Dependent item | gcp.security.compliance.controls.failed Preprocessing
|
| Compliance: Score | The share of compliance controls currently passing across all deployed frameworks. |
Dependent item | gcp.security.compliance.score Preprocessing
|
| Get findings | Collects the registered detector list and the active, unmuted findings from Security Command Center. The two are collected independently so that the detector count is still reported when findings cannot be read. |
Dependent item | gcp.security.get.scc Preprocessing
|
| Get findings truncation | Reports a Security Command Center collection that returned only part of its data. The metrics derived from it are withheld while this is set, so they are absent rather than understated. |
Dependent item | gcp.security.get.scc.truncated Preprocessing
|
| Get findings errors | A list of errors from the Security Command Center API requests. |
Dependent item | gcp.security.get.scc.errors Preprocessing
|
| Findings: Registered detectors | The number of Security Command Center detection services registered for this project. Detectors are tier-dependent, and a findings count of zero is only meaningful while this value is above zero. |
Dependent item | gcp.security.scc.sources Preprocessing
|
| Findings: Total | The total number of active, unmuted Security Command Center findings. |
Dependent item | gcp.security.scc.findings.total Preprocessing
|
| Findings: Critical severity | The number of active findings with CRITICAL severity. |
Dependent item | gcp.security.scc.findings.critical Preprocessing
|
| Findings: High severity | The number of active findings with HIGH severity. |
Dependent item | gcp.security.scc.findings.high Preprocessing
|
| Findings: Medium severity | The number of active findings with MEDIUM severity. |
Dependent item | gcp.security.scc.findings.medium Preprocessing
|
| Findings: Low severity | The number of active findings with LOW severity. |
Dependent item | gcp.security.scc.findings.low Preprocessing
|
| Findings: Categories | The number of distinct finding categories currently active, that is, how many different kinds of problem are reported. |
Dependent item | gcp.security.scc.categories Preprocessing
|
| Findings: Threats | The number of active findings classified as THREAT, meaning a detector believes something is acting against the project rather than that a setting is wrong. These are incidents, not backlog. |
Dependent item | gcp.security.scc.findings.threat Preprocessing
|
| Findings: Vulnerabilities | The number of active findings classified as VULNERABILITY, such as an exploitable package or image. |
Dependent item | gcp.security.scc.findings.vulnerability Preprocessing
|
| Findings: Misconfigurations | The number of active findings classified as MISCONFIGURATION. Usually the bulk of the backlog. |
Dependent item | gcp.security.scc.findings.misconfiguration Preprocessing
|
| Findings: Muted | The number of findings that have been muted. A muted finding is hidden from the default view, so a rising count means risk is being suppressed rather than resolved. |
Dependent item | gcp.security.scc.findings.muted Preprocessing
|
| Findings: First raised | The time since the oldest still-active finding was first raised. It measures whether findings are being remediated at all: a value that only ever grows means the backlog is untouched. |
Dependent item | gcp.security.scc.oldest.finding.time Preprocessing
|
| Findings: Most severe | The most severe active finding, with its category and the resource it was raised on. |
Dependent item | gcp.security.scc.top.finding Preprocessing
|
| Get certificates | Collects the load balancer SSL certificates of the project and the time left before the closest expiry. |
Dependent item | gcp.security.get.certificates Preprocessing
|
| Get certificates truncation | Reports a Compute Engine collection that returned only part of its data. The metrics derived from it are withheld while this is set, so they are absent rather than understated. |
Dependent item | gcp.security.get.certificates.truncated Preprocessing
|
| Get certificates errors | A list of errors from the Compute Engine API requests. |
Dependent item | gcp.security.get.certificates.errors Preprocessing
|
| Certificates: Total | The number of SSL certificates configured on the load balancers of the project. |
Dependent item | gcp.security.certs.total Preprocessing
|
| Certificates: Time until the closest expiry | The time left before the closest SSL certificate expiry. The value becomes negative once a certificate has expired. Set {$GCP.SECURITY.CERT.SELF_MANAGED.ONLY} to 1 to ignore Google-managed certificates, which renew themselves. |
Dependent item | gcp.security.certs.expiry.min Preprocessing
|
| Certificates: Not serving | The number of Google-managed certificates that are not in the ACTIVE state. Such a certificate serves no traffic, and one that reports PROVISIONING_FAILED_PERMANENTLY never will. It also carries no expiry date, so it is invisible to the expiry items - which is why it is counted separately. |
Dependent item | gcp.security.certs.unhealthy Preprocessing
|
| Certificates: Expired | The number of certificates whose expiry date has already passed. |
Dependent item | gcp.security.certs.expired Preprocessing
|
| Certificates: Closest to expiry | The name and type of the certificate that expires soonest. |
Dependent item | gcp.security.certs.expiring.name Preprocessing
|
| Get log metrics | Collects the log entry rate by severity from Cloud Monitoring, as a coarse anomaly counter. Cloud Monitoring cannot combine series that have different monitored resource types, so the per-severity totals are summed in the script rather than by the API. |
Dependent item | gcp.security.get.logmetrics Preprocessing
|
| Get log metrics truncation | Reports a Cloud Monitoring collection that returned only part of its data. The metrics derived from it are withheld while this is set, so they are absent rather than understated. |
Dependent item | gcp.security.get.logmetrics.truncated Preprocessing
|
| Get log metrics errors | A list of errors from the Cloud Monitoring API requests. |
Dependent item | gcp.security.get.logmetrics.errors Preprocessing
|
| Logs: Entry rate, total | The rate of log entries written across every severity and resource type in the project. |
Dependent item | gcp.security.log.entries.rate Preprocessing
|
| Logs: Entry rate, error and above | The rate of log entries written with ERROR severity or above. Many projects never emit these severities, in which case the value is legitimately zero. |
Dependent item | gcp.security.log.entries.error.rate Preprocessing
|
| Logs: Entry rate, warning | The rate of log entries written with WARNING severity. |
Dependent item | gcp.security.log.entries.warning.rate Preprocessing
|
| Logs: Entry rate, notice | The rate of log entries written with NOTICE severity. Admin Activity audit events are written at this severity, so this tracks the overall rate of configuration change. |
Dependent item | gcp.security.log.entries.notice.rate Preprocessing
|
| Logs: Entry rate, info | The rate of log entries written with INFO severity. |
Dependent item | gcp.security.log.entries.info.rate Preprocessing
|
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP Security: Authorization has failed | The service account could not exchange its key for an access token, so no data can be collected from any API. |
length(last(/GCP Security by HTTP/gcp.security.auth.err.check))>0 |
Average | |
| GCP Security: The collection was truncated | A collection reached a limit of this template and returned only part of its data, so the metrics derived from it were not published. |
length(last(/GCP Security by HTTP/gcp.security.get.audit.events.truncated))>0 |
Warning | |
| GCP Security: There are errors in requests to API | There are errors in response to GCP API requests. |
length(last(/GCP Security by HTTP/gcp.security.get.audit.events.errors))>0 |
Average | |
| GCP Security: No security data received | No audit log data has been received for longer than {$GCP.SECURITY.NODATA.TIMEOUT}. |
nodata(/GCP Security by HTTP/gcp.security.audit.events.total,{$GCP.SECURITY.NODATA.TIMEOUT})=1 |
Warning | Manual close: Yes |
| GCP Security: IAM policy change rate is unusual | An unusual number of IAM policy changes has been recorded, which can indicate scripted permission rewriting. |
last(/GCP Security by HTTP/gcp.security.iam.changes)>{$GCP.SECURITY.IAM.CHANGES.MAX} |
Warning | Manual close: Yes |
| GCP Security: Privileged role granted | An owner, editor, or administrator role binding has been added. |
last(/GCP Security by HTTP/gcp.security.privileged.grants)>0 |
Average | Manual close: Yes |
| GCP Security: Service account deleted | Indicates that a service account has been removed. |
last(/GCP Security by HTTP/gcp.security.sa.deleted)>0 |
Warning | Manual close: Yes |
| GCP Security: Service account key created | A user-managed service account key has been created. |
last(/GCP Security by HTTP/gcp.security.sa.keys.created)>0 |
Average | Manual close: Yes |
| GCP Security: Firewall rules modified | Firewall rules have been changed. Check the audit log for the source ranges and ports of the modified rule. |
last(/GCP Security by HTTP/gcp.security.firewall.changes)>{$GCP.SECURITY.FIREWALL.MAX} |
Warning | Manual close: Yes |
| GCP Security: Organization policy changed | An organization policy constraint has been changed, which can weaken a guardrail that applies to the entire project. |
last(/GCP Security by HTTP/gcp.security.orgpolicy.changes)>0 |
Average | Manual close: Yes |
| GCP Security: Administrative access from more source addresses than expected | Configuration changes originated from more distinct source addresses than expected. |
last(/GCP Security by HTTP/gcp.security.caller.ips)>{$GCP.SECURITY.CALLER.IPS.MAX} |
Average | Manual close: Yes |
| GCP Security: Service account impersonation detected | Configuration was changed by an identity acting as another service account. |
last(/GCP Security by HTTP/gcp.security.delegated.calls)>{$GCP.SECURITY.DELEGATED.MAX} |
Warning | Manual close: Yes |
| GCP Security: The collection was truncated | A collection reached a limit of this template and returned only part of its data, so the metrics derived from it were not published. |
length(last(/GCP Security by HTTP/gcp.security.get.posture.truncated))>0 |
Warning | |
| GCP Security: There are errors in requests to API | There are errors in response to GCP API requests. |
length(last(/GCP Security by HTTP/gcp.security.get.posture.errors))>0 |
Average | |
| GCP Security: Publicly accessible resources detected | At least one resource is readable by anyone on the internet. |
last(/GCP Security by HTTP/gcp.security.public.bindings)>0 |
High | Manual close: Yes |
| GCP Security: User-managed service account key is too old | A user-managed service account key has not been rotated within the configured period. |
max(/GCP Security by HTTP/gcp.security.sa.keys.max.age,{$GCP.SECURITY.SA.KEY.LOOKBACK})>{$GCP.SECURITY.KEY.AGE.MAX} |
Warning | Manual close: Yes |
| GCP Security: The collection was truncated | A collection reached a limit of this template and returned only part of its data, so the metrics derived from it were not published. |
length(last(/GCP Security by HTTP/gcp.security.get.compliance.truncated))>0 |
Warning | |
| GCP Security: There are errors in requests to API | There are errors in response to GCP API requests. |
length(last(/GCP Security by HTTP/gcp.security.get.compliance.errors))>0 |
Average | |
| GCP Security: No compliance framework deployed | No compliance framework is deployed on this project, so the compliance items report nothing rather than reporting compliance. |
last(/GCP Security by HTTP/gcp.security.compliance.deployments)=0 |
Info | Manual close: Yes |
| GCP Security: Failing compliance controls | The project does not satisfy every control of the deployed compliance frameworks. |
last(/GCP Security by HTTP/gcp.security.compliance.controls.failed)>{$GCP.SECURITY.COMPLIANCE.FAILED.MAX} |
Average | Manual close: Yes |
| GCP Security: Compliance regression | The number of failing compliance controls has increased. |
change(/GCP Security by HTTP/gcp.security.compliance.controls.failed)>0 |
Warning | Manual close: Yes |
| GCP Security: The collection was truncated | A collection reached a limit of this template and returned only part of its data, so the metrics derived from it were not published. |
length(last(/GCP Security by HTTP/gcp.security.get.scc.truncated))>0 |
Warning | |
| GCP Security: There are errors in requests to API | There are errors in response to GCP API requests. |
length(last(/GCP Security by HTTP/gcp.security.get.scc.errors))>0 |
Average | |
| GCP Security: No security detectors registered | Security Command Center has no detection service registered for this project, so no finding can ever be produced. |
last(/GCP Security by HTTP/gcp.security.scc.sources)=0 |
Warning | Manual close: Yes |
| GCP Security: Security findings increased | The number of active security findings has increased. |
change(/GCP Security by HTTP/gcp.security.scc.findings.total)>0 |
Warning | Manual close: Yes Depends on:
|
| GCP Security: Critical security findings | Security Command Center reports at least one critical severity finding for this project. |
last(/GCP Security by HTTP/gcp.security.scc.findings.critical)>0 |
High | Manual close: Yes Depends on:
|
| GCP Security: High severity security findings | Security Command Center reports high severity findings for this project. |
last(/GCP Security by HTTP/gcp.security.scc.findings.high)>{$GCP.SECURITY.SCC.HIGH.MAX} |
Average | Manual close: Yes Depends on:
|
| GCP Security: Medium severity security findings | Security Command Center reports more medium severity findings than the configured threshold. |
last(/GCP Security by HTTP/gcp.security.scc.findings.medium)>{$GCP.SECURITY.SCC.MEDIUM.MAX} |
Warning | Manual close: Yes Depends on:
|
| GCP Security: Active security threat detected | Security Command Center reports a finding classified as THREAT: an actor or process is acting against this project. |
last(/GCP Security by HTTP/gcp.security.scc.findings.threat)>0 |
High | Manual close: Yes |
| GCP Security: Security findings are not being remediated | A finding has stayed active longer than the configured period, which indicates the backlog is not being worked. |
now()-last(/GCP Security by HTTP/gcp.security.scc.oldest.finding.time)>{$GCP.SECURITY.FINDING.AGE.MAX} |
Warning | Manual close: Yes |
| GCP Security: The collection was truncated | A collection reached a limit of this template and returned only part of its data, so the metrics derived from it were not published. |
length(last(/GCP Security by HTTP/gcp.security.get.certificates.truncated))>0 |
Warning | |
| GCP Security: There are errors in requests to API | There are errors in response to GCP API requests. |
length(last(/GCP Security by HTTP/gcp.security.get.certificates.errors))>0 |
Average | |
| GCP Security: Certificate expires soon | An SSL certificate on a load balancer of this project is approaching expiry. Renew or replace it before traffic starts failing. |
last(/GCP Security by HTTP/gcp.security.certs.expiry.min)<{$GCP.SECURITY.CERT.WARN} |
Warning | Manual close: Yes Depends on:
|
| GCP Security: Certificate expires imminently | An SSL certificate on a load balancer of this project is about to expire. Traffic to the affected front end will fail once it does. |
last(/GCP Security by HTTP/gcp.security.certs.expiry.min)<{$GCP.SECURITY.CERT.CRIT} |
Average | Manual close: Yes |
| GCP Security: Certificate is not serving | A managed certificate is not in the ACTIVE state and is therefore serving no traffic. |
last(/GCP Security by HTTP/gcp.security.certs.unhealthy)>0 |
Average | Manual close: Yes |
| GCP Security: The collection was truncated | A collection reached a limit of this template and returned only part of its data, so the metrics derived from it were not published. |
length(last(/GCP Security by HTTP/gcp.security.get.logmetrics.truncated))>0 |
Warning | |
| GCP Security: There are errors in requests to API | There are errors in response to GCP API requests. |
length(last(/GCP Security by HTTP/gcp.security.get.logmetrics.errors))>0 |
Average |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
GCP by HTTP
Overview
This template is designed to monitor GCP by HTTP. It works without any external scripts and uses the script item. Currently, the template supports the discovery of Compute Engine instances, Cloud SQL instances (Microsoft SQL Server, MySQL, and PostgreSQL, including replicas), Application Load Balancers, and Cost Monitoring resources.
Included Monitoring Templates
- GCP Application Load Balancer by HTTP
- GCP Cost Monitoring by HTTP
- GCP Compute Engine Instance by HTTP
- GCP Cloud SQL MSSQL by HTTP
- GCP Cloud SQL MSSQL Replica by HTTP
- GCP Cloud SQL MySQL by HTTP
- GCP Cloud SQL MySQL Replica by HTTP
- GCP Cloud SQL PostgreSQL by HTTP
- GCP Cloud SQL PostgreSQL Replica by HTTP
The template additionally supports the collection of Compute Engine project quota metrics.
Requirements
Zabbix version: 7.4 and higher.
Tested versions
This template has been tested on:
- Google Cloud Platform
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable the
Stackdriver Monitoring APIfor the GCP project you wish to monitor.
Refer to the vendor documentation.
- Create a service account in Google Cloud console for the project you have to monitor.
Refer to the vendor documentation.
- Create and download the service account key in JSON format.
Refer to the vendor documentation.
- If you want to monitor Cloud SQL services - don't forget to activate the Cloud SQL Admin API.
Refer to the vendor documentation for the details.
- Copy the
project_id,private_key_id,private_key,client_emailfrom the JSON key file and add them to their corresponding macros{$GCP.PROJECT.ID},{$GCP.PRIVATE.KEY.ID},{$GCP.PRIVATE.KEY},{$GCP.CLIENT.EMAIL}on the template/host.
Additional information:
Make sure that you're creating the service account using the credentials with the `Project Owner/Project IAM Admin/service account Admin` role.
The service account JSON key file can only be downloaded once: regenerate it if the previous key has been lost.
The service account should have `Project Viewer` permissions or granular permissions for the GCP Compute Engine API/GCP Cloud SQL.
You can copy and paste private_key string data from the Service Account JSON key file as is or replace the new line metasymbol (\n) with an actual new line.
Please, refer to the vendor documentation about the service accounts management.
IMPORTANT!!!
Secret authorization token is defined as a plain text in host prototype settings by default due to Zabbix templates export/import limits: therefore, it is highly recommended to change the user macro `{$GCP.AUTH.TOKEN}` value type to `SECRET` for all host prototypes after the template `GCP by HTTP` import.
All the instances/quotas/metrics discovered are related to a particular GCP project.
To monitor several GCP projects - create their corresponding service accounts/Zabbix hosts.
GCP Access Token is available for 1 hour (3600 seconds) after the generation request.
To avoid a GCP token inconsistency between Zabbix database and Zabbix server configuration cache, don't set Zabbix server configuration parameter CacheUpdateFrequency to a value over 45 minutes and don't set the update interval for the GCP Authorization item to more than 1 hour (maximum CacheUpdateFrequency value).
Additional information about metrics and used API methods:
Macros used
| Name | Description | Default |
|---|---|---|
| {$GCP.PROJECT.ID} | GCP project ID. |
|
| {$GCP.CLIENT.EMAIL} | Service account client e-mail. |
|
| {$GCP.PRIVATE.KEY.ID} | Service account private key id. |
|
| {$GCP.PRIVATE.KEY} | Service account private key data. |
|
| {$GCP.AUTH.FREQUENCY} | The update interval for the GCP Authorization item, which also equals to the access token regeneration request frequency. Check the template documentation notes carefully for more details. |
45m |
| {$GCP.GCE.QUOTA.PUSED.MIN.WARN} | GCP Compute Engine project quota warning utilization threshold. |
80 |
| {$GCP.GCE.QUOTA.PUSED.MIN.CRIT} | GCP Compute Engine project quota critical quota utilization threshold. |
95 |
| {$GCP.DATA.TIMEOUT} | A response timeout for an API. |
15s |
| {$GCP.PROXY} | Sets HTTP proxy value. If this macro is empty then no proxy is used. |
|
| {$HTTP.TLS.VERIFY} | TLS certificate verification for script items and JavaScript preprocessing: "none" - disabled, "peer" - verify the certificate chain and expiration, "full" - full verification. Any other value enables full verification. To override the setting for this template only, define the macro with the context "GCP", e.g. {$HTTP.TLS.VERIFY:"GCP"}. |
full |
| {$GCP.GCE.INST.NAME.MATCHES} | The filter to include GCP Compute Engine instances by namespace. |
.* |
| {$GCP.GCE.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.ZONE.MATCHES} | The filter to include GCP Compute Engine instances by zone. |
.* |
| {$GCP.GCE.ZONE.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by namespace. |
.* |
| {$GCP.MYSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by zone. |
.* |
| {$GCP.MYSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by type (standalone/replica). |
.* |
| {$GCP.MYSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by namespace. |
.* |
| {$GCP.PGSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by zone. |
.* |
| {$GCP.PGSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by type (standalone/replica). |
.* |
| {$GCP.PGSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by namespace. |
.* |
| {$GCP.MSSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by zone. |
.* |
| {$GCP.MSSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by type (standalone/replica). |
.* |
| {$GCP.MSSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.QUOTA.MATCHES} | The filter to include GCP Compute Engine project quotas by namespace. |
.* |
| {$GCP.GCE.QUOTA.NOT_MATCHES} | The filter to exclude GCP Compute Engine project quotas by namespace. |
CHANGE_IF_NEEDED |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Authorization | Google Cloud Platform REST authorization with service account authentication parameters and temporary-generated RSA-based JWT-token usage. The necessary scopes are pre-defined. Returns a signed authorization token with 1 hour lifetime; it is required only once, and is used for all the dependent script items. Check the template documentation for the details. |
Script | gcp.authorization |
| GCE instances get | Get GCP Compute Engine instances. |
Dependent item | gcp.gce.instances.get Preprocessing
|
| Authorization errors check | A list of errors from API requests. |
Dependent item | gcp.auth.err.check Preprocessing
|
| Cloud SQL instances get | GCP Cloud SQL: Instances get. |
Dependent item | gcp.cloudsql.instances.get Preprocessing
|
| Cloud SQL instances total | GCP Cloud SQL instances total count. |
Dependent item | gcp.cloudsql.instances.total Preprocessing
|
| MSSQL instances count | GCP Cloud SQL MSSQL instances count. |
Dependent item | gcp.cloudsql.instances.mssql_count Preprocessing
|
| MySQL instances count | GCP Cloud SQL MySQL instances count. |
Dependent item | gcp.cloudsql.instances.mysql_count Preprocessing
|
| PostgreSQL instances count | GCP Cloud SQL PostgreSQL instances count. |
Dependent item | gcp.cloudsql.instances.pgsql_count Preprocessing
|
| GCE instances total | GCP Compute Engine instances total count. |
Dependent item | gcp.gce.instances.total Preprocessing
|
| Regular GCE instances count | GCP Compute Engine: Regular instances count. |
Dependent item | gcp.gce.instances.regular_count Preprocessing
|
| Container-optimized GCE instances count | GCP Compute Engine: count of instances with Container-Optimized OS used. |
Dependent item | gcp.gce.instances.cos_count Preprocessing
|
| Project quotas get | GCP Compute Engine resource quotas available for the particular project. |
Dependent item | gcp.gce.quotas.get Preprocessing
|
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP: Authorization has failed | GCP: Authorization has failed. |
length(last(/GCP by HTTP/gcp.auth.err.check)) > 0 |
Average |
LLD rule GCP Compute Engine: Instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Instances discovery | GCP Compute Engine: Instances discovery. |
Dependent item | gcp.gce.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: PostgreSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: PostgreSQL instances discovery | GCP Cloud SQL: PostgreSQL instances discovery. |
Dependent item | gcp.cloudsql.pgsql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MSSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MSSQL instances discovery | GCP Cloud SQL: MSSQL instances discovery. |
Dependent item | gcp.cloudsql.mssql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MySQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MySQL instances discovery | GCP Cloud SQL: MySQL instances discovery. |
Dependent item | gcp.cloudsql.mysql.inst.discovery Preprocessing
|
LLD rule GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Project quotas discovery | GCP Compute Engine: Quotas discovery. |
Dependent item | gcp.gce.quotas.discovery Preprocessing
|
Item prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quota [{#GCE.QUOTA.NAME}]: Raw data | GCP Compute Engine: Get metrics for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.single.raw[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Usage | GCP Compute Engine: The current usage value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.usage[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Limit | GCP Compute Engine: The current limit value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.limit[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Percentage used | GCP Compute Engine: Percentage usage for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.pused[{#GCE.QUOTA.NAME}] Preprocessing
|
Trigger prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP: Quota [{#GCE.QUOTA.NAME}] limit has been changed | GCP Compute Engine: The limit for the |
change(/GCP by HTTP/gcp.gce.quota.limit[{#GCE.QUOTA.NAME}]) <> 0 |
Info | Manual close: Yes |
| GCP: Quota [{#GCE.QUOTA.NAME}] usage is close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.WARN:"{#GCE.QUOTA.NAME}"} |
Warning | Manual close: Yes Depends on:
|
| GCP: Quota [{#GCE.QUOTA.NAME}] usage is critically close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.CRIT:"{#GCE.QUOTA.NAME}"} |
Average | Manual close: Yes |
GCP by HTTP
Overview
This template is designed to monitor Google Cloud Platform (hereinafter - GCP) by Zabbix. It works without any external scripts and uses the script item. The template currently supports the discovery of Compute Engine/Cloud SQL instances and Compute Engine project quota metrics.
Requirements
Zabbix version: 7.2 and higher.
Tested versions
This template has been tested on:
- Google Cloud Platform
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable the
Stackdriver Monitoring APIfor the GCP project you wish to monitor.
Refer to the vendor documentation.
- Create a service account in Google Cloud console for the project you have to monitor.
Refer to the vendor documentation.
- Create and download the service account key in JSON format.
Refer to the vendor documentation.
- If you want to monitor Cloud SQL services - don't forget to activate the Cloud SQL Admin API.
Refer to the vendor documentation for the details.
- Copy the
project_id,private_key_id,private_key,client_emailfrom the JSON key file and add them to their corresponding macros{$GCP.PROJECT.ID},{$GCP.PRIVATE.KEY.ID},{$GCP.PRIVATE.KEY},{$GCP.CLIENT.EMAIL}on the template/host.
Additional information:
Make sure that you're creating the service account using the credentials with the `Project Owner/Project IAM Admin/service account Admin` role.
The service account JSON key file can only be downloaded once: regenerate it if the previous key has been lost.
The service account should have `Project Viewer` permissions or granular permissions for the GCP Compute Engine API/GCP Cloud SQL.
You can copy and paste private_key string data from the Service Account JSON key file as is or replace the new line metasymbol (\n) with an actual new line.
Please, refer to the vendor documentation about the service accounts management.
IMPORTANT!!!
Secret authorization token is defined as a plain text in host prototype settings by default due to Zabbix templates export/import limits: therefore, it is highly recommended to change the user macro `{$GCP.AUTH.TOKEN}` value type to `SECRET` for all host prototypes after the template `GCP by HTTP` import.
All the instances/quotas/metrics discovered are related to a particular GCP project.
To monitor several GCP projects - create their corresponding service accounts/Zabbix hosts.
GCP Access Token is available for 1 hour (3600 seconds) after the generation request.
To avoid a GCP token inconsistency between Zabbix database and Zabbix server configuration cache, don't set Zabbix server configuration parameter CacheUpdateFrequency to a value over 45 minutes and don't set the update interval for the GCP Authorization item to more than 1 hour (maximum CacheUpdateFrequency value).
Additional information about metrics and used API methods:
Macros used
| Name | Description | Default |
|---|---|---|
| {$GCP.PROJECT.ID} | GCP project ID. |
|
| {$GCP.CLIENT.EMAIL} | Service account client e-mail. |
|
| {$GCP.PRIVATE.KEY.ID} | Service account private key id. |
|
| {$GCP.PRIVATE.KEY} | Service account private key data. |
|
| {$GCP.PROXY} | Sets HTTP proxy value. If this macro is empty then no proxy is used. |
|
| {$GCP.DATA.TIMEOUT} | A response timeout for an API. |
15s |
| {$GCP.AUTH.FREQUENCY} | The update interval for the GCP Authorization item, which also equals to the access token regeneration request frequency. Check the template documentation notes carefully for more details. |
45m |
| {$GCP.GCE.INST.NAME.MATCHES} | The filter to include GCP Compute Engine instances by namespace. |
.* |
| {$GCP.GCE.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.ZONE.MATCHES} | The filter to include GCP Compute Engine instances by zone. |
.* |
| {$GCP.GCE.ZONE.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by namespace. |
.* |
| {$GCP.MYSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by zone. |
.* |
| {$GCP.MYSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by type (standalone/replica). |
.* |
| {$GCP.MYSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by namespace. |
.* |
| {$GCP.PGSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by zone. |
.* |
| {$GCP.PGSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by type (standalone/replica). |
.* |
| {$GCP.PGSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by namespace. |
.* |
| {$GCP.MSSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by zone. |
.* |
| {$GCP.MSSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by type (standalone/replica). |
.* |
| {$GCP.MSSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.QUOTA.MATCHES} | The filter to include GCP Compute Engine project quotas by namespace. |
.* |
| {$GCP.GCE.QUOTA.NOT_MATCHES} | The filter to exclude GCP Compute Engine project quotas by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.QUOTA.PUSED.MIN.WARN} | GCP Compute Engine project quota warning utilization threshold. |
80 |
| {$GCP.GCE.QUOTA.PUSED.MIN.CRIT} | GCP Compute Engine project quota critical quota utilization threshold. |
95 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Authorization | Google Cloud Platform REST authorization with service account authentication parameters and temporary-generated RSA-based JWT-token usage. The necessary scopes are pre-defined. Returns a signed authorization token with 1 hour lifetime; it is required only once, and is used for all the dependent script items. Check the template documentation for the details. |
Script | gcp.authorization |
| Instances get | Get GCP Compute Engine instances. |
Dependent item | gcp.gce.instances.get Preprocessing
|
| Authorization errors check | A list of errors from API requests. |
Dependent item | gcp.auth.err.check Preprocessing
|
| Instances get | GCP Cloud SQL: Instances get. |
Dependent item | gcp.cloudsql.instances.get Preprocessing
|
| Cloud SQL instances total | GCP Cloud SQL instances total count. |
Dependent item | gcp.cloudsql.instances.total Preprocessing
|
| MSSQL instances count | GCP Cloud SQL MSSQL instances count. |
Dependent item | gcp.cloudsql.instances.mssql_count Preprocessing
|
| MySQL instances count | GCP Cloud SQL MySQL instances count. |
Dependent item | gcp.cloudsql.instances.mysql_count Preprocessing
|
| PostgreSQL instances count | GCP Cloud SQL PostgreSQL instances count. |
Dependent item | gcp.cloudsql.instances.pgsql_count Preprocessing
|
| GCE instances total | GCP Compute Engine instances total count. |
Dependent item | gcp.gce.instances.total Preprocessing
|
| Regular GCE instances count | GCP Compute Engine: Regular instances count. |
Dependent item | gcp.gce.instances.regular_count Preprocessing
|
| Container-optimized GCE instances count | GCP Compute Engine: count of instances with Container-Optimized OS used. |
Dependent item | gcp.gce.instances.cos_count Preprocessing
|
| Project quotas get | GCP Compute Engine resource quotas available for the particular project. |
Dependent item | gcp.gce.quotas.get Preprocessing
|
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP: Authorization has failed | GCP: Authorization has failed. |
length(last(/GCP by HTTP/gcp.auth.err.check)) > 0 |
Average |
LLD rule GCP Compute Engine: Instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Instances discovery | GCP Compute Engine: Instances discovery. |
Dependent item | gcp.gce.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: PostgreSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: PostgreSQL instances discovery | GCP Cloud SQL: PostgreSQL instances discovery. |
Dependent item | gcp.cloudsql.pgsql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MSSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MSSQL instances discovery | GCP Cloud SQL: MSSQL instances discovery. |
Dependent item | gcp.cloudsql.mssql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MySQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MySQL instances discovery | GCP Cloud SQL: MySQL instances discovery. |
Dependent item | gcp.cloudsql.mysql.inst.discovery Preprocessing
|
LLD rule GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Project quotas discovery | GCP Compute Engine: Quotas discovery. |
Dependent item | gcp.gce.quotas.discovery Preprocessing
|
Item prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quota [{#GCE.QUOTA.NAME}]: Raw data | GCP Compute Engine: Get metrics for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.single.raw[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Usage | GCP Compute Engine: The current usage value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.usage[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Limit | GCP Compute Engine: The current limit value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.limit[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Percentage used | GCP Compute Engine: Percentage usage for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.pused[{#GCE.QUOTA.NAME}] Preprocessing
|
Trigger prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP: Quota [{#GCE.QUOTA.NAME}] limit has been changed | GCP Compute Engine: The limit for the |
change(/GCP by HTTP/gcp.gce.quota.limit[{#GCE.QUOTA.NAME}]) <> 0 |
Info | Manual close: Yes |
| GCP: Quota [{#GCE.QUOTA.NAME}] usage is close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.WARN:"{#GCE.QUOTA.NAME}"} |
Warning | Manual close: Yes Depends on:
|
| GCP: Quota [{#GCE.QUOTA.NAME}] usage is critically close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.CRIT:"{#GCE.QUOTA.NAME}"} |
Average | Manual close: Yes |
GCP by HTTP
Overview
This template is designed to monitor GCP by HTTP. It works without any external scripts and uses the script item. Currently, the template supports the discovery of Compute Engine instances and Cloud SQL instances (Microsoft SQL Server, MySQL, and PostgreSQL, including replicas).
Included Monitoring Templates
- GCP Compute Engine Instance by HTTP
- GCP Cloud SQL MSSQL by HTTP
- GCP Cloud SQL MSSQL Replica by HTTP
- GCP Cloud SQL MySQL by HTTP
- GCP Cloud SQL MySQL Replica by HTTP
- GCP Cloud SQL PostgreSQL by HTTP
- GCP Cloud SQL PostgreSQL Replica by HTTP
The template additionally supports the collection of Compute Engine project quota metrics.
Requirements
Zabbix version: 7.0 and higher.
Tested versions
This template has been tested on:
- Google Cloud Platform
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable the
Stackdriver Monitoring APIfor the GCP project you wish to monitor.
Refer to the vendor documentation.
- Create a service account in Google Cloud console for the project you have to monitor.
Refer to the vendor documentation.
- Create and download the service account key in JSON format.
Refer to the vendor documentation.
- If you want to monitor Cloud SQL services - don't forget to activate the Cloud SQL Admin API.
Refer to the vendor documentation for the details.
- Copy the
project_id,private_key_id,private_key,client_emailfrom the JSON key file and add them to their corresponding macros{$GCP.PROJECT.ID},{$GCP.PRIVATE.KEY.ID},{$GCP.PRIVATE.KEY},{$GCP.CLIENT.EMAIL}on the template/host.
Additional information:
Make sure that you're creating the service account using the credentials with the `Project Owner/Project IAM Admin/service account Admin` role.
The service account JSON key file can only be downloaded once: regenerate it if the previous key has been lost.
The service account should have `Project Viewer` permissions or granular permissions for the GCP Compute Engine API/GCP Cloud SQL.
You can copy and paste private_key string data from the Service Account JSON key file as is or replace the new line metasymbol (\n) with an actual new line.
Please, refer to the vendor documentation about the service accounts management.
IMPORTANT!!!
Secret authorization token is defined as a plain text in host prototype settings by default due to Zabbix templates export/import limits: therefore, it is highly recommended to change the user macro `{$GCP.AUTH.TOKEN}` value type to `SECRET` for all host prototypes after the template `GCP by HTTP` import.
All the instances/quotas/metrics discovered are related to a particular GCP project.
To monitor several GCP projects - create their corresponding service accounts/Zabbix hosts.
GCP Access Token is available for 1 hour (3600 seconds) after the generation request.
To avoid a GCP token inconsistency between Zabbix database and Zabbix server configuration cache, don't set Zabbix server configuration parameter CacheUpdateFrequency to a value over 45 minutes and don't set the update interval for the GCP Authorization item to more than 1 hour (maximum CacheUpdateFrequency value).
Additional information about metrics and used API methods:
Macros used
| Name | Description | Default |
|---|---|---|
| {$GCP.PROJECT.ID} | GCP project ID. |
|
| {$GCP.CLIENT.EMAIL} | Service account client e-mail. |
|
| {$GCP.PRIVATE.KEY.ID} | Service account private key id. |
|
| {$GCP.PRIVATE.KEY} | Service account private key data. |
|
| {$GCP.PROXY} | Sets HTTP proxy value. If this macro is empty then no proxy is used. |
|
| {$GCP.DATA.TIMEOUT} | A response timeout for an API. |
15s |
| {$GCP.AUTH.FREQUENCY} | The update interval for the GCP Authorization item, which also equals to the access token regeneration request frequency. Check the template documentation notes carefully for more details. |
45m |
| {$HTTP.TLS.VERIFY} | TLS certificate verification for script items and JavaScript preprocessing: "none" - disabled, "peer" - verify the certificate chain and expiration, "full" - full verification. Any other value enables full verification. To override the setting for this template only, define the macro with the context "GCP", e.g. {$HTTP.TLS.VERIFY:"GCP"}. |
full |
| {$GCP.GCE.INST.NAME.MATCHES} | The filter to include GCP Compute Engine instances by namespace. |
.* |
| {$GCP.GCE.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.ZONE.MATCHES} | The filter to include GCP Compute Engine instances by zone. |
.* |
| {$GCP.GCE.ZONE.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by namespace. |
.* |
| {$GCP.MYSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by zone. |
.* |
| {$GCP.MYSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by type (standalone/replica). |
.* |
| {$GCP.MYSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by namespace. |
.* |
| {$GCP.PGSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by zone. |
.* |
| {$GCP.PGSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by type (standalone/replica). |
.* |
| {$GCP.PGSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by namespace. |
.* |
| {$GCP.MSSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by zone. |
.* |
| {$GCP.MSSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by type (standalone/replica). |
.* |
| {$GCP.MSSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.QUOTA.MATCHES} | The filter to include GCP Compute Engine project quotas by namespace. |
.* |
| {$GCP.GCE.QUOTA.NOT_MATCHES} | The filter to exclude GCP Compute Engine project quotas by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.QUOTA.PUSED.MIN.WARN} | GCP Compute Engine project quota warning utilization threshold. |
80 |
| {$GCP.GCE.QUOTA.PUSED.MIN.CRIT} | GCP Compute Engine project quota critical quota utilization threshold. |
95 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Authorization | Google Cloud Platform REST authorization with service account authentication parameters and temporary-generated RSA-based JWT-token usage. The necessary scopes are pre-defined. Returns a signed authorization token with 1 hour lifetime; it is required only once, and is used for all the dependent script items. Check the template documentation for the details. |
Script | gcp.authorization |
| GCE instances get | Get GCP Compute Engine instances. |
Dependent item | gcp.gce.instances.get Preprocessing
|
| Authorization errors check | A list of errors from API requests. |
Dependent item | gcp.auth.err.check Preprocessing
|
| Cloud SQL instances get | GCP Cloud SQL: Instances get. |
Dependent item | gcp.cloudsql.instances.get Preprocessing
|
| Cloud SQL instances total | GCP Cloud SQL instances total count. |
Dependent item | gcp.cloudsql.instances.total Preprocessing
|
| MSSQL instances count | GCP Cloud SQL MSSQL instances count. |
Dependent item | gcp.cloudsql.instances.mssql_count Preprocessing
|
| MySQL instances count | GCP Cloud SQL MySQL instances count. |
Dependent item | gcp.cloudsql.instances.mysql_count Preprocessing
|
| PostgreSQL instances count | GCP Cloud SQL PostgreSQL instances count. |
Dependent item | gcp.cloudsql.instances.pgsql_count Preprocessing
|
| GCE instances total | GCP Compute Engine instances total count. |
Dependent item | gcp.gce.instances.total Preprocessing
|
| Regular GCE instances count | GCP Compute Engine: Regular instances count. |
Dependent item | gcp.gce.instances.regular_count Preprocessing
|
| Container-optimized GCE instances count | GCP Compute Engine: count of instances with Container-Optimized OS used. |
Dependent item | gcp.gce.instances.cos_count Preprocessing
|
| Project quotas get | GCP Compute Engine resource quotas available for the particular project. |
Dependent item | gcp.gce.quotas.get Preprocessing
|
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP: Authorization has failed | GCP: Authorization has failed. |
length(last(/GCP by HTTP/gcp.auth.err.check)) > 0 |
Average |
LLD rule GCP Compute Engine: Instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Instances discovery | GCP Compute Engine: Instances discovery. |
Dependent item | gcp.gce.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: PostgreSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: PostgreSQL instances discovery | GCP Cloud SQL: PostgreSQL instances discovery. |
Dependent item | gcp.cloudsql.pgsql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MSSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MSSQL instances discovery | GCP Cloud SQL: MSSQL instances discovery. |
Dependent item | gcp.cloudsql.mssql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MySQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MySQL instances discovery | GCP Cloud SQL: MySQL instances discovery. |
Dependent item | gcp.cloudsql.mysql.inst.discovery Preprocessing
|
LLD rule GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Project quotas discovery | GCP Compute Engine: Quotas discovery. |
Dependent item | gcp.gce.quotas.discovery Preprocessing
|
Item prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Quota [{#GCE.QUOTA.NAME}]: Raw data | GCP Compute Engine: Get metrics for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.single.raw[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Usage | GCP Compute Engine: The current usage value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.usage[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Limit | GCP Compute Engine: The current limit value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.limit[{#GCE.QUOTA.NAME}] Preprocessing
|
| Quota [{#GCE.QUOTA.NAME}]: Percentage used | GCP Compute Engine: Percentage usage for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.pused[{#GCE.QUOTA.NAME}] Preprocessing
|
Trigger prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP: Quota [{#GCE.QUOTA.NAME}] limit has been changed | GCP Compute Engine: The limit for the |
change(/GCP by HTTP/gcp.gce.quota.limit[{#GCE.QUOTA.NAME}]) <> 0 |
Info | Manual close: Yes |
| GCP: Quota [{#GCE.QUOTA.NAME}] usage is close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.WARN:"{#GCE.QUOTA.NAME}"} |
Warning | Manual close: Yes Depends on:
|
| GCP: Quota [{#GCE.QUOTA.NAME}] usage is critically close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.CRIT:"{#GCE.QUOTA.NAME}"} |
Average | Manual close: Yes |
GCP by HTTP
Overview
This template is designed to monitor Google Cloud Platform (hereinafter - GCP) by Zabbix. It works without any external scripts and uses the script item. The template currently supports the discovery of Compute Engine/Cloud SQL instances and Compute Engine project quota metrics.
Requirements
Zabbix version: 6.4 and higher.
Tested versions
This template has been tested on:
- Google Cloud Platform
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable the
Stackdriver Monitoring APIfor the GCP project you wish to monitor.
Refer to the vendor documentation.
- Create a service account in Google Cloud console for the project you have to monitor.
Refer to the vendor documentation.
- Create and download the service account key in JSON format.
Refer to the vendor documentation.
- If you want to monitor Cloud SQL services - don't forget to activate the Cloud SQL Admin API.
Refer to the vendor documentation for the details.
- Copy the
project_id,private_key_id,private_key,client_emailfrom the JSON key file and add them to their corresponding macros{$GCP.PROJECT.ID},{$GCP.PRIVATE.KEY.ID},{$GCP.PRIVATE.KEY},{$GCP.CLIENT.EMAIL}on the template/host.
Additional information:
Make sure that you're creating the service account using the credentials with the `Project Owner/Project IAM Admin/service account Admin` role.
The service account JSON key file can only be downloaded once: regenerate it if the previous key has been lost.
The service account should have `Project Viewer` permissions or granular permissions for the GCP Compute Engine API/GCP Cloud SQL.
You can copy and paste private_key string data from the Service Account JSON key file as is or replace the new line metasymbol (\n) with an actual new line.
Please, refer to the vendor documentation about the service accounts management.
IMPORTANT!!!
Secret authorization token is defined as a plain text in host prototype settings by default due to Zabbix templates export/import limits: therefore, it is highly recommended to change the user macro `{$GCP.AUTH.TOKEN}` value type to `SECRET` for all host prototypes after the template `GCP by HTTP` import.
All the instances/quotas/metrics discovered are related to a particular GCP project.
To monitor several GCP projects - create their corresponding service accounts/Zabbix hosts.
GCP Access Token is available for 1 hour (3600 seconds) after the generation request.
To avoid a GCP token inconsistency between Zabbix database and Zabbix server configuration cache, don't set Zabbix server configuration parameter CacheUpdateFrequency to a value over 45 minutes and don't set the update interval for the GCP Authorization item to more than 1 hour (maximum CacheUpdateFrequency value).
Additional information about metrics and used API methods:
Macros used
| Name | Description | Default |
|---|---|---|
| {$GCP.PROJECT.ID} | GCP project ID. |
|
| {$GCP.CLIENT.EMAIL} | Service account client e-mail. |
|
| {$GCP.PRIVATE.KEY.ID} | Service account private key id. |
|
| {$GCP.PRIVATE.KEY} | Service account private key data. |
|
| {$GCP.PROXY} | Sets HTTP proxy value. If this macro is empty then no proxy is used. |
|
| {$GCP.DATA.TIMEOUT} | A response timeout for an API. |
15s |
| {$GCP.AUTH.FREQUENCY} | The update interval for the GCP Authorization item, which also equals to the access token regeneration request frequency. Check the template documentation notes carefully for more details. |
45m |
| {$GCP.GCE.INST.NAME.MATCHES} | The filter to include GCP Compute Engine instances by namespace. |
.* |
| {$GCP.GCE.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.ZONE.MATCHES} | The filter to include GCP Compute Engine instances by zone. |
.* |
| {$GCP.GCE.ZONE.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by namespace. |
.* |
| {$GCP.MYSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by zone. |
.* |
| {$GCP.MYSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by type (standalone/replica). |
.* |
| {$GCP.MYSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by namespace. |
.* |
| {$GCP.PGSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by zone. |
.* |
| {$GCP.PGSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by type (standalone/replica). |
.* |
| {$GCP.PGSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by namespace. |
.* |
| {$GCP.MSSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by zone. |
.* |
| {$GCP.MSSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by type (standalone/replica). |
.* |
| {$GCP.MSSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.QUOTA.MATCHES} | The filter to include GCP Compute Engine project quotas by namespace. |
.* |
| {$GCP.GCE.QUOTA.NOT_MATCHES} | The filter to exclude GCP Compute Engine project quotas by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.QUOTA.PUSED.MIN.WARN} | GCP Compute Engine project quota warning utilization threshold. |
80 |
| {$GCP.GCE.QUOTA.PUSED.MIN.CRIT} | GCP Compute Engine project quota critical quota utilization threshold. |
95 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP: Authorization | Google Cloud Platform REST authorization with service account authentication parameters and temporary-generated RSA-based JWT-token usage. The necessary scopes are pre-defined. Returns a signed authorization token with 1 hour lifetime; it is required only once, and is used for all the dependent script items. Check the template documentation for the details. |
Script | gcp.authorization |
| GCP Compute Engine: Instances get | Get GCP Compute Engine instances. |
Dependent item | gcp.gce.instances.get Preprocessing
|
| GCP: Authorization errors check | A list of errors from API requests. |
Dependent item | gcp.auth.err.check Preprocessing
|
| GCP Cloud SQL: Instances get | GCP Cloud SQL: Instances get. |
Dependent item | gcp.cloudsql.instances.get Preprocessing
|
| GCP Cloud SQL: Instances total | GCP Cloud SQL instances total count. |
Dependent item | gcp.cloudsql.instances.total Preprocessing
|
| GCP Cloud SQL MSSQL: Instances count | GCP Cloud SQL MSSQL instances count. |
Dependent item | gcp.cloudsql.instances.mssql_count Preprocessing
|
| GCP Cloud SQL MySQL: Instances count | GCP Cloud SQL MySQL instances count. |
Dependent item | gcp.cloudsql.instances.mysql_count Preprocessing
|
| GCP Cloud SQL PostgreSQL: Instances count | GCP Cloud SQL PostgreSQL instances count. |
Dependent item | gcp.cloudsql.instances.pgsql_count Preprocessing
|
| GCP Compute Engine: Instances total | GCP Compute Engine instances total count. |
Dependent item | gcp.gce.instances.total Preprocessing
|
| GCP Compute Engine: Regular instances count | GCP Compute Engine: Regular instances count. |
Dependent item | gcp.gce.instances.regular_count Preprocessing
|
| GCP Compute Engine: Container-Optimized instances count | GCP Compute Engine: count of instances with Container-Optimized OS used. |
Dependent item | gcp.gce.instances.cos_count Preprocessing
|
| GCP Compute Engine: Project quotas get | GCP Compute Engine resource quotas available for the particular project. |
Dependent item | gcp.gce.quotas.get Preprocessing
|
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP: Authorization has failed | GCP: Authorization has failed. |
length(last(/GCP by HTTP/gcp.auth.err.check)) > 0 |
Average |
LLD rule GCP Compute Engine: Instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Instances discovery | GCP Compute Engine: Instances discovery. |
Dependent item | gcp.gce.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: PostgreSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: PostgreSQL instances discovery | GCP Cloud SQL: PostgreSQL instances discovery. |
Dependent item | gcp.cloudsql.pgsql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MSSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MSSQL instances discovery | GCP Cloud SQL: MSSQL instances discovery. |
Dependent item | gcp.cloudsql.mssql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MySQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MySQL instances discovery | GCP Cloud SQL: MySQL instances discovery. |
Dependent item | gcp.cloudsql.mysql.inst.discovery Preprocessing
|
LLD rule GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Project quotas discovery | GCP Compute Engine: Quotas discovery. |
Dependent item | gcp.gce.quotas.discovery Preprocessing
|
Item prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}]: Raw data | GCP Compute Engine: Get metrics for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.single.raw[{#GCE.QUOTA.NAME}] Preprocessing
|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}]: Usage | GCP Compute Engine: The current usage value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.usage[{#GCE.QUOTA.NAME}] Preprocessing
|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}]: Limit | GCP Compute Engine: The current limit value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.limit[{#GCE.QUOTA.NAME}] Preprocessing
|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}]: Percentage used | GCP Compute Engine: Percentage usage for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.pused[{#GCE.QUOTA.NAME}] Preprocessing
|
Trigger prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}] limit has been changed | GCP Compute Engine: The limit for the |
change(/GCP by HTTP/gcp.gce.quota.limit[{#GCE.QUOTA.NAME}]) <> 0 |
Info | Manual close: Yes |
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}] usage is close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.WARN:"{#GCE.QUOTA.NAME}"} |
Warning | Manual close: Yes Depends on:
|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}] usage is critically close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.CRIT:"{#GCE.QUOTA.NAME}"} |
Average | Manual close: Yes |
GCP by HTTP
Overview
This template is designed to monitor Google Cloud Platform (hereinafter - GCP) by Zabbix. It works without any external scripts and uses the script item. The template currently supports the discovery of Compute Engine/Cloud SQL instances and Compute Engine project quota metrics.
Requirements
Zabbix version: 6.0 and higher.
Tested versions
This template has been tested on:
- Google Cloud Platform
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable the
Stackdriver Monitoring APIfor the GCP project you wish to monitor.
Refer to the vendor documentation.
- Create a service account in Google Cloud console for the project you have to monitor.
Refer to the vendor documentation.
- Create and download the service account key in JSON format.
Refer to the vendor documentation.
- If you want to monitor Cloud SQL services - don't forget to activate the Cloud SQL Admin API.
Refer to the vendor documentation for the details.
- Copy the
project_id,private_key_id,private_key,client_emailfrom the JSON key file and add them to their corresponding macros{$GCP.PROJECT.ID},{$GCP.PRIVATE.KEY.ID},{$GCP.PRIVATE.KEY},{$GCP.CLIENT.EMAIL}on the template/host.
Additional information:
Make sure that you're creating the service account using the credentials with the `Project Owner/Project IAM Admin/service account Admin` role.
The service account JSON key file can only be downloaded once: regenerate it if the previous key has been lost.
The service account should have `Project Viewer` permissions or granular permissions for the GCP Compute Engine API/GCP Cloud SQL.
You can copy and paste private_key string data from the Service Account JSON key file as is or replace the new line metasymbol (\n) with an actual new line.
Please, refer to the vendor documentation about the service accounts management.
IMPORTANT!!!
Secret authorization token is defined as a plain text in host prototype settings by default due to Zabbix templates export/import limits: therefore, it is highly recommended to change the user macro `{$GCP.AUTH.TOKEN}` value type to `SECRET` for all host prototypes after the template `GCP by HTTP` import.
All the instances/quotas/metrics discovered are related to a particular GCP project.
To monitor several GCP projects - create their corresponding service accounts/Zabbix hosts.
GCP Access Token is available for 1 hour (3600 seconds) after the generation request.
To avoid a GCP token inconsistency between Zabbix database and Zabbix server configuration cache, don't set Zabbix server configuration parameter CacheUpdateFrequency to a value over 45 minutes and don't set the update interval for the GCP Authorization item to more than 1 hour (maximum CacheUpdateFrequency value).
Additional information about metrics and used API methods:
Macros used
| Name | Description | Default |
|---|---|---|
| {$GCP.PROJECT.ID} | GCP project ID. |
|
| {$GCP.CLIENT.EMAIL} | Service account client e-mail. |
|
| {$GCP.PRIVATE.KEY.ID} | Service account private key id. |
|
| {$GCP.PRIVATE.KEY} | Service account private key data. |
|
| {$GCP.PROXY} | Sets HTTP proxy value. If this macro is empty then no proxy is used. |
|
| {$GCP.DATA.TIMEOUT} | A response timeout for an API. |
15s |
| {$GCP.AUTH.FREQUENCY} | The update interval for the GCP Authorization item, which also equals to the access token regeneration request frequency. Check the template documentation notes carefully for more details. |
45m |
| {$GCP.GCE.INST.NAME.MATCHES} | The filter to include GCP Compute Engine instances by namespace. |
.* |
| {$GCP.GCE.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.ZONE.MATCHES} | The filter to include GCP Compute Engine instances by zone. |
.* |
| {$GCP.GCE.ZONE.NOT_MATCHES} | The filter to exclude GCP Compute Engine instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by namespace. |
.* |
| {$GCP.MYSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by zone. |
.* |
| {$GCP.MYSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MYSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MySQL instances by type (standalone/replica). |
.* |
| {$GCP.MYSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MySQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by namespace. |
.* |
| {$GCP.PGSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by zone. |
.* |
| {$GCP.PGSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.PGSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL PostgreSQL instances by type (standalone/replica). |
.* |
| {$GCP.PGSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL PostgreSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.NAME.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by namespace. |
.* |
| {$GCP.MSSQL.INST.NAME.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.ZONE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by zone. |
.* |
| {$GCP.MSSQL.ZONE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by zone. |
CHANGE_IF_NEEDED |
| {$GCP.MSSQL.INST.TYPE.MATCHES} | The filter to include GCP Cloud SQL MSSQL instances by type (standalone/replica). |
.* |
| {$GCP.MSSQL.INST.TYPE.NOT_MATCHES} | The filter to exclude GCP Cloud SQL MSSQL instances by type (standalone/replica). Set a macro value 'CLOUD_SQL_INSTANCE' to exclude standalone Instances or 'READ_REPLICA_INSTANCE' to exclude read-only Replicas. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.QUOTA.MATCHES} | The filter to include GCP Compute Engine project quotas by namespace. |
.* |
| {$GCP.GCE.QUOTA.NOT_MATCHES} | The filter to exclude GCP Compute Engine project quotas by namespace. |
CHANGE_IF_NEEDED |
| {$GCP.GCE.QUOTA.PUSED.MIN.WARN} | GCP Compute Engine project quota warning utilization threshold. |
80 |
| {$GCP.GCE.QUOTA.PUSED.MIN.CRIT} | GCP Compute Engine project quota critical quota utilization threshold. |
95 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP: Authorization | Google Cloud Platform REST authorization with service account authentication parameters and temporary-generated RSA-based JWT-token usage. The necessary scopes are pre-defined. Returns a signed authorization token with 1 hour lifetime; it is required only once, and is used for all the dependent script items. Check the template documentation for the details. |
Script | gcp.authorization |
| GCP Compute Engine: Instances get | Get GCP Compute Engine instances. |
Dependent item | gcp.gce.instances.get Preprocessing
|
| GCP: Authorization errors check | A list of errors from API requests. |
Dependent item | gcp.auth.err.check Preprocessing
|
| GCP Cloud SQL: Instances get | GCP Cloud SQL: Instances get. |
Dependent item | gcp.cloudsql.instances.get Preprocessing
|
| GCP Cloud SQL: Instances total | GCP Cloud SQL instances total count. |
Dependent item | gcp.cloudsql.instances.total Preprocessing
|
| GCP Cloud SQL MSSQL: Instances count | GCP Cloud SQL MSSQL instances count. |
Dependent item | gcp.cloudsql.instances.mssql_count Preprocessing
|
| GCP Cloud SQL MySQL: Instances count | GCP Cloud SQL MySQL instances count. |
Dependent item | gcp.cloudsql.instances.mysql_count Preprocessing
|
| GCP Cloud SQL PostgreSQL: Instances count | GCP Cloud SQL PostgreSQL instances count. |
Dependent item | gcp.cloudsql.instances.pgsql_count Preprocessing
|
| GCP Compute Engine: Instances total | GCP Compute Engine instances total count. |
Dependent item | gcp.gce.instances.total Preprocessing
|
| GCP Compute Engine: Regular instances count | GCP Compute Engine: Regular instances count. |
Dependent item | gcp.gce.instances.regular_count Preprocessing
|
| GCP Compute Engine: Container-Optimized instances count | GCP Compute Engine: count of instances with Container-Optimized OS used. |
Dependent item | gcp.gce.instances.cos_count Preprocessing
|
| GCP Compute Engine: Project quotas get | GCP Compute Engine resource quotas available for the particular project. |
Dependent item | gcp.gce.quotas.get Preprocessing
|
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP: Authorization has failed | GCP: Authorization has failed. |
length(last(/GCP by HTTP/gcp.auth.err.check)) > 0 |
Average |
LLD rule GCP Compute Engine: Instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Instances discovery | GCP Compute Engine: Instances discovery. |
Dependent item | gcp.gce.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: PostgreSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: PostgreSQL instances discovery | GCP Cloud SQL: PostgreSQL instances discovery. |
Dependent item | gcp.cloudsql.pgsql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MSSQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MSSQL instances discovery | GCP Cloud SQL: MSSQL instances discovery. |
Dependent item | gcp.cloudsql.mssql.inst.discovery Preprocessing
|
LLD rule GCP Cloud SQL: MySQL instances discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Cloud SQL: MySQL instances discovery | GCP Cloud SQL: MySQL instances discovery. |
Dependent item | gcp.cloudsql.mysql.inst.discovery Preprocessing
|
LLD rule GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Project quotas discovery | GCP Compute Engine: Quotas discovery. |
Dependent item | gcp.gce.quotas.discovery Preprocessing
|
Item prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}]: Raw data | GCP Compute Engine: Get metrics for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.single.raw[{#GCE.QUOTA.NAME}] Preprocessing
|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}]: Usage | GCP Compute Engine: The current usage value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.usage[{#GCE.QUOTA.NAME}] Preprocessing
|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}]: Limit | GCP Compute Engine: The current limit value for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.limit[{#GCE.QUOTA.NAME}] Preprocessing
|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}]: Percentage used | GCP Compute Engine: Percentage usage for [{#GCE.QUOTA.NAME}] quota. |
Dependent item | gcp.gce.quota.pused[{#GCE.QUOTA.NAME}] Preprocessing
|
Trigger prototypes for GCP Compute Engine: Project quotas discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}] limit has been changed | GCP Compute Engine: The limit for the |
change(/GCP by HTTP/gcp.gce.quota.limit[{#GCE.QUOTA.NAME}]) <> 0 |
Info | Manual close: Yes |
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}] usage is close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.WARN:"{#GCE.QUOTA.NAME}"} |
Warning | Manual close: Yes Depends on:
|
| GCP Compute Engine: Quota [{#GCE.QUOTA.NAME}] usage is critically close to reaching the limit | GCP Compute Engine: The usage percentage for the |
last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.CRIT:"{#GCE.QUOTA.NAME}"} |
Average | Manual close: Yes |