Skip to content

Commit

Permalink
Merge pull request #15 from GoogleCloudPlatform/master
Browse files Browse the repository at this point in the history
bombastictranz/monitoring-dashboard-samples
  • Loading branch information
bombastictranz authored Mar 25, 2024
2 parents 62b039a + c8b0c72 commit 143e2bc
Show file tree
Hide file tree
Showing 24 changed files with 392 additions and 173 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "CloudSQL - Instance in Failed State",
"displayName": "Cloud SQL - Instance in Failed State",
"documentation": {
"content": "This Alert fires when any CloudSQL Instance has stopped working and has entered an error state. The cause should be investigated and the instance should be restored from a backup. for more information around managing instances and troubleshooting failed instances visit: https://cloud.google.com/sql/docs/troubleshooting#managing-instances",
"content": "This alert fires when any Cloud SQL instance has stopped working and has entered an error state. The cause should be investigated and the instance should be restored from a backup. For more information on managing instances and troubleshooting failed instances visit: https://cloud.google.com/sql/docs/troubleshooting#managing-instances",
"mimeType": "text/markdown"
},
"userLabels": {},
Expand Down Expand Up @@ -35,4 +35,4 @@
"combiner": "OR",
"enabled": true,
"notificationChannels": []
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "PostgreSQL - Slow Transactions",
"documentation": {
"content": "This Alert fires if the database is having trouble keeping up transactions. You should investigate performance improvements, such as increasing resources for CloudSQL, improving query efficiency, and more. For additional information visit https://cloud.google.com/sql/docs/postgres/diagnose-issues.",
"content": "This alert fires if the database is having trouble keeping up with transactions. You should investigate performance improvements, such as increasing resources for Cloud SQL, improving query efficiency, and more. For additional information visit https://cloud.google.com/sql/docs/postgres/diagnose-issues.",
"mimeType": "text/markdown"
},
"userLabels": {},
Expand Down Expand Up @@ -31,4 +31,4 @@
"combiner": "OR",
"enabled": true,
"notificationChannels": []
}
}
4 changes: 2 additions & 2 deletions alerts/google-cloudsql/1p-replication-in-error-state.v1.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"displayName": "Replication in Error State",
"documentation": {
"content": "This Alert fires when any replica has stopped working and has entered an error state. For more information around disaster recovery visit: https://cloud.google.com/sql/docs/mysql/replication/cross-region-replicas.",
"content": "This alert fires when any replica has stopped working and has entered an error state. For more information on disaster recovery visit: https://cloud.google.com/sql/docs/mysql/replication/cross-region-replicas.",
"mimeType": "text/markdown"
},
"userLabels": {},
Expand Down Expand Up @@ -31,4 +31,4 @@
"combiner": "OR",
"enabled": true,
"notificationChannels": []
}
}
6 changes: 3 additions & 3 deletions alerts/google-cloudsql/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Alerts for CloudSQL in the Ops Agent
# Alerts for Cloud SQL in the Ops Agent

## Spiking Evictions

If `cloudsql.googleapis.com/database/postgresql/vacuum/oldest_transaction_age` is higher than `10` it indicates that postgres is having issues keeping up with the amount of queries.
If `cloudsql.googleapis.com/database/postgresql/vacuum/oldest_transaction_age` is higher than `10` it indicates that PostgreSQL is having issues keeping up with the number of queries.

## Replication in Error State

Expand All @@ -14,7 +14,7 @@ If any instance in `cloudsql.googleapis.com/database/instance_state` has a state

### Creating Notification Channels and User Labels

Whether these alert policies are being used as standalones or base templates for a deployment strategy like terraform, one thing that should be utilized is notification channels and user labels.
Whether these alert policies are being used as standalones or base templates for a deployment strategy like Terraform, one thing that should be utilized is notification channels and user labels.

### User Labels

