# 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](https://cloud.google.com/compute)/[Cloud SQL](https://cloud.google.com/sql) instances and 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](https://www.zabbix.com/documentation/7.0/manual/config/templates_out_of_the_box) section. ## Setup 1. Enable the `Stackdriver Monitoring API` for the GCP project you wish to monitor. >Refer to the [vendor documentation](https://cloud.google.com/monitoring/api/enable-api). 2. Create a service account in Google Cloud console for the project you have to monitor. >Refer to the [vendor documentation](https://cloud.google.com/iam/docs/creating-managing-service-accounts). 3. Create and download the service account key in JSON format. >Refer to the [vendor documentation](https://cloud.google.com/iam/docs/creating-managing-service-account-keys). 4. If you want to monitor Cloud SQL services - don't forget to activate the Cloud SQL Admin API. >Refer to the [vendor documentation](https://cloud.google.com/sql/docs/mysql/admin-api) for the details. 5. Copy the `project_id`, `private_key_id`, `private_key`, `client_email` from 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](https://cloud.google.com/iam/docs/manage-access-service-accounts) 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: [Compute Engine](https://cloud.google.com/monitoring/api/metrics_gcp#gcp-compute) [Cloud SQL](https://cloud.google.com/monitoring/api/metrics_gcp#gcp-cloudsql) ### 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.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**
JavaScript: `The text is too long. Please see the template.`
A list of errors from API requests.
|Dependent item|gcp.auth.err.check**Preprocessing**
JSON Path: `$.error`
⛔️Custom on fail: Set value to: ``
GCP Cloud SQL: Instances get.
|Dependent item|gcp.cloudsql.instances.get**Preprocessing**
JavaScript: `The text is too long. Please see the template.`
GCP Cloud SQL instances total count.
|Dependent item|gcp.cloudsql.instances.total**Preprocessing**
JSON Path: `$.[*].length()`
GCP Cloud SQL MSSQL instances count.
|Dependent item|gcp.gce.instances.mssql_count**Preprocessing**
JSON Path: `$[?(@.db_type =~ 'SQLSERVER')].length()`
⛔️Custom on fail: Discard value
GCP Cloud SQL MySQL instances count.
|Dependent item|gcp.gce.instances.mysql_count**Preprocessing**
JSON Path: `$[?(@.db_type =~ 'MYSQL')].length()`
⛔️Custom on fail: Discard value
GCP Cloud SQL PostgreSQL instances count.
|Dependent item|gcp.gce.instances.pgsql_count**Preprocessing**
JSON Path: `$[?(@.db_type =~ 'POSTGRES')].length()`
⛔️Custom on fail: Discard value
GCP Compute Engine instances total count.
|Dependent item|gcp.gce.instances.total**Preprocessing**
JSON Path: `$.[*].length()`
⛔️Custom on fail: Discard value
GCP Compute Engine: Regular instances count.
|Dependent item|gcp.gce.instances.regular_count**Preprocessing**
JSON Path: `$[?(@.i_type == 'regular')].length()`
⛔️Custom on fail: Discard value
GCP Compute Engine: count of instances with Container-Optimized OS used.
|Dependent item|gcp.gce.instances.cos_count**Preprocessing**
JSON Path: `$[?(@.i_type == 'container-optimized')].length()`
⛔️Custom on fail: Discard value
GCP Compute Engine resource quotas available for the particular project.
|Dependent item|gcp.gce.quotas.get**Preprocessing**
JavaScript: `The text is too long. Please see the template.`
GCP: Authorization has failed.
Check the authorization parameters and GCP API availability from a network segment, where Zabbix-server/proxy is located.
GCP Compute Engine: Instances discovery.
|Dependent item|gcp.gce.inst.discovery**Preprocessing**
Discard unchanged with heartbeat: `3h`
GCP Cloud SQL: PostgreSQL instances discovery.
|Dependent item|gcp.cloudsql.pgsql.inst.discovery**Preprocessing**
Discard unchanged with heartbeat: `3h`
GCP Cloud SQL: MSSQL instances discovery.
|Dependent item|gcp.cloudsql.mssql.inst.discovery**Preprocessing**
Discard unchanged with heartbeat: `3h`
GCP Cloud SQL: MySQL instances discovery.
|Dependent item|gcp.cloudsql.mysql.inst.discovery**Preprocessing**
Discard unchanged with heartbeat: `3h`
GCP Compute Engine: Quotas discovery.
|Dependent item|gcp.gce.quotas.discovery**Preprocessing**
Discard unchanged with heartbeat: `3h`
GCP Compute Engine: Get metrics for [{#GCE.QUOTA.NAME}] quota.
|Dependent item|gcp.gce.quota.single.raw[{#GCE.QUOTA.NAME}]**Preprocessing**
JSON Path: `$[?(@.metric == "{#GCE.QUOTA.NAME}")].first()`
GCP Compute Engine: The current usage value for [{#GCE.QUOTA.NAME}] quota.
|Dependent item|gcp.gce.quota.usage[{#GCE.QUOTA.NAME}]**Preprocessing**
JSON Path: `$.usage`
GCP Compute Engine: The current limit value for [{#GCE.QUOTA.NAME}] quota.
|Dependent item|gcp.gce.quota.limit[{#GCE.QUOTA.NAME}]**Preprocessing**
JSON Path: `$.limit`
GCP Compute Engine: Percentage usage for [{#GCE.QUOTA.NAME}] quota.
|Dependent item|gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
JSON Path: `$.p_used`
GCP Compute Engine: The limit for the `{#GCE.QUOTA.NAME}` quota has been changed.
|`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 `{#GCE.QUOTA.NAME}` quota is close to reaching the limit.
|`last(/GCP by HTTP/gcp.gce.quota.pused[{#GCE.QUOTA.NAME}]) >= {$GCP.GCE.QUOTA.PUSED.MIN.WARN:"{#GCE.QUOTA.NAME}"}`|Warning|**Manual close**: YesGCP Compute Engine: The usage percentage for the `{#GCE.QUOTA.NAME}` quota is critically close to reaching the limit.
|`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 Compute Engine Instance by HTTP ## Overview This template is designed to monitor Google Cloud Platform Compute Engine instances by Zabbix. ## Requirements Zabbix version: 7.0 and higher. ## Tested versions This template has been tested on: - GCP Compute Engine ## Configuration > Zabbix should be configured according to the instructions in the [Templates out of the box](https://www.zabbix.com/documentation/7.0/manual/config/templates_out_of_the_box) section. ## Setup This template will be automatically connected to discovered entities with all their required parameters pre-defined. ### Macros used |Name|Description|Default| |----|-----------|-------| |{$GCP.DATA.TIMEOUT}|A response timeout for an API.
|`15s`| |{$GCP.TIME.WINDOW}|Time interval for the data requests.
Supported usage type:
1. The default update interval for most of the items.
2. The minimal time window for the data requested in the Monitoring Query Language REST API request.
|`5m`| |{$GCE.DISK.NAME.MATCHES}|The filter to include GCP Compute Engine disks by namespace.
|`.*`| |{$GCE.DISK.NAME.NOT_MATCHES}|The filter to exclude GCP Compute Engine disks by namespace.
|`CHANGE_IF_NEEDED`| |{$GCE.DISK.DEV_TYPE.MATCHES}|The filter to include GCP Compute Engine disks by device type.
|`.*`| |{$GCE.DISK.DEV_TYPE.NOT_MATCHES}|The filter to exclude GCP Compute Engine disks by device type.
|`CHANGE_IF_NEEDED`| |{$GCE.DISK.STOR_TYPE.MATCHES}|The filter to include GCP Compute Engine disks by storage type.
|`.*`| |{$GCE.DISK.STOR_TYPE.NOT_MATCHES}|The filter to exclude GCP Compute Engine disks by storage type.
|`CHANGE_IF_NEEDED`| |{$GCE.CPU.UTIL.MAX}|GCP Compute Engine instance CPU utilization threshold.
|`95`| |{$GCE.RAM.UTIL.MAX}|GCP Compute Engine instance RAM utilization threshold.
|`90`| ### Items |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |GCP Compute Engine: Metrics get|GCP Compute Engine metrics get in raw format.
|Script|gcp.gce.metrics.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
Count of incoming packets dropped by the firewall.
|Dependent item|gcp.gce.firewall.dropped_packets_count**Preprocessing**
JSON Path: `$.dropped_packets_count`
Count of incoming bytes dropped by the firewall.
|Dependent item|gcp.gce.firewall.dropped_bytes_count**Preprocessing**
JSON Path: `$.dropped_bytes_count`
Number of vCPUs visible inside the guest.
For many GCE machine types, the number of vCPUs visible inside the guest is equal to the `compute.googleapis.com/instance/cpu/reserved_cores` metric.
For shared-core machine types, the number of guest-visible vCPUs differs from the number of reserved cores.
For example, e2-small instances have two vCPUs visible inside the guest and 0.5 fractional vCPUs reserved.
Therefore, for an e2-small instance, `compute.googleapis.com/instance/cpu/guest_visible_vcpus` has a value of 2 and `compute.googleapis.com/instance/cpu/reserved_cores` has a value of 0.5.
|Dependent item|gcp.gce.cpu.guest_visible_vcpus**Preprocessing**
JSON Path: `$.guest_visible_vcpus`
Number of vCPUs reserved on the host of the instance.
|Dependent item|gcp.gce.cpu.reserved_cores**Preprocessing**
JSON Path: `$.reserved_cores`
Wait time is the time a vCPU is ready to run, but unexpectedly not scheduled to run.
The wait time returned here is the accumulated value for all vCPUs.
The time interval for which the value was measured is returned by Monitoring in whole seconds as start_time and end_time.
This metric is only available for VMs that belong to the e2 family or to overcommitted VMs on sole-tenant nodes.
|Dependent item|gcp.gce.cpu.scheduler_wait_time**Preprocessing**
JSON Path: `$.scheduler_wait_time`
⛔️Custom on fail: Discard value
Delta vCPU usage for all vCPUs, in vCPU-seconds.
To compute the per-vCPU utilization fraction, divide this value by (end-start)*N, where end and start define this value's time interval and N is `compute.googleapis.com/instance/cpu/reserved_cores` at the end of the interval.
This value is reported by the hypervisor for the VM and can differ from `agent.googleapis.com/cpu/usage_time`, which is reported from inside the VM.
|Dependent item|gcp.gce.cpu.usage_time**Preprocessing**
JSON Path: `$.usage_time`
Fractional utilization of allocated CPU on this instance.
This metric is reported by the hypervisor for the VM and can differ from `agent.googleapis.com/cpu/utilization`, which is reported from inside the VM.
|Dependent item|gcp.gce.cpu.utilization**Preprocessing**
JSON Path: `$.utilization`
Custom multiplier: `100`
Total VM memory size.
This metric is only available for VMs that belong to the e2 family; returns empty value for different instance types.
|Dependent item|gcp.gce.memory.ram_size**Preprocessing**
JSON Path: `$.ram_size`
⛔️Custom on fail: Discard value
Memory currently used in the VM.
This metric is only available for VMs that belong to the e2 family; returns empty value for different instance types.
|Dependent item|gcp.gce.memory.ram_used**Preprocessing**
JSON Path: `$.ram_used`
⛔️Custom on fail: Discard value
Memory usage Percentage.
This metric is only available for VMs that belong to the e2 family; returns empty value for different instance types.
|Dependent item|gcp.gce.memory.ram_pused**Preprocessing**
JSON Path: `$.ram_pused`
⛔️Custom on fail: Discard value
The amount of memory read into the guest from its own swap space.
This metric is only available for VMs that belong to the e2 family; returns empty value for different instance types.
|Dependent item|gcp.gce.memory.swap_in_bytes_count**Preprocessing**
JSON Path: `$.swap_in_bytes_count`
⛔️Custom on fail: Discard value
The amount of memory written from the guest to its own swap space.
This metric is only available for VMs that belong to the e2 family; returns empty value for different instance types.
|Dependent item|gcp.gce.memory.swap_out_bytes_count**Preprocessing**
JSON Path: `$.swap_out_bytes_count`
⛔️Custom on fail: Discard value
Count of bytes received from the network without load-balancing.
|Dependent item|gcp.gce.network.lb.received_bytes_count.false**Preprocessing**
JSON Path: `$.received_bytes_count.false`
Whether traffic was received by an L3 loadbalanced IP address assigned to the VM.
Traffic that is externally routed to the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric.
The value is empty when load-balancing is not used.
|Dependent item|gcp.gce.network.lb.received_bytes_count.true**Preprocessing**
JSON Path: `$.received_bytes_count.true`
⛔️Custom on fail: Discard value
Count of packets received from the network without load-balancing.
|Dependent item|gcp.gce.network.lb.received_packets_count.false**Preprocessing**
JSON Path: `$.received_packets_count.false`
Whether traffic was received by an L3 loadbalanced IP address assigned to the VM.
Traffic that is externally routed to the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric.
The value is empty when load-balancing is not used.
|Dependent item|gcp.gce.network.lb.received_packets_count.true**Preprocessing**
JSON Path: `$.received_packets_count.true`
⛔️Custom on fail: Discard value
Count of bytes sent over the network without load-balancing.
|Dependent item|gcp.gce.network.lb.sent_bytes_count.false**Preprocessing**
JSON Path: `$.sent_bytes_count.false`
Whether traffic was received by an L3 loadbalanced IP address assigned to the VM.
Traffic that is externally routed to the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric.
The value is empty when load-balancing is not used.
|Dependent item|gcp.gce.network.lb.sent_bytes_count.true**Preprocessing**
JSON Path: `$.sent_bytes_count.true`
⛔️Custom on fail: Discard value
Count of packets sent over the network without load-balancing.
|Dependent item|gcp.gce.network.lb.sent_packets_count.false**Preprocessing**
JSON Path: `$.sent_packets_count.false`
Whether traffic was received by an L3 loadbalanced IP address assigned to the VM.
Traffic that is externally routed to the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric.
The value is empty when load-balancing is not used.
|Dependent item|gcp.gce.network.lb.sent_packets_count.true**Preprocessing**
JSON Path: `$.sent_packets_count.true`
⛔️Custom on fail: Discard value
The count of mirrored bytes.
|Dependent item|gcp.gce.network.mirrored_bytes_count**Preprocessing**
JSON Path: `$.mirrored_bytes_count`
The count of mirrored packets.
|Dependent item|gcp.gce.network.mirrored_packets_count**Preprocessing**
JSON Path: `$.mirrored_packets_count`
The count of mirrored packets dropped.
Reason - out of quota.
|Dependent item|gcp.gce.network.mirr_dropped_packets.out_of_quota**Preprocessing**
JSON Path: `$.out_of_quota`
The count of mirrored packets dropped.
Reason - unknown.
|Dependent item|gcp.gce.network.mirr_dropped_packets.unknown**Preprocessing**
JSON Path: `$.unknown`
The count of mirrored packets dropped.
Reason - invalid.
|Dependent item|gcp.gce.network.mirr_dropped_packets.invalid**Preprocessing**
JSON Path: `$.invalid`
The validation status of early boot integrity policy.
Empty value if integrity monitoring isn't enabled.
|Dependent item|gcp.gce.integrity.early_boot_validation_status**Preprocessing**
JSON Path: `$.early_boot_validation_status`
⛔️Custom on fail: Discard value
JavaScript: `The text is too long. Please see the template.`
The validation status of late boot integrity policy.
Empty value if integrity monitoring isn't enabled.
|Dependent item|gcp.gce.integrity.late_boot_validation_status**Preprocessing**
JSON Path: `$.late_boot_validation_status`
⛔️Custom on fail: Discard value
JavaScript: `The text is too long. Please see the template.`
Elapsed time since the VM was started, in seconds.
|Dependent item|gcp.gce.instance.uptime**Preprocessing**
JSON Path: `$.uptime_total`
GCP Compute Engine instance state.
|HTTP agent|gcp.gce.instance.state**Preprocessing**
JSON Path: `$.status`
⛔️Custom on fail: Set value to: `10`
JavaScript: `The text is too long. Please see the template.`
Discard unchanged with heartbeat: `10m`
Disk entities and metrics related to a particular instance.
|Script|gcp.gce.disks.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
The CPU utilization is too high. The system might be slow to respond.
|`min(/GCP Compute Engine Instance by HTTP/gcp.gce.cpu.utilization,15m) >= {$GCE.CPU.UTIL.MAX}`|Average|**Manual close**: Yes| |GCP Compute Engine: High memory utilization|RAM utilization is too high. The system might be slow to respond.
|`min(/GCP Compute Engine Instance by HTTP/gcp.gce.memory.ram_pused,15m) >= {$GCE.RAM.UTIL.MAX}`|Average|| |GCP Compute Engine: Instance is in suspended state|The VM is in a suspended state. You can resume the VM or delete it.
|`last(/GCP Compute Engine Instance by HTTP/gcp.gce.instance.state) = 7`|Info|**Manual close**: Yes| |GCP Compute Engine: The instance is in repairing state|The VM is being repaired.
Repairing occurs when the VM encounters an internal error or the underlying machine is unavailable due to maintenance.
During this time, the VM is unusable.
The VM is stopped. You stopped the VM, or the VM encountered a failure.
|`last(/GCP Compute Engine Instance by HTTP/gcp.gce.instance.state) = 5`|Average|**Manual close**: Yes| |GCP Compute Engine: Failed to get the instance state|Failed to get the instance state.
Check access permissions to GCP API or service account.
GCP Compute Engine: Physical disks discovery.
|Dependent item|gcp.gce.phys.disks.discovery**Preprocessing**
Discard unchanged with heartbeat: `3h`
Data in raw format for the disk with the name [{#GCE.DISK.NAME}].
|Dependent item|gcp.gce.quota.single.raw[{#GCE.DISK.NAME}]**Preprocessing**
JSON Path: `$[?(@.disk_name == "{#GCE.DISK.NAME}")].metrics.first()`
Count of bytes read from [{#GCE.DISK.NAME}] disk.
|Dependent item|gcp.gce.disk.read_bytes_count[{#GCE.DISK.NAME}]**Preprocessing**
JSON Path: `$.read_bytes_count`
Count of read IO operations from [{#GCE.DISK.NAME}] disk.
|Dependent item|gcp.gce.disk.read_ops_count[{#GCE.DISK.NAME}]**Preprocessing**
JSON Path: `$.read_ops_count`
Count of bytes written to {#GCE.DISK.NAME}] disk.
|Dependent item|gcp.gce.disk.write_bytes_count[{#GCE.DISK.NAME}]**Preprocessing**
JSON Path: `$.write_bytes_count`
Count of write IO operations to [{#GCE.DISK.NAME}] disk.
|Dependent item|gcp.gce.disk.write_ops_count[{#GCE.DISK.NAME}]**Preprocessing**
JSON Path: `$.write_ops_count`
A response timeout for an API.
|`15s`| |{$GCP.TIME.WINDOW}|Time interval for the data requests.
Supported usage type:
1. The default update interval for most of the items.
2. The minimal time window for the data requested in the Monitoring Query Language REST API request.
|`5m`| |{$CLOUD_SQL.MYSQL.DISK.UTIL.WARN}|GCP Cloud SQL MySQL instance warning disk usage threshold.
|`80`| |{$CLOUD_SQL.MYSQL.DISK.UTIL.CRIT}|GCP Cloud SQL MySQL instance critical disk usage threshold.
|`90`| |{$CLOUD_SQL.MYSQL.CPU.UTIL.MAX}|GCP Cloud SQL MySQL instance CPU usage threshold.
|`95`| |{$CLOUD_SQL.MYSQL.RAM.UTIL.MAX}|GCP Cloud SQL MySQL instance RAM usage threshold.
|`90`| ### Items |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |GCP Cloud SQL MySQL: Metrics get|MySQL metrics in raw format.
|Script|gcp.cloudsql.mysql.metrics.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
Number of cores reserved for the database.
|Dependent item|gcp.cloudsql.mysql.cpu.reserved_cores**Preprocessing**
JSON Path: `$.base_reserved_cores`
Cumulative CPU usage time in seconds.
|Dependent item|gcp.cloudsql.mysql.cpu.usage_time**Preprocessing**
JSON Path: `$.base_usage_time`
Current CPU utilization represented as a percentage of the reserved CPU that is currently in use.
|Dependent item|gcp.cloudsql.mysql.cpu.utilization**Preprocessing**
JSON Path: `$.base_utilization`
Custom multiplier: `100`
Maximum data disk size in bytes.
|Dependent item|gcp.cloudsql.mysql.disk.quota**Preprocessing**
JSON Path: `$.mysql_quota`
Data utilization in bytes.
|Dependent item|gcp.cloudsql.mysql.disk.bytes_used**Preprocessing**
JSON Path: `$.mysql_bytes_used`
Delta count of data disk read I/O operations.
|Dependent item|gcp.cloudsql.mysql.disk.read_ops_count**Preprocessing**
JSON Path: `$.base_read_ops_count`
Delta count of data disk write I/O operations.
|Dependent item|gcp.cloudsql.mysql.disk.write_ops_count**Preprocessing**
JSON Path: `$.base_write_ops_count`
The fraction of the disk quota that is currently in use.
Shown as percentage.
|Dependent item|gcp.cloudsql.mysql.disk.utilization**Preprocessing**
JSON Path: `$.mysql_utilization`
Custom multiplier: `100`
Maximum RAM size in bytes.
|Dependent item|gcp.cloudsql.mysql.memory.quota**Preprocessing**
JSON Path: `$.base_quota`
Total RAM usage in bytes.
This metric reports the RAM usage of the database process, including the buffer/cache.
|Dependent item|gcp.cloudsql.mysql.memory.total_usage**Preprocessing**
JSON Path: `$.base_total_usage`
The RAM usage in bytes.
This metric reports the RAM usage of the server, excluding the buffer/cache.
|Dependent item|gcp.cloudsql.mysql.memory.usage**Preprocessing**
JSON Path: `$.base_usage`
The fraction of the memory quota that is currently in use.
Shown as percentage.
|Dependent item|gcp.cloudsql.mysql.memory.utilization**Preprocessing**
JSON Path: `$.base_ram_pused`
Delta count of bytes received through the network.
|Dependent item|gcp.cloudsql.mysql.network.received_bytes_count**Preprocessing**
JSON Path: `$.base_received_bytes_count`
Delta count of bytes sent through the network.
|Dependent item|gcp.cloudsql.mysql.network.sent_bytes_count**Preprocessing**
JSON Path: `$.base_sent_bytes_count`
Number of connections to the databases on the Cloud SQL instance.
|Dependent item|gcp.cloudsql.mysql.network.connections**Preprocessing**
JSON Path: `$.base_connections`
GCP Cloud SQL MySQL Current instance state.
|HTTP agent|gcp.cloudsql.mysql.inst.state**Preprocessing**
JSON Path: `$.timeSeriesData[0].pointData[0].values[0].stringValue`
⛔️Custom on fail: Set value to: `10`
JavaScript: `The text is too long. Please see the template.`
Discard unchanged with heartbeat: `10m`
GCP Cloud SQL MySQL DB Engine State.
|HTTP agent|gcp.cloudsql.mysql.db.state**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
JSON Path: `$.timeSeriesData[0].pointData[0].values[0].int64Value`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `10m`
Number of unflushed pages in the InnoDB buffer pool.
|Dependent item|gcp.cloudsql.mysql.innodb_buffer_pool_pages_dirty**Preprocessing**
JSON Path: `$.mysql_innodb_buffer_pool_pages_dirty`
Number of unused pages in the InnoDB buffer pool.
|Dependent item|gcp.cloudsql.mysql.innodb_buffer_pool_pages_free**Preprocessing**
JSON Path: `$.mysql_innodb_buffer_pool_pages_free`
Total number of pages in the InnoDB buffer pool.
|Dependent item|gcp.cloudsql.mysql.innodb_buffer_pool_pages_total**Preprocessing**
JSON Path: `$.mysql_innodb_buffer_pool_pages_total`
Delta count of InnoDB fsync() calls.
|Dependent item|gcp.cloudsql.mysql.innodb_data_fsyncs**Preprocessing**
JSON Path: `$.mysql_innodb_data_fsyncs`
Delta count of InnoDB fsync() calls to the log file.
|Dependent item|gcp.cloudsql.mysql.innodb_os_log_fsyncs**Preprocessing**
JSON Path: `$.mysql_innodb_os_log_fsyncs`
Delta count of InnoDB pages read.
|Dependent item|gcp.cloudsql.mysql.innodb_pages_read**Preprocessing**
JSON Path: `$.mysql_innodb_pages_read`
Delta count of InnoDB pages written.
|Dependent item|gcp.cloudsql.mysql.innodb_pages_written**Preprocessing**
JSON Path: `$.mysql_innodb_pages_written`
The number of tables that are currently open.
|Dependent item|gcp.cloudsql.mysql.open_tables**Preprocessing**
JSON Path: `$.mysql_open_tables`
The number of table definitions that are currently cached.
|Dependent item|gcp.cloudsql.mysql.open_table_definitions**Preprocessing**
JSON Path: `$.mysql_open_table_definitions`
Delta of statements executed by the server.
|Dependent item|gcp.cloudsql.queries**Preprocessing**
JSON Path: `$.mysql_queries`
Delta of statements executed by the server sent by the client.
|Dependent item|gcp.cloudsql.questions**Preprocessing**
JSON Path: `$.mysql_questions`
Delta count of bytes received by MySQL process.
|Dependent item|gcp.cloudsql.mysql_received_bytes_count**Preprocessing**
JSON Path: `$.mysql_received_bytes_count`
Delta count of bytes sent by MySQL process.
|Dependent item|gcp.cloudsql.mysql_sent_bytes_count**Preprocessing**
JSON Path: `$.mysql_sent_bytes_count`
The CPU utilization is too high. The system might be slow to respond.
|`min(/GCP Cloud SQL MySQL by HTTP/gcp.cloudsql.mysql.cpu.utilization,5m) >= {$CLOUD_SQL.MYSQL.CPU.UTIL.MAX}`|Average|| |GCP Cloud SQL MySQL: Disk space is low|High utilization of the storage space.
|`last(/GCP Cloud SQL MySQL by HTTP/gcp.cloudsql.mysql.disk.utilization) >= {$CLOUD_SQL.MYSQL.DISK.UTIL.WARN}`|Warning|**Depends on**:Critical utilization of the disk space.
|`last(/GCP Cloud SQL MySQL by HTTP/gcp.cloudsql.mysql.disk.utilization) >= {$CLOUD_SQL.MYSQL.DISK.UTIL.CRIT}`|Average|| |GCP Cloud SQL MySQL: High memory utilization|RAM utilization is too high. The system might be slow to respond.
|`min(/GCP Cloud SQL MySQL by HTTP/gcp.cloudsql.mysql.memory.utilization,5m) >= {$CLOUD_SQL.MYSQL.RAM.UTIL.MAX}`|High|| |GCP Cloud SQL MySQL: Instance is in suspended state|The instance is in suspended state.
It is not available, for example, due to problems with billing.
The instance has been stopped by the owner.
It is not currently running, but it's ready to be restarted.
The instance is down for maintenance.
|`last(/GCP Cloud SQL MySQL by HTTP/gcp.cloudsql.mysql.inst.state) = 4`|Info|| |GCP Cloud SQL MySQL: Instance is in failed state|The instance creation failed, or an operation left the instance in an own bad state.
The state of the instance is unknown.
Failed to get the instance state.
Check access permissions to GCP API or service account.
Database engine is down.
If an instance experiences unplanned (non-maintenance) downtime, the instance state will still be RUNNING, but the database engine state metric will report 0.
A response timeout for an API.
|`15s`| |{$GCP.TIME.WINDOW}|Time interval for the data requests.
Supported usage type:
1. The default update interval for most of the items.
2. The minimal time window for the data requested in the Monitoring Query Language REST API request.
|`5m`| ### Items |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |GCP Cloud SQL MySQL: Replica metrics get|MySQL replication metrics data in raw format.
|Script|gcp.cloudsql.mysql.repl.metrics.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
The error number of the most recent error that caused the I/O thread to stop.
|Dependent item|gcp.cloudsql.mysql.repl.last_io_errno**Preprocessing**
JSON Path: `$.last_io_errno`
The error number of the most recent error that caused the SQL thread to stop.
|Dependent item|gcp.cloudsql.mysql.repl.last_sql_errno**Preprocessing**
JSON Path: `$.last_sql_errno`
Number of seconds the read replica is behind its primary (approximation).
|Dependent item|gcp.cloudsql.mysql.repl.replica_lag**Preprocessing**
JSON Path: `$.replica_lag`
Indicates time taken from primary binary log to IO thread on replica.
|Dependent item|gcp.cloudsql.mysql.repl.network_lag**Preprocessing**
JSON Path: `$.network_lag`
The current serving state of replication.
This metric is only available for the MySQL/PostgreSQL instances.
|Dependent item|gcp.cloudsql.mysql.repl.state**Preprocessing**
JSON Path: `$.state`
JavaScript: `The text is too long. Please see the template.`
Indicates whether the I/O thread for reading the primary's binary log is running.
Possible values are Yes, No and Connecting.
|Dependent item|gcp.cloudsql.mysql.repl.slave_io_running**Preprocessing**
JSON Path: `$.slave_io_running`
JavaScript: `The text is too long. Please see the template.`
Indicates whether the SQL thread for executing events in the relay log is running.
|Dependent item|gcp.cloudsql.mysql.repl.slave_sql_running**Preprocessing**
JSON Path: `$.slave_sql_running`
A response timeout for an API.
|`15s`| |{$GCP.TIME.WINDOW}|Time interval for the data requests.
Supported usage type:
1. The default update interval for most of the items.
2. The minimal time window for the data requested in the Monitoring Query Language REST API request.
|`5m`| |{$GCP.CLOUD_SQL.DB.NAME.MATCHES}|The filter to include GCP Cloud SQL PostgreSQL databases by namespace.
|`.*`| |{$GCP.CLOUD_SQL.DB.NAME.NOT_MATCHES}|The filter to exclude GCP Cloud SQL PostgreSQL databases by namespace.
|`CHANGE_IF_NEEDED`| |{$CLOUD_SQL.PGSQL.DISK.UTIL.WARN}|GCP Cloud SQL PostgreSQL instance warning disk usage threshold.
|`80`| |{$CLOUD_SQL.PGSQL.DISK.UTIL.CRIT}|GCP Cloud SQL PostgreSQL instance critical disk usage threshold.
|`90`| |{$CLOUD_SQL.PGSQL.CPU.UTIL.MAX}|GCP Cloud SQL PostgreSQL instance CPU usage threshold.
|`95`| |{$CLOUD_SQL.PGSQL.RAM.UTIL.MAX}|GCP Cloud SQL PostgreSQL instance RAM usage threshold.
|`90`| ### Items |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |GCP Cloud SQL PostgreSQL: Metrics get|PostgreSQL metrics data in raw format.
|Script|gcp.cloudsql.pgsql.metrics.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
Number of cores reserved for the database.
|Dependent item|gcp.cloudsql.pgsql.cpu.reserved_cores**Preprocessing**
JSON Path: `$.base_reserved_cores`
Cumulative CPU usage time in seconds.
|Dependent item|gcp.cloudsql.pgsql.cpu.usage_time**Preprocessing**
JSON Path: `$.base_usage_time`
Current CPU utilization represented as a percentage of the reserved CPU that is currently in use.
|Dependent item|gcp.cloudsql.pgsql.cpu.utilization**Preprocessing**
JSON Path: `$.base_utilization`
Custom multiplier: `100`
Maximum data disk size in bytes.
|Dependent item|gcp.cloudsql.pgsql.disk.quota**Preprocessing**
JSON Path: `$.pgsql_quota`
Data utilization in bytes.
|Dependent item|gcp.cloudsql.pgsql.disk.bytes_used**Preprocessing**
JSON Path: `$.pgsql_bytes_used`
Delta count of data disk read I/O operations.
|Dependent item|gcp.cloudsql.pgsql.disk.read_ops_count**Preprocessing**
JSON Path: `$.base_read_ops_count`
Delta count of data disk write I/O operations.
|Dependent item|gcp.cloudsql.pgsql.disk.write_ops_count**Preprocessing**
JSON Path: `$.base_write_ops_count`
The fraction of the disk quota that is currently in use.
Shown as percentage.
|Dependent item|gcp.cloudsql.pgsql.disk.utilization**Preprocessing**
JSON Path: `$.pgsql_utilization`
Custom multiplier: `100`
Maximum RAM size in bytes.
|Dependent item|gcp.cloudsql.pgsql.memory.quota**Preprocessing**
JSON Path: `$.base_quota`
Total RAM usage in bytes.
This metric reports the RAM usage of the database process, including the buffer/cache.
|Dependent item|gcp.cloudsql.pgsql.memory.total_usage**Preprocessing**
JSON Path: `$.base_total_usage`
The RAM usage in bytes.
This metric reports the RAM usage of the server, excluding the buffer/cache.
|Dependent item|gcp.cloudsql.pgsql.memory.usage**Preprocessing**
JSON Path: `$.base_usage`
The fraction of the memory quota that is currently in use.
Shown as percentage.
|Dependent item|gcp.cloudsql.pgsql.memory.utilization**Preprocessing**
JSON Path: `$.base_ram_pused`
Delta count of bytes received through the network.
|Dependent item|gcp.cloudsql.pgsql.network.received_bytes_count**Preprocessing**
JSON Path: `$.base_received_bytes_count`
Delta count of bytes sent through the network.
|Dependent item|gcp.cloudsql.pgsql.network.sent_bytes_count**Preprocessing**
JSON Path: `$.base_sent_bytes_count`
GCP Cloud SQL PostgreSQL Current instance state.
|HTTP agent|gcp.cloudsql.pgsql.inst.state**Preprocessing**
JSON Path: `$.timeSeriesData[0].pointData[0].values[0].stringValue`
⛔️Custom on fail: Set value to: `10`
JavaScript: `The text is too long. Please see the template.`
Discard unchanged with heartbeat: `10m`
GCP Cloud SQL PostgreSQL DB Engine State.
|HTTP agent|gcp.cloudsql.pgsql.db.state**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
JSON Path: `$.timeSeriesData[0].pointData[0].values[0].int64Value`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `10m`
Current utilization represented as a percentage of transaction IDs consumed by the Cloud SQL PostgreSQL instance.
|Dependent item|gcp.cloudsql.pgsql.transaction_id_utilization**Preprocessing**
JSON Path: `$.pgsql_transaction_id_utilization`
Custom multiplier: `100`
Delta count of assigned transaction IDs.
|Dependent item|gcp.cloudsql.pgsql.transaction_id_count_assigned**Preprocessing**
JSON Path: `$.pgsql_assigned`
Delta count of frozen transaction IDs.
|Dependent item|gcp.cloudsql.pgsql.transaction_id_count_frozen**Preprocessing**
JSON Path: `$.pgsql_frozen`
Total data size (in bytes) written to temporary files by the queries.
|Dependent item|gcp.cloudsql.pgsql.temp_bytes_written_count**Preprocessing**
JSON Path: `$.pgsql_temp_bytes_written_count`
Total number of temporary files used for writing data while performing algorithms such as join and sort.
|Dependent item|gcp.cloudsql.pgsql.temp_files_written_count**Preprocessing**
JSON Path: `$.pgsql_temp_files_written_count`
Age of the oldest running transaction yet to be vacuumed in the Cloud SQL PostgreSQL instance, measured in number of transactions that have happened since the oldest transaction.
Empty value when there is no such transaction type.
|Dependent item|gcp.cloudsql.pgsql.oldest_transaction.running**Preprocessing**
JSON Path: `$.pgsql_running`
⛔️Custom on fail: Discard value
Age of the oldest prepared transaction yet to be vacuumed in the Cloud SQL PostgreSQL instance, measured in number of transactions that have happened since the oldest transaction.
Empty value when there is no such transaction type.
|Dependent item|gcp.cloudsql.pgsql.oldest_transaction.prepared**Preprocessing**
JSON Path: `$.pgsql_prepared`
⛔️Custom on fail: Discard value
Age of the oldest replication slot transaction yet to be vacuumed in the Cloud SQL PostgreSQL instance, measured in number of transactions that have happened since the oldest transaction.
Empty value when there is no such transaction type.
|Dependent item|gcp.cloudsql.pgsql.oldest_transaction.replication_slot**Preprocessing**
JSON Path: `$.pgsql_replication_slot`
⛔️Custom on fail: Discard value
Age of the oldest replica transaction yet to be vacuumed in the Cloud SQL PostgreSQL instance, measured in number of transactions that have happened since the oldest transaction.
Empty value when there is no such transaction type.
|Dependent item|gcp.cloudsql.pgsql.oldest_transaction.replica**Preprocessing**
JSON Path: `$.pgsql_replica`
⛔️Custom on fail: Discard value
The number of the connections to the Cloud SQL PostgreSQL instance.
Includes connections to the system databases, which aren't visible by default.
|Dependent item|gcp.cloudsql.pgsql.num_backends**Preprocessing**
JSON Path: `$.pgsql_num_backends`
The CPU utilization is too high. The system might be slow to respond.
|`min(/GCP Cloud SQL PostgreSQL by HTTP/gcp.cloudsql.pgsql.cpu.utilization,5m) >= {$CLOUD_SQL.PGSQL.CPU.UTIL.MAX}`|Average|| |GCP Cloud SQL PostgreSQL: Disk space is low|High utilization of the storage space.
|`last(/GCP Cloud SQL PostgreSQL by HTTP/gcp.cloudsql.pgsql.disk.utilization) >= {$CLOUD_SQL.PGSQL.DISK.UTIL.WARN}`|Warning|**Depends on**:Critical utilization of the disk space.
|`last(/GCP Cloud SQL PostgreSQL by HTTP/gcp.cloudsql.pgsql.disk.utilization) >= {$CLOUD_SQL.PGSQL.DISK.UTIL.CRIT}`|Average|| |GCP Cloud SQL PostgreSQL: High memory utilization|RAM utilization is too high. The system might be slow to respond.
|`min(/GCP Cloud SQL PostgreSQL by HTTP/gcp.cloudsql.pgsql.memory.utilization,5m) >= {$CLOUD_SQL.PGSQL.RAM.UTIL.MAX}`|High|| |GCP Cloud SQL PostgreSQL: Instance is in suspended state|The instance is in suspended state.
It is not available, for example, due to problems with billing.
The instance has been stopped by the owner.
It is not currently running, but it's ready to be restarted.
The instance is down for maintenance.
|`last(/GCP Cloud SQL PostgreSQL by HTTP/gcp.cloudsql.pgsql.inst.state) = 4`|Info|| |GCP Cloud SQL PostgreSQL: Instance is in failed state|The instance creation failed, or an operation left the instance in an own bad state.
The state of the instance is unknown.
Failed to get the instance state.
Check access permissions to GCP API or service account.
Database engine is down.
If an instance experiences unplanned (non-maintenance) downtime, the instance state will still be RUNNING, but the database engine state metric will report 0.
Databases discovery for the particular PostgreSQL instance.
|HTTP agent|gcp.cloudsql.pgsql.db.discovery**Preprocessing**
JSON Path: `$.items`
Discard unchanged with heartbeat: `3h`
PostgreSQL metrics in raw format.
|Script|gcp.cloudsql.pgsql.db.metrics.get[{#PGSQL.DB.NAME}]**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
Number of deadlocks detected in the [{#PGSQL.DB.NAME}] database.
|Dependent item|gcp.cloudsql.pgsql.deadlock_count[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.deadlock_count`
Total number of rows scanned while processing the queries of the [{#PGSQL.DB.NAME}] database.
|Dependent item|gcp.cloudsql.pgsql.tuples_returned_count[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.tuples_returned_count`
Total number of rows fetched as a result of queries to the [{#PGSQL.DB.NAME}] database.
|Dependent item|gcp.cloudsql.pgsql.tuples_fetched_count[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.tuples_fetched_count`
Delta count of number of committed transactions to the [{#PGSQL.DB.NAME}] database.
|Dependent item|gcp.cloudsql.pgsql.transaction_count_commit[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.commit`
Delta count of number of rolled-back transactions in the [{#PGSQL.DB.NAME}] database.
|Dependent item|gcp.cloudsql.pgsql.transaction_count_rollback[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.rollback`
Number of buffer cache blocks read by the [{#PGSQL.DB.NAME}] database.
|Dependent item|gcp.cloudsql.pgsql.blocks_read_count_buffer_cache[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.buffer_cache`
Number of disk blocks read by the [{#PGSQL.DB.NAME}] database.
|Dependent item|gcp.cloudsql.pgsql.blocks_read_count_disk[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.disk`
Number of tuples(rows) processed for insert operations for the database with the name [{#PGSQL.DB.NAME}].
|Dependent item|gcp.cloudsql.pgsql.tuples_processed_count_insert[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.insert`
Number of tuples(rows) processed for delete operations for the database with the name [{#PGSQL.DB.NAME}].
|Dependent item|gcp.cloudsql.pgsql.tuples_processed_count_delete[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.delete`
Number of tuples(rows) processed for update operations for the database with the name [{#PGSQL.DB.NAME}].
|Dependent item|gcp.cloudsql.pgsql.tuples_processed_count_update[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.update`
Number of live tuples(rows) in the [{#PGSQL.DB.NAME}] database.
|Dependent item|gcp.cloudsql.pgsql.tuple_size_live[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.live`
Number of live tuples(rows) in the [{#PGSQL.DB.NAME}] database.
|Dependent item|gcp.cloudsql.pgsql.tuple_size_dead[{#PGSQL.DB.NAME}]**Preprocessing**
JSON Path: `$.dead`
A response timeout for an API.
|`15s`| |{$GCP.TIME.WINDOW}|Time interval for the data requests.
Supported usage type:
1. The default update interval for most of the items.
2. The minimal time window for the data requested in the Monitoring Query Language REST API request.
|`5m`| ### Items |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |GCP Cloud SQL PostgreSQL: Replica metrics get|PostgreSQL replica metrics data in raw format.
|Script|gcp.cloudsql.pgsql.repl.metrics.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
Indicates time taken from primary binary log to IO thread on replica.
|Dependent item|gcp.cloudsql.pgsql.repl.network_lag**Preprocessing**
JSON Path: `$.network_lag`
Number of seconds the read replica is behind its primary (approximation).
|Dependent item|gcp.cloudsql.pgsql.repl.replica_lag**Preprocessing**
JSON Path: `$.replica_lag`
The current serving state of replication.
This metric is only available for the MySQL/PostgreSQL instances.
|Dependent item|gcp.cloudsql.pgsql.repl.state**Preprocessing**
JSON Path: `$.state`
JavaScript: `The text is too long. Please see the template.`
Replay location replication lag in bytes.
|Dependent item|gcp.cloudsql.pgsql.repl.replay_location**Preprocessing**
JSON Path: `$.replay_location`
Write location replication lag in bytes.
|Dependent item|gcp.cloudsql.pgsql.repl.write_location**Preprocessing**
JSON Path: `$.write_location`
Flush location replication lag in bytes.
|Dependent item|gcp.cloudsql.pgsql.repl.flush_location**Preprocessing**
JSON Path: `$.flush_location`
Sent location replication lag in bytes.
|Dependent item|gcp.cloudsql.pgsql.repl.sent_location**Preprocessing**
JSON Path: `$.sent_location`
Number of failed attempts for archiving replication log files.
|Dependent item|gcp.cloudsql.pgsql.repl.log_archive_failure_count**Preprocessing**
JSON Path: `$.log_archive_failure_count`
Number of failed attempts for archiving replication log files.
|Dependent item|gcp.cloudsql.pgsql.repl.log_archive_success_count**Preprocessing**
JSON Path: `$.log_archive_success_count`
A response timeout for an API.
|`15s`| |{$GCP.TIME.WINDOW}|Time interval for the data requests.
Supported usage type:
1. The default update interval for most of the items.
2. The minimal time window for the data requested in the Monitoring Query Language REST API request.
|`5m`| |{$CLOUD_SQL.MSSQL.RES.NAME.MATCHES}|The filter to include GCP Cloud SQL MSSQL resources by namespace.
|`.*`| |{$CLOUD_SQL.MSSQL.RES.NAME.NOT_MATCHES}|The filter to exclude GCP Cloud SQL MSSQL resources by namespace.
|`CHANGE_IF_NEEDED`| |{$CLOUD_SQL.MSSQL.DB.NAME.MATCHES}|The filter to include GCP Cloud SQL MSSQL databases by namespace.
|`.*`| |{$CLOUD_SQL.MSSQL.DB.NAME.NOT_MATCHES}|The filter to exclude GCP Cloud SQL MSSQL databases by namespace.
|`CHANGE_IF_NEEDED`| |{$CLOUD_SQL.MSSQL.SCHEDULER.ID.MATCHES}|The filter to include GCP Cloud SQL MSSQL schedulers by namespace.
|`.*`| |{$CLOUD_SQL.MSSQL.SCHEDULER.ID.NOT_MATCHES}|The filter to exclude GCP Cloud SQL MSSQL schedulers by namespace.
|`CHANGE_IF_NEEDED`| |{$CLOUD_SQL.MSSQL.DISK.UTIL.WARN}|GCP Cloud SQL MSSQL instance warning disk usage threshold.
|`80`| |{$CLOUD_SQL.MSSQL.DISK.UTIL.CRIT}|GCP Cloud SQL MSSQL instance critical disk usage threshold.
|`90`| |{$CLOUD_SQL.MSSQL.CPU.UTIL.MAX}|GCP Cloud SQL MSSQL instance CPU usage threshold.
|`95`| |{$CLOUD_SQL.MSSQL.RAM.UTIL.MAX}|GCP Cloud SQL MSSQL instance RAM usage threshold.
|`90`| ### Items |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |GCP Cloud SQL MSSQL: Metrics get|MSSQL metrics data in raw format.
|Script|gcp.cloudsql.mssql.metrics.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
Number of cores reserved for the database.
|Dependent item|gcp.cloudsql.mssql.cpu.reserved_cores**Preprocessing**
JSON Path: `$.base_reserved_cores`
Cumulative CPU usage time in seconds.
|Dependent item|gcp.cloudsql.mssql.cpu.usage_time**Preprocessing**
JSON Path: `$.base_usage_time`
Current CPU utilization represented as a percentage of the reserved CPU that is currently in use.
|Dependent item|gcp.cloudsql.mssql.cpu.utilization**Preprocessing**
JSON Path: `$.base_utilization`
Custom multiplier: `100`
Maximum data disk size in bytes.
|Dependent item|gcp.cloudsql.mssql.disk.quota**Preprocessing**
JSON Path: `$.mssql_quota`
Data utilization in bytes.
|Dependent item|gcp.cloudsql.mssql.disk.bytes_used**Preprocessing**
JSON Path: `$.mssql_bytes_used`
Delta count of data disk read I/O operations.
|Dependent item|gcp.cloudsql.mssql.disk.read_ops_count**Preprocessing**
JSON Path: `$.base_read_ops_count`
Delta count of data disk write I/O operations.
|Dependent item|gcp.cloudsql.mssql.disk.write_ops_count**Preprocessing**
JSON Path: `$.base_write_ops_count`
The fraction of the disk quota that is currently in use.
Shown as percentage.
|Dependent item|gcp.cloudsql.mssql.disk.utilization**Preprocessing**
JSON Path: `$.mssql_utilization`
Custom multiplier: `100`
Maximum RAM size in bytes.
|Dependent item|gcp.cloudsql.mssql.memory.quota**Preprocessing**
JSON Path: `$.base_quota`
Total RAM usage in bytes.
This metric reports the RAM usage of the database process, including the buffer/cache.
|Dependent item|gcp.cloudsql.mssql.memory.total_usage**Preprocessing**
JSON Path: `$.base_total_usage`
The RAM usage in bytes.
This metric reports the RAM usage of the server, excluding the buffer/cache.
|Dependent item|gcp.cloudsql.mssql.memory.usage**Preprocessing**
JSON Path: `$.base_usage`
The fraction of the memory quota that is currently in use.
Shown as percentage.
|Dependent item|gcp.cloudsql.mssql.memory.utilization**Preprocessing**
JSON Path: `$.base_ram_pused`
Delta count of bytes received through the network.
|Dependent item|gcp.cloudsql.mssql.network.received_bytes_count**Preprocessing**
JSON Path: `$.base_received_bytes_count`
Delta count of bytes sent through the network.
|Dependent item|gcp.cloudsql.mssql.network.sent_bytes_count**Preprocessing**
JSON Path: `$.base_sent_bytes_count`
Number of connections to the databases on the Cloud SQL instance.
|Dependent item|gcp.cloudsql.mssql.network.connections**Preprocessing**
JSON Path: `$.base_connections`
GCP Cloud SQL MSSQL Current instance state.
|HTTP agent|gcp.cloudsql.mssql.inst.state**Preprocessing**
JSON Path: `$.timeSeriesData[0].pointData[0].values[0].stringValue`
⛔️Custom on fail: Set value to: `10`
JavaScript: `The text is too long. Please see the template.`
Discard unchanged with heartbeat: `10m`
GCP Cloud SQL MSSQL DB Engine State.
|HTTP agent|gcp.cloudsql.mssql.db.state**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
JSON Path: `$.timeSeriesData[0].pointData[0].values[0].int64Value`
⛔️Custom on fail: Discard value
Discard unchanged with heartbeat: `10m`
Total number of login operations started from the connection pool since the last restart of SQL Server service.
|Dependent item|gcp.cloudsql.mssql.conn.connection_reset_count**Preprocessing**
JSON Path: `$.mssql_connection_reset_count`
Total number of login attempts since the last restart of SQL Server service.
This does not include pooled connections.
|Dependent item|gcp.cloudsql.mssql.conn.login_attempt_count**Preprocessing**
JSON Path: `$.mssql_login_attempt_count`
Total number of logout operations since the last restart of SQL Server service.
|Dependent item|gcp.cloudsql.mssql.conn.logout_count**Preprocessing**
JSON Path: `$.mssql_logout_count`
Current number of blocked processes.
|Dependent item|gcp.cloudsql.mssql.conn.processes_blocked**Preprocessing**
JSON Path: `$.mssql_processes_blocked`
Current percentage of pages found in the buffer cache without having to read from disk.
The ratio is the total number of cache hits divided by the total number of cache lookups.
|Dependent item|gcp.cloudsql.mssql.memory.buffer_cache_hit_ratio**Preprocessing**
JSON Path: `$.mssql_buffer_cache_hit_ratio`
Total number of pages flushed to disk by a checkpoint or other operation that requires all dirty pages to be flushed.
|Dependent item|gcp.cloudsql.mssql.memory.checkpoint_page_count**Preprocessing**
JSON Path: `$.mssql_checkpoint_page_count`
Total number of requests that had to wait for a free page.
|Dependent item|gcp.cloudsql.mssql.memory.free_list_stall_count**Preprocessing**
JSON Path: `$.mssql_free_list_stall_count`
Total number of buffers written by the buffer manager's lazy writer.
The lazy writer is a system process that flushes out batches of dirty, aged buffers
(buffers that contain changes that must be written back to disk before the buffer can be reused for a different page)
and makes them available to user processes.
|Dependent item|gcp.cloudsql.mssql.memory.lazy_write_count**Preprocessing**
JSON Path: `$.mssql_lazy_write_count`
Current number of processes waiting for a workspace memory grant.
|Dependent item|gcp.cloudsql.mssql.memory.memory_grants_pending**Preprocessing**
JSON Path: `$.mssql_memory_grants_pending`
Current number of seconds a page will stay in the buffer pool without references.
|Dependent item|gcp.cloudsql.mssql.memory.page_life_expectancy**Preprocessing**
JSON Path: `$.mssql_page_life_expectancy`
Total number of Transact-SQL command batches received.
|Dependent item|gcp.cloudsql.mssql.trans.batch_request_count**Preprocessing**
JSON Path: `$.mssql_batch_request_count`
Total number of records fetched through forwarded record pointers.
|Dependent item|gcp.cloudsql.mssql.trans.forwarded_record_count**Preprocessing**
JSON Path: `$.mssql_forwarded_record_count`
Total number of unrestricted full scans.
These can be either base-table or full-index scans.
|Dependent item|gcp.cloudsql.mssql.trans.full_scan_count**Preprocessing**
JSON Path: `$.mssql_full_scan_count`
Total number of page splits that occur as the result of overflowing index pages.
|Dependent item|gcp.cloudsql.mssql.trans.page_split_count**Preprocessing**
JSON Path: `$.mssql_page_split_count`
Total number of probe scans that are used to find at least one single qualified row in an index or base table directly.
|Dependent item|gcp.cloudsql.mssql.trans.probe_scan_count**Preprocessing**
JSON Path: `$.mssql_probe_scan_count`
Total number of SQL compilations.
|Dependent item|gcp.cloudsql.mssql.trans.sql_compilation_count**Preprocessing**
JSON Path: `$.mssql_sql_compilation_count`
Total number of SQL recompilations.
|Dependent item|gcp.cloudsql.mssql.trans.sql_recompilation_count**Preprocessing**
JSON Path: `$.mssql_sql_recompilation_count`
Total number of physical database page reads.
This metric counts physical page reads across all databases.
|Dependent item|gcp.cloudsql.mssql.memory.page_ops.read**Preprocessing**
JSON Path: `$.mssql_read`
Total number of physical database page writes.
This metric counts physical page writes across all databases.
|Dependent item|gcp.cloudsql.mssql.memory.page_ops.write**Preprocessing**
JSON Path: `$.mssql_write`
Tracks the size in bytes of stored SQLServer audit files on an instance.
Empty value if there are no audits enabled.
|Dependent item|gcp.cloudsql.mssql.audits_size**Preprocessing**
JSON Path: `$.base_audits_size`
⛔️Custom on fail: Discard value
Tracks the size in bytes of stored SQLServer audit files on an instance.
Empty value if there are no audits enabled.
|Dependent item|gcp.cloudsql.mssql.audits_upload_count**Preprocessing**
JSON Path: `$.mssql_success`
⛔️Custom on fail: Discard value
MSSQL resources data in raw format.
|Script|gcp.cloudsql.mssql.resources.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
MSSQL databases data in raw format.
|Script|gcp.cloudsql.mssql.db.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
MSSQL schedulers data in raw format.
|Script|gcp.cloudsql.mssql.schedulers.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
The CPU utilization is too high. The system might be slow to respond.
|`min(/GCP Cloud SQL MSSQL by HTTP/gcp.cloudsql.mssql.cpu.utilization,5m) >= {$CLOUD_SQL.MSSQL.CPU.UTIL.MAX}`|Average|| |GCP Cloud SQL MSSQL: Disk space is low|High utilization of the storage space.
|`last(/GCP Cloud SQL MSSQL by HTTP/gcp.cloudsql.mssql.disk.utilization) >= {$CLOUD_SQL.MSSQL.DISK.UTIL.WARN}`|Warning|**Depends on**:Critical utilization of the disk space.
|`last(/GCP Cloud SQL MSSQL by HTTP/gcp.cloudsql.mssql.disk.utilization) >= {$CLOUD_SQL.MSSQL.DISK.UTIL.CRIT}`|Average|| |GCP Cloud SQL MSSQL: High memory utilization|RAM utilization is too high. The system might be slow to respond.
|`min(/GCP Cloud SQL MSSQL by HTTP/gcp.cloudsql.mssql.memory.utilization,5m) >= {$CLOUD_SQL.MSSQL.RAM.UTIL.MAX}`|High|| |GCP Cloud SQL MSSQL: Instance is in suspended state|The instance is in suspended state.
It is not available, for example, due to problems with billing.
The instance has been stopped by the owner.
It is not currently running, but it's ready to be restarted.
The instance is down for maintenance.
|`last(/GCP Cloud SQL MSSQL by HTTP/gcp.cloudsql.mssql.inst.state) = 4`|Info|| |GCP Cloud SQL MSSQL: Instance is in failed state|The instance creation failed, or an operation left the instance in an own bad state.
The state of the instance is unknown.
Failed to get the instance state.
Check access permissions to GCP API or service account.
Database engine is down.
If an instance experiences unplanned (non-maintenance) downtime, the instance state will still be RUNNING, but the database engine state metric will report 0.
Resources discovery.
|Dependent item|gcp.cloudsql.resources.discovery**Preprocessing**
Discard unchanged with heartbeat: `3h`
Data in raw format for the [{#RESOURCE.NAME}] resource.
|Dependent item|gcp.cloudsql.mssql.resource.raw[{#RESOURCE.NAME}]**Preprocessing**
JSON Path: `$[?(@.resource == "{#RESOURCE.NAME}")].metrics.first()`
Total number of lock requests that resulted in a deadlock for the [{#RESOURCE.NAME}] resource.
|Dependent item|gcp.cloudsql.mssql.resource.deadlock_count[{#RESOURCE.NAME}]**Preprocessing**
JSON Path: `$.deadlock_count`
Total number of lock requests that required the caller to wait for the [{#RESOURCE.NAME}] resource.
|Dependent item|gcp.cloudsql.mssql.resource.lock_wait_count[{#RESOURCE.NAME}]**Preprocessing**
JSON Path: `$.lock_wait_count`
Total time lock requests were waiting for locks for the [{#RESOURCE.NAME}] resource.
|Dependent item|gcp.cloudsql.mssql.resource.lock_wait_time[{#RESOURCE.NAME}]**Preprocessing**
JSON Path: `$.lock_wait_time`
Databases discovery.
|Dependent item|gcp.cloudsql.db.discovery**Preprocessing**
Discard unchanged with heartbeat: `3h`
Data in raw format for the [{#DB.NAME}] database.
|Dependent item|gcp.cloudsql.mssql.db.raw[{#DB.NAME}]**Preprocessing**
JSON Path: `$[?(@.database == "{#DB.NAME}")].metrics.first()`
Total number of log bytes flushed for the [{#DB.NAME}] database.
|Dependent item|gcp.cloudsql.mssql.db.log_bytes_flushed_count[{#DB.NAME}]**Preprocessing**
JSON Path: `$.log_bytes_flushed_count`
Total number of transactions started for the [{#DB.NAME}] database.
|Dependent item|gcp.cloudsql.mssql.db.transaction_count[{#DB.NAME}]**Preprocessing**
JSON Path: `$.transaction_count`
Schedulers discovery.
|Dependent item|gcp.cloudsql.schedulers.discovery**Preprocessing**
Discard unchanged with heartbeat: `3h`
Data in raw format associated with the scheduler that goes by its ID [{#SCHEDULER.ID}].
|Dependent item|gcp.cloudsql.mssql.scheduler.raw[{#SCHEDULER.ID}]**Preprocessing**
JSON Path: `$[?(@.scheduler == "{#SCHEDULER.ID}")].metrics.first()`
Current number of active workers associated with the scheduler that goes by its ID [{#SCHEDULER.ID}].
An active worker is never preemptive, must have an associated task, and is either running, runnable, or suspended.
|Dependent item|gcp.cloudsql.mssql.scheduler.active_workers[{#SCHEDULER.ID}]**Preprocessing**
JSON Path: `$.active_workers`
Current number of present tasks associated with the scheduler that goes by its ID [{#SCHEDULER.ID}].
This count includes tasks that are waiting for a worker to execute them and tasks that are currently waiting or running (in SUSPENDED or RUNNABLE state).
|Dependent item|gcp.cloudsql.mssql.scheduler.current_tasks[{#SCHEDULER.ID}]**Preprocessing**
JSON Path: `$.current_tasks`
Current number of workers associated with the scheduler that goes by its ID [{#SCHEDULER.ID}].
It includes workers that are not assigned any task.
|Dependent item|gcp.cloudsql.mssql.scheduler.current_workers[{#SCHEDULER.ID}]**Preprocessing**
JSON Path: `$.current_workers`
Current number of pending I/Os waiting to be completed that are associated with the scheduler that goes by its ID [{#SCHEDULER.ID}].
Each scheduler has a list of pending I/Os that are checked to determine whether they have been completed every time there is a context switch.
The count is incremented when the request is inserted.
This count is decremented when the request is completed.
This number does not indicate the state of the I/Os.
|Dependent item|gcp.cloudsql.mssql.scheduler.pending_disk_io[{#SCHEDULER.ID}]**Preprocessing**
JSON Path: `$.pending_disk_io`
Current number of workers that are associated with the scheduler that goes by its ID [{#SCHEDULER.ID}] and have assigned tasks waiting to be scheduled on the runnable queue.
|Dependent item|gcp.cloudsql.mssql.scheduler.runnable_tasks[{#SCHEDULER.ID}]**Preprocessing**
JSON Path: `$.runnable_tasks`
Current number of tasks in the pending queue associated with the scheduler that goes by its ID [{#SCHEDULER.ID}].
These tasks are waiting for a worker to pick them up.
|Dependent item|gcp.cloudsql.mssql.scheduler.work_queue[{#SCHEDULER.ID}]**Preprocessing**
JSON Path: `$.work_queue`
A response timeout for an API.
|`15s`| |{$GCP.TIME.WINDOW}|Time interval for the data requests.
Supported usage type:
1. The default update interval for most of the items.
2. The minimal time window for the data requested in the Monitoring Query Language REST API request.
|`5m`| ### Items |Name|Description|Type|Key and additional info| |----|-----------|----|-----------------------| |GCP Cloud SQL MSSQL: Replica metrics get|MSSQL replica metrics data in raw format.
|Script|gcp.cloudsql.mssql.repl.metrics.get**Preprocessing**
Check for not supported value
⛔️Custom on fail: Discard value
Total number of bytes sent to the remote availability replica.
For an async replica, returns the number of bytes before compression.
For a sync replica without compression, returns the actual number of bytes.
|Dependent item|gcp.cloudsql.mssql.repl.bytes_sent_to_replica_count**Preprocessing**
JSON Path: `$.bytes_sent_to_replica_count`
Total count of Always On messages to resend.
This includes messages that were attempted to be sent but failed and require resending.
|Dependent item|gcp.cloudsql.mssql.repl.resent_message_count**Preprocessing**
JSON Path: `$.resent_message_count`
Current number of log blocks that are waiting to be applied to replica.
|Dependent item|gcp.cloudsql.mssql.repl.log_apply_pending_queue**Preprocessing**
JSON Path: `$.log_apply_pending_queue`
Total size of log records received by the replica.
|Dependent item|gcp.cloudsql.mssql.repl.log_bytes_received_count**Preprocessing**
JSON Path: `$.log_bytes_received_count`
Current size of log records in bytes in the replica's log files that have not been redone.
|Dependent item|gcp.cloudsql.mssql.repl.recovery_queue**Preprocessing**
JSON Path: `$.recovery_queue`
Custom multiplier: `1024`
Total size in bytes of redone log records.
|Dependent item|gcp.cloudsql.mssql.repl.redone_bytes_count**Preprocessing**
JSON Path: `$.redone_bytes_count`