Enable monitoring

Monitoring your application’s performance is crucial for maintaining its reliability and efficiency. F5 Application Delivery Service for Google Cloud (ADS) seamlessly integrates with Google Cloud services, allowing you to collect, correlate, and analyze metrics for a thorough understanding of your application’s health and behavior.

Prerequisites

Export F5 Application Delivery Service for Google Cloud metrics to a Google Cloud Project

To enable sending metrics to your desired Google Cloud project, you must specify the project ID when creating or updating a deployment. To create a deployment, see our documentation on creating an F5 ADS deployment for a step-by-step guide. To update the deployment, in the F5 ADS console,

  1. On the navigation menu, select Deployments.
  2. Select the deployment you want to update and select Edit.
  3. Enter the project you want metrics to be sent to under Metric Project ID.
  4. Select Update.

View F5 Application Delivery Service for Google Cloud metrics in Google Cloud Monitoring

See the Metrics Catalog for a full list of metrics F5 ADS provides.

Google Cloud Console’s Metrics Explorer

Log in to your Google Cloud Console,

  1. Go to your metric project.
  2. Search for "Metrics Explorer".

Refer to the Google’s Metrics Explorer documentation to learn how you can create charts and queries.

Import a pre-built dashboard

To help you quickly visualize important metrics and logs from your F5 ADS deployments, you can import a pre-configured dashboard into Google Cloud Monitoring. The dashboard displays key metrics such as request and connection rates, response status codes, upstream health, and access and error logs.