Expand Down
8 changes: 4 additions & 4 deletions alerts/google-cloudsql/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
alert_policy_templates:
-
id: 1p-cloudsql-instance-in-failed-state
display_name: CloudSQL - Instance in Failed State
description: "This Alert fires when any CloudSQL Instance has stopped working and has entered an error state. The cause should be investigated and the instance should be restored from a backup. for more information around managing instances and troubleshooting failed instances visit: https://cloud.google.com/sql/docs/troubleshooting#managing-instances"
display_name: Cloud SQL - Instance in Failed State
description: "This alert fires when any Cloud SQL instance has stopped working and has entered an error state. The cause should be investigated and the instance should be restored from a backup. For more information on managing instances and troubleshooting failed instances visit: https://cloud.google.com/sql/docs/troubleshooting#managing-instances"
version: 1
related_integrations:
- id: cloud_sql
platform: GCP
-
id: 1p-postgresql-slow-transactions
display_name: PostgreSQL - Slow Transactions
description: "This Alert fires if the database is having trouble keeping up transactions. You should investigate performance improvements, such as increasing resources for CloudSQL, improving query efficiency, and more. For additional information visit https://cloud.google.com/sql/docs/postgres/diagnose-issues."
description: "This alert fires if the database is having trouble keeping up with transactions. You should investigate performance improvements, such as increasing resources for Cloud SQL, improving query efficiency, and more. For additional information visit https://cloud.google.com/sql/docs/postgres/diagnose-issues."
version: 1
related_integrations:
- id: cloud_sql
platform: GCP
-
id: 1p-replication-in-error-state
display_name: Replication in Error State
description: "This Alert fires when any replica has stopped working and has entered an error state. For more information around disaster recovery visit: https://cloud.google.com/sql/docs/mysql/replication/cross-region-replicas."
description: "This alert fires when any replica has stopped working and has entered an error state. For more information on disaster recovery visit: https://cloud.google.com/sql/docs/mysql/replication/cross-region-replicas."
version: 1
related_integrations:
- id: cloud_sql
Expand Down
14 changes: 7 additions & 7 deletions dashboards/google-cloudsql/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
### Dashboards for CloudSQL
### Dashboards for Cloud SQL

#### Notes

- These dashboards are based on first party Google Cloud monitoring solutions.

|CloudSQL - General|
|Cloud SQL - General|
|:------------------|
|Filename: [cloudsql-general.json](cloudsql-general.json)|
|This dashboard has charts displaying logs from CloudSQL as well as charts of instance states and network throughput. |
|This dashboard has charts displaying logs from Cloud SQL as well as charts of instance states and network throughput. |

|CloudSQL - Replication|
|Cloud SQL - Replication|
|:------------------|
|Filename: [cloudsql-replication.json](cloudsql-replication.json)|
|This dashboard has charts displaying information about replication states and replication performance from CloudSQL. |
|This dashboard has charts displaying information about replication states and replication performance from Cloud SQL. |

|CloudSQL - Transactions|
|Cloud SQL - Transactions|
|:------------------|
|Filename: [cloudsql-transactions.json](cloudsql-transactions.json)|
|This dashboard has charts displaying information regarding transactions and queries from mysql, mssql, and postgresql in CloudSQL as well as charts relating to network activity. |
|This dashboard has charts displaying information regarding transactions and queries from MySQL, PostgreSQL, and SQL Server in Cloud SQL as well as charts relating to network activity. |
22 changes: 11 additions & 11 deletions dashboards/google-cloudsql/cloudsql-general.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"labelKey": "database_id"
}
],
"displayName": "CloudSQL - General",
"displayName": "Cloud SQL - General",
"mosaicLayout": {
"columns": 12,
"tiles": [
Expand Down Expand Up @@ -110,7 +110,7 @@
"filter": "resource.type=\"cloudsql_database\"",
"resourceNames": []
},
"title": "All - CloudSQL Logs"
"title": "All - Cloud SQL Logs"
},
"width": 4,
"xPos": 4,
Expand All @@ -123,7 +123,7 @@
"filter": "resource.type=\"cloudsql_database\"\nlogName=~\".*cloudsql.googleapis.com.*\"\nseverity>=ERROR",
"resourceNames": []
},
"title": "All - CloudSQL Database Error Logs"
"title": "All - Cloud SQL Database Error Logs"
},
"width": 4,
"xPos": 8,
Expand Down Expand Up @@ -200,7 +200,7 @@
"height": 2,
"widget": {
"text": {
"content": "The below chart gives a count of how many CloudSQL instances are in each state. ",
"content": "The below chart gives a count of how many Cloud SQL instances are in each state. ",
"format": "RAW"
},
"title": "Instance States"
Expand Down Expand Up @@ -239,10 +239,10 @@
"height": 2,
"widget": {
"text": {
"content": "This logs widget shows all the logs relating to CloudSQL database instances.",
"content": "This logs widget shows all the logs relating to Cloud SQL database instances.",
"format": "RAW"
},
"title": "All - CloudSQL Logs"
"title": "All - Cloud SQL Logs"
},
"width": 4,
"xPos": 4,
Expand All @@ -252,10 +252,10 @@
"height": 2,
"widget": {
"text": {
"content": "This logs widget shows all the logs relating to CloudSQL database instances at the error severity level.",
"content": "This logs widget shows all the logs relating to Cloud SQL database instances at the error severity level.",
"format": "RAW"
},
"title": "All - CloudSQL Database Error Logs"
"title": "All - Cloud SQL Database Error Logs"
},
"width": 4,
"xPos": 8,
Expand All @@ -265,7 +265,7 @@
"height": 2,
"widget": {
"text": {
"content": "This chart shows CloudSQL instances with the top 5 highest throughput received bytes.",
"content": "This chart shows Cloud SQL instances with the top 5 highest throughput received bytes.",
"format": "RAW"
},
"title": "Top 5 Highest Network Received Bytes"
Expand All @@ -278,7 +278,7 @@
"height": 2,
"widget": {
"text": {
"content": "This chart shows CloudSQL instances with the top 5 highest throughput received bytes.",
"content": "This chart shows Cloud SQL instances with the top 5 highest throughput received bytes.",
"format": "RAW"
},
"title": "Top 5 Highest Network Sent Bytes"
Expand All @@ -289,4 +289,4 @@
}
]
}
}
}
12 changes: 6 additions & 6 deletions dashboards/google-cloudsql/cloudsql-replication.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"labelKey": "zone"
}
],
"displayName": "CloudSQL - Replication",
"displayName": "Cloud SQL - Replication",
"mosaicLayout": {
"columns": 12,
"tiles": [
Expand Down Expand Up @@ -185,7 +185,7 @@
"height": 2,
"widget": {
"text": {
"content": "Top 5 Replication instances with the highest CPU usage that indicates what replications are under the most load.",
"content": "Top 5 replication instances with the highest CPU usage that indicates what replications are under the most load.",
"format": "RAW"
},
"title": "Top 5 Replications with Highest CPU Usage"
Expand All @@ -198,7 +198,7 @@
"height": 2,
"widget": {
"text": {
"content": "Top 5 Replication instances with the highest Memory usage that indicates what replications are under the most load.",
"content": "Top 5 replication instances with the highest memory usage that indicates what replications are under the most load.",
"format": "RAW"
},
"title": "Top 5 Replications with Highest Memory Usage"
Expand All @@ -211,7 +211,7 @@
"height": 2,
"widget": {
"text": {
"content": "Top 5 Replicas that are the furthest behind the master node, in seconds.",
"content": "Top 5 replicas that are the furthest behind the master node, in seconds.",
"format": "RAW"
},
"title": "Top 5 Replications with Highest Replica Lag"
Expand All @@ -224,7 +224,7 @@
"height": 2,
"widget": {
"text": {
"content": "Top 5 Replicas that are the furthest behind the master node, in seconds.",
"content": "Top 5 replicas that are the furthest behind the master node, in seconds.",
"format": "RAW"
},
"title": "Top 5 Replications with Highest Log Archive Failures"
Expand All @@ -235,4 +235,4 @@
}
]
}
}
}
10 changes: 5 additions & 5 deletions dashboards/google-cloudsql/cloudsql-transactions.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"labelKey": "database_id"
}
],
"displayName": "CloudSQL - Transactions",
"displayName": "Cloud SQL - Transactions",
"mosaicLayout": {
"columns": 12,
"tiles": [
Expand Down Expand Up @@ -210,7 +210,7 @@
"height": 2,
"widget": {
"text": {
"content": "The top 5 highest connections on postgreSQL instances",
"content": "The top 5 highest connections on PostgreSQL instances",
"format": "RAW"
},
"title": "PostgreSQL - Top 5 Highest Connections"
Expand Down Expand Up @@ -262,7 +262,7 @@
"height": 2,
"widget": {
"text": {
"content": "The top 5 PostgreSQL instances with highest amount of rows being altered.",
"content": "The top 5 PostgreSQL instances with highest number of rows being altered.",
"format": "RAW"
},
"title": "PostgreSQL - Top 5 Highest DB Rows Affected"
Expand All @@ -288,7 +288,7 @@
"height": 2,
"widget": {
"text": {
"content": "Top 5 instances that have the highest amount of queries executed against the db.",
"content": "Top 5 instances that have the highest number of queries executed against the db.",
"format": "RAW"
},
"title": "MySQL - Top 5 Highest Queries"
Expand All @@ -299,4 +299,4 @@
}
]
}
}
}
8 changes: 4 additions & 4 deletions dashboards/google-cloudsql/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sample_dashboards:
-
category: Cloud SQL
id: cloudsql-general
display_name: CloudSQL - General
display_name: Cloud SQL - General
description: |-
This dashboard has charts displaying logs from Cloud SQL as well as charts of instance states and network throughput.
related_integrations:
Expand All @@ -11,7 +11,7 @@ sample_dashboards:
-
category: Cloud SQL
id: cloudsql-replication
display_name: CloudSQL - Replication
display_name: Cloud SQL - Replication
description: |-
This dashboard has charts displaying information about replication states and replication performance from Cloud SQL.
related_integrations:
Expand All @@ -20,9 +20,9 @@ sample_dashboards:
-
category: Cloud SQL
id: cloudsql-transactions
display_name: CloudSQL - Transactions
display_name: Cloud SQL - Transactions
description: |-
This dashboard has charts displaying information regarding transactions and queries from mysql, mssql, and postgresql in Cloud SQL as well as charts relating to network activity.
This dashboard has charts displaying information regarding transactions and queries from MySQL, PostgreSQL, and SQL Server in Cloud SQL as well as charts relating to network activity.
related_integrations:
- id: cloud_sql
platform: GCP
4 changes: 2 additions & 2 deletions dashboards/logging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
|Logging Usage - GCE|
|:-----------------------|
|Filename: [gce-usage.json](gce-usage.json)|
|This dashboard is fairly simple in that it primarily looks at the `Log Bytes Sent` and `Log Entries` metrics but also adds in some additional visualizations of `Entries By Severity`.|
|This dashboard is fairly simple in that it primarily looks at the `Log Bytes Sent` and `Log Entries` metrics but also adds in some additional visualizations of `Entries by Severity`.|


 