To import the dashboard:

  1. Copy the dashboard JSON configuration

    Show dashboard JSON
    json
    {
      "displayName": "F5 Application Delivery Service",
      "dashboardFilters": [
        {
          "filterType": "METRIC_LABEL",
          "labelKey": "deployment_name",
          "templateVariable": "deployment_name",
          "valueType": "STRING_ARRAY"
        }
      ],
      "description": "",
      "labels": {},
      "mosaicLayout": {
        "columns": 48,
        "tiles": [
          {
            "height": 16,
            "width": 29,
            "widget": {
              "title": "Request + Connection rates",
              "id": "",
              "xyChart": {
                "chartOptions": {
                  "displayHorizontal": false,
                  "mode": "COLOR",
                  "showLegend": false
                },
                "dataSets": [
                  {
                    "breakdowns": [],
                    "dimensions": [],
                    "legendTemplate": "Connections/second",
                    "measures": [],
                    "minAlignmentPeriod": "60s",
                    "plotType": "LINE",
                    "sort": [],
                    "targetAxis": "Y2",
                    "timeSeriesQuery": {
                      "outputFullDuration": false,
                      "timeSeriesFilter": {
                        "aggregation": {
                          "alignmentPeriod": "60s",
                          "crossSeriesReducer": "REDUCE_SUM",
                          "groupByFields": [],
                          "perSeriesAligner": "ALIGN_RATE"
                        },
                        "filter": "metric.type=\"workload.googleapis.com/nginx.http.connections\" resource.type=\"generic_node\" metric.label.\"nginx_connections_outcome\"=\"ACCEPTED\" ${deployment_name}"
                      },
                      "unitOverride": ""
                    }
                  },
                  {
                    "breakdowns": [],
                    "dimensions": [],
                    "legendTemplate": "Requests/second",
                    "measures": [],
                    "minAlignmentPeriod": "60s",
                    "plotType": "LINE",
                    "sort": [],
                    "targetAxis": "Y1",
                    "timeSeriesQuery": {
                      "outputFullDuration": false,
                      "timeSeriesFilter": {
                        "aggregation": {
                          "alignmentPeriod": "60s",
                          "crossSeriesReducer": "REDUCE_SUM",
                          "groupByFields": [],
                          "perSeriesAligner": "ALIGN_RATE"
                        },
                        "filter": "metric.type=\"workload.googleapis.com/nginx.http.requests\" resource.type=\"generic_node\" ${deployment_name}"
                      },
                      "unitOverride": ""
                    }
                  }
                ],
                "thresholds": [],
                "y2Axis": {
                  "label": "Conn/s",
                  "scale": "LINEAR"
                },
                "yAxis": {
                  "label": "Req/s",
                  "scale": "LINEAR"
                }
              }
            }
          },
          {
            "xPos": 29,
            "height": 16,
            "width": 18,
            "widget": {
              "title": "Current Connections",
              "id": "",
              "scorecard": {
                "breakdowns": [],
                "dimensions": [],
                "measures": [],
                "sparkChartView": {
                  "sparkChartType": "SPARK_LINE"
                },
                "thresholds": [],
                "timeSeriesQuery": {
                  "outputFullDuration": false,
                  "timeSeriesFilter": {
                    "aggregation": {
                      "alignmentPeriod": "60s",
                      "crossSeriesReducer": "REDUCE_SUM",
                      "groupByFields": [
                        "metric.label.\"nginx_connections_outcome\""
                      ],
                      "perSeriesAligner": "ALIGN_MEAN"
                    },
                    "filter": "metric.type=\"workload.googleapis.com/nginx.http.connection.count\" resource.type=\"generic_node\" ${deployment_name}"
                  },
                  "unitOverride": ""
                }
              }
            }
          },
          {
            "yPos": 16,
            "height": 14,
            "width": 29,
            "widget": {
              "title": "Response rate by Zone + Status",
              "id": "",
              "xyChart": {
                "chartOptions": {
                  "displayHorizontal": false,
                  "mode": "COLOR",
                  "showLegend": false
                },
                "dataSets": [
                  {
                    "breakdowns": [],
                    "dimensions": [],
                    "legendTemplate": "",
                    "measures": [],
                    "minAlignmentPeriod": "60s",
                    "plotType": "LINE",
                    "sort": [],
                    "targetAxis": "Y1",
                    "timeSeriesQuery": {
                      "outputFullDuration": false,
                      "timeSeriesFilter": {
                        "aggregation": {
                          "alignmentPeriod": "60s",
                          "crossSeriesReducer": "REDUCE_SUM",
                          "groupByFields": [
                            "metric.label.\"nginx_zone_name\"",
                            "metric.label.\"nginx_status_range\""
                          ],
                          "perSeriesAligner": "ALIGN_RATE"
                        },
                        "filter": "metric.type=\"workload.googleapis.com/nginx.http.response.status\" resource.type=\"generic_node\" ${deployment_name}"
                      },
                      "unitOverride": ""
                    }
                  }
                ],
                "thresholds": [],
                "yAxis": {
                  "label": "",
                  "scale": "LINEAR"
                }
              }
            }
          },
          {
            "yPos": 16,
            "xPos": 29,
            "height": 9,
            "width": 9,
            "widget": {
              "title": "Current Requests",
              "id": "",
              "scorecard": {
                "breakdowns": [],
                "dimensions": [],
                "measures": [],
                "sparkChartView": {
                  "sparkChartType": "SPARK_LINE"
                },
                "thresholds": [],
                "timeSeriesQuery": {
                  "outputFullDuration": false,
                  "timeSeriesFilter": {
                    "aggregation": {
                      "alignmentPeriod": "60s",
                      "crossSeriesReducer": "REDUCE_SUM",
                      "groupByFields": [],
                      "perSeriesAligner": "ALIGN_MEAN"
                    },
                    "filter": "metric.type=\"workload.googleapis.com/nginx.http.request.processing.count\" resource.type=\"generic_node\" metric.label.\"nginx_zone_name\"=monitoring.regex.full_match(\"..*\") ${deployment_name}",
                    "pickTimeSeriesFilter": {
                      "direction": "TOP",
                      "numTimeSeries": 12,
                      "rankingMethod": "METHOD_MEAN"
                    }
                  },
                  "unitOverride": ""
                }
              }
            }
          },
          {
            "yPos": 16,
            "xPos": 38,
            "height": 9,
            "width": 9,
            "widget": {
              "title": "Config updates",
              "id": "",
              "scorecard": {
                "breakdowns": [],
                "dimensions": [],
                "measures": [],
                "sparkChartView": {
                  "sparkChartType": "SPARK_LINE"
                },
                "thresholds": [],
                "timeSeriesQuery": {
                  "outputFullDuration": true,
                  "timeSeriesFilter": {
                    "aggregation": {
                      "alignmentPeriod": "60s",
                      "crossSeriesReducer": "REDUCE_SUM",
                      "groupByFields": [
                        "metric.label.\"deployment_name\""
                      ],
                      "perSeriesAligner": "ALIGN_DELTA"
                    },
                    "filter": "metric.type=\"workload.googleapis.com/nginx.config.reloads\" resource.type=\"generic_node\" ${deployment_name}",
                    "pickTimeSeriesFilter": {
                      "direction": "TOP",
                      "numTimeSeries": 12,
                      "rankingMethod": "METHOD_MEAN"
                    }
                  },
                  "unitOverride": ""
                }
              }
            }
          },
          {
            "yPos": 25,
            "xPos": 29,
            "height": 12,
            "width": 18,
            "widget": {
              "title": "Upstream Status",
              "id": "",
              "xyChart": {
                "chartOptions": {
                  "displayHorizontal": false,
                  "mode": "COLOR",
                  "showLegend": false
                },
                "dataSets": [
                  {
                    "breakdowns": [],
                    "dimensions": [],
                    "legendTemplate": "",
                    "measures": [],
                    "minAlignmentPeriod": "60s",
                    "plotType": "STACKED_AREA",
                    "sort": [],
                    "targetAxis": "Y1",
                    "timeSeriesQuery": {
                      "outputFullDuration": false,
                      "timeSeriesFilter": {
                        "aggregation": {
                          "alignmentPeriod": "60s",
                          "crossSeriesReducer": "REDUCE_SUM",
                          "groupByFields": [
                            "metric.label.\"nginx_peer_state\""
                          ],
                          "perSeriesAligner": "ALIGN_MEAN"
                        },
                        "filter": "metric.type=\"workload.googleapis.com/nginx.http.upstream.peer.count\" resource.type=\"generic_node\" ${deployment_name}",
                        "pickTimeSeriesFilter": {
                          "direction": "TOP",
                          "numTimeSeries": 12,
                          "rankingMethod": "METHOD_MAX"
                        }
                      },
                      "unitOverride": ""
                    }
                  }
                ],
                "thresholds": [],
                "yAxis": {
                  "label": "",
                  "scale": "LINEAR"
                }
              }
            }
          },
          {
            "yPos": 30,
            "height": 14,
            "width": 29,
            "widget": {
              "title": "Upstream Response rate by Zone + Status",
              "id": "",
              "xyChart": {
                "chartOptions": {
                  "displayHorizontal": false,
                  "mode": "COLOR",
                  "showLegend": false
                },
                "dataSets": [
                  {
                    "breakdowns": [],
                    "dimensions": [],
                    "legendTemplate": "",
                    "measures": [],
                    "minAlignmentPeriod": "60s",
                    "plotType": "LINE",
                    "sort": [],
                    "targetAxis": "Y1",
                    "timeSeriesQuery": {
                      "outputFullDuration": false,
                      "timeSeriesFilter": {
                        "aggregation": {
                          "alignmentPeriod": "60s",
                          "crossSeriesReducer": "REDUCE_SUM",
                          "groupByFields": [
                            "metric.label.\"nginx_zone_name\"",
                            "metric.label.\"nginx_status_range\""
                          ],
                          "perSeriesAligner": "ALIGN_RATE"
                        },
                        "filter": "metric.type=\"workload.googleapis.com/nginx.http.upstream.peer.responses\" resource.type=\"generic_node\" ${deployment_name}"
                      },
                      "unitOverride": ""
                    }
                  }
                ],
                "thresholds": [],
                "yAxis": {
                  "label": "",
                  "scale": "LINEAR"
                }
              }
            }
          },
          {
            "yPos": 44,
            "height": 16,
            "width": 48,
            "widget": {
              "title": "Error Logs",
              "logsPanel": {
                "filter": "resource.type=\"generic_node\"\nlabels.\"log.file.name\"=\"error.log\"\nlabels.\"log.file.path\"=~\"/var/log/nginx/.*\\.log\"",
                "resourceNames": []
              }
            }
          },
          {
            "yPos": 60,
            "height": 16,
            "width": 48,
            "widget": {
              "title": "Access Logs",
              "logsPanel": {
                "filter": "resource.type=\"generic_node\"\nlabels.\"log.file.name\"=\"access.log\"\nlabels.\"log.file.path\"=~\"/var/log/nginx/.*\\.log\"",
                "resourceNames": []
              }
            }
          }
        ]
      }
    }

  2. Go to the Google Cloud Console.

  3. Go to your metrics project.

  4. Search for Monitoring and select Dashboards.

  5. Select Create Custom Dashboard.

  6. Select the settings icon (⚙), and select JSON to switch to JSON editor mode.

  7. Replace the default JSON with the dashboard configuration you copied.

  8. Select Apply Changes.

The dashboard includes an deployment_name filter. Use this filter to view metrics for a specific F5 ADS deployment or select multiple deployments to compare their performance.

Disable exporting F5 Application Delivery Service for Google Cloud metrics to a Google Cloud project

To disable sending metrics to your Google Cloud project, update your F5 ADS deployment to remove the reference to your project ID. To update the deployment, in the F5 ADS console,

  1. On the navigation menu, select Deployments.
  2. Select the deployment you want to update and select Edit.
  3. Remove the project ID under Metric Project ID.
  4. Select Update.

Troubleshooting

If Google Cloud Monitoring is not showing any metrics, check for Failed Metric Export to Google events from your F5 ADS deployment.

In the F5 ADS console:

  1. On the navigation menu, select Events.
  2. Select Add Filter.
  3. Select Affected Object and the name of your F5 ADS deployment.

Events are deleted after 14 days.