|Logging Usage - Cloud SQL|
|:-----------------------|
|Filename: [cloudsql-usage.json](cloudsql-usage.json)|
|This dashboard primarily looks at the `Log Bytes Sent` and `Log Entries` metrics but also adds in some additional visualizations of `Entries By Severity` for monitored resources of `cloudsql_database` and `cloudsql_instance_database`.|
|This dashboard primarily looks at the `Log Bytes Sent` and `Log Entries` metrics but also adds in some additional visualizations of `Entries by Severity` for monitored resources of `cloudsql_database` and `cloudsql_instance_database`.|

 

Expand Down
2 changes: 1 addition & 1 deletion dashboards/logging/cloudsql-usage.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
{
"height": 4,
"widget": {
"title": "Log Bytes By Severity",
"title": "Log Bytes by Severity",
"xyChart": {
"chartOptions": {
"mode": "COLOR"
Expand Down
2 changes: 1 addition & 1 deletion dashboards/logging/gce-usage.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
{
"height": 4,
"widget": {
"title": "Entries By Severity",
"title": "Entries by Severity",
"xyChart": {
"chartOptions": {
"mode": "COLOR"
Expand Down
4 changes: 2 additions & 2 deletions dashboards/logging/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ sample_dashboards:
category: Logging
id: gce-usage
display_name: Logging Usage - GCE
description: "This dashboard is fairly simple in that it primarily looks at the Log Bytes Sent and Log Entries metrics but also adds in some additional visualizations of Entries By Severity. These metrics are populated via [Google system logging metrics](https://cloud.google.com/monitoring/api/metrics_gcp#gcp-logging)."
description: "This dashboard is fairly simple in that it primarily looks at the Log Bytes Sent and Log Entries metrics but also adds in some additional visualizations of Entries by Severity. These metrics are populated via [Google system logging metrics](https://cloud.google.com/monitoring/api/metrics_gcp#gcp-logging)."
-
category: Logging
id: cloudsql-usage
display_name: Logging Usage - Cloud SQL
description: "This dashboard primarily looks at the Log Bytes Sent and Log Entries metrics but also adds in some additional visualizations of Entries By Severity for monitored resources of cloudsql_database and cloudsql_instance_database. These metrics are populated via [Google system logging metrics](https://cloud.google.com/monitoring/api/metrics_gcp#gcp-logging)."
description: "This dashboard primarily looks at the Log Bytes Sent and Log Entries metrics but also adds in some additional visualizations of Entries by Severity for monitored resources of cloudsql_database and cloudsql_instance_database. These metrics are populated via [Google system logging metrics](https://cloud.google.com/monitoring/api/metrics_gcp#gcp-logging)."
-
category: Logging
id: dataflow-usage
Expand Down
Loading

0 comments on commit 143e2bc

Please sign in to comment.