Monitoring application workloads in a Kubernetes cluster is important for both application developers and administrators. For developers, ongoing monitoring provides insight into application performance under different scenarios and possible performance improvements. For administrators, monitoring is an effective way to track the overall health of the cluster and take proactive action to scale out the cluster as needed to ensure uptime and reliability.

Wavefront by VMware is an enterprise-ready monitoring dashboard for Kubernetes that provides a unified view of cluster operations using interactive, widget-based dashboards. Some of its key features include:

  • Real-time visibility of operational metrics across platforms and cloud providers
  • Advanced alerts based on multiple metrics across different domains
  • Quicker root cause analysis with AI, analytics and incident data drill-down
  • 200+ pre-built integrations and dashboards for popular services and tools

VMware Tanzu Application Catalog is a customizable selection of open source software from Bitnami that is continuously maintained and verifiably tested for use in production environments. Tanzu Application Catalog workloads on Kubernetes can also be integrated easily with Wavefront's monitoring systems. This article gets you started, by showing you how to discover and monitor Tanzu Application Catalog workloads on Kubernetes with Wavefront.

Assumptions and prerequisites

This guide makes the following assumptions:

This guide deploys the MySQL Helm chart from the Tanzu Application Catalog as an example and describes how to discover and monitor the deployment with Wavefront. The same steps can be used with other Tanzu Application Catalog workloads as well.

NOTE: This guide uses the Tanzu Application Catalog demo environment, which includes pre-built catalogs containing a limited set of containers and Helm charts. However, the steps outlined below also hold true for fully-functional Tanzu Application Catalog environments. If you don't have access to the Tanzu Application Catalog demo environment, you can request access or contact your VMware sales representative.

Step 1: Deploy MySQL

NOTE: If you already have a MySQL deployment created using the Tanzu Application Catalog Helm chart, you can skip this step.

The first step is to deploy a MySQL cluster on Kubernetes using the MySQL Helm chart from the Tanzu Application Catalog. Follow these steps:

  1. Log in to the Tanzu Application Catalog dashboard.
  2. Select your organization.
  3. Locate and select the Helm chart you wish to use. Click the "Details" link. In this example, select the MySQL chart.

    Chart catalog

  4. Use the example commands shown on the detail page to deploy the MySQL Helm chart with 3 slave nodes. For example:

    $ helm repo add tanzu https://charts.trials.tac.bitnami.com/demo
    $ helm install mysql tanzu/mysql \
          --set root.password=PASSWORD \
          --set slave.replicas=3
    

    Replace the PASSWORD placeholder with a password for the database root user.

    Chart deployment

Wait until the deployment is complete and use the kubectl get pods command to confirm that the MySQL pods are running before proceeding to the next step.

Step 2: Obtain a Wavefront API token

The next step is to obtain a Wavefront API token. This token will be used by Wavefront Collector to send data from your cluster to your Wavefront instance. Follow these steps:

  1. Log in to Wavefront.
  2. Click the cogwheel icon in the top right corner.
  3. In the resulting drop-down menu, select your username.
  4. Navigate to the "API Access" tab.
  5. Click the "Generate" button to generate a new token.
  6. Copy or note the token value.

    Token generation

Step 3: Deploy Wavefront Collector

The next step is to deploy Wavefront Collector on the Kubernetes cluster. Wavefront Collector includes auto discovery, which can be configured to automatically find services running on the cluster and make data from those services available in customized Wavefront dashboards. Wavefront auto-discovery is available for most common services, including Redis, Apache, Consul, MySQL, MongoDB and many others.

The Tanzu Application Catalog includes a Helm chart that makes it quick and easy to deploy Wavefront Collector on your Kubernetes cluster. Follow the steps below to use it:

  1. Create a file named values.yaml for the Wavefront Collector Helm chart with the following parameters. Replace the CLUSTER-NAME and URL placeholders with your cluster name and Wavefront instance base URL. Replace the TOKEN placeholder with the Wavefront API token obtained in Step 2, and the PASSWORD placeholder with the MySQL password set in Step 1.

    clusterName: CLUSTER-NAME
    wavefront:
      url: URL
      token: TOKEN
    collector:
      enabled: true
      discovery:
        enabled: true
        config:
          - name: mysql
            type: telegraf/mysql
            selectors:
              images:
              - "*mysql*"
              - "mysql:*"
            collection:
              interval: "180s"
            port: 3306
            conf: |
              servers = ["root:PASSWORD@tcp(${host}:${port})/?tls=false"]
              perf_events_statements_digest_text_limit  = 120
              perf_events_statements_limit              = 250
              perf_events_statements_time_limit         = 86400
              table_schema_databases                    = []
              gather_process_list                       = true
              gather_table_io_waits                     = true
              gather_table_lock_waits                   = true
              gather_index_io_waits                     = true
              gather_event_waits                        = true
              gather_file_events_stats                  = true
              interval_slow                             = "30m"
    

    Wavefront auto-discovery uses selectors to identify pods and services. In the configuration shown above, the image selector tells Wavefront to use the Telegraf MySQL plugin for pods using an image containing the keyword mysql. You can find more examples of how to configure Wavefront auto-discovery for different services in this sample configuration file.

    TIP: If you wish to monitor multiple MySQL deployments, add them to the servers list as comma-separated entries.

  2. Add the Tanzu Application Catalog repository to Helm, only if you did not already do so in Step 1:

    $ helm repo add tanzu https://charts.trials.tac.bitnami.com/demo
    
  3. Deploy the Wavefront Collector Helm chart using the configuration shown previously:

    $ helm install wavefront tanzu/wavefront --values values.yaml
    

Wait until the deployment is complete and use the kubectl get pods command to confirm that the Wavefront Collector pods are running before proceeding to the next step.

Step 4: Test the integration

To test the integration and visualize data from the MySQL service in Wavefront, follow these steps:

  1. Log in to Wavefront.
  2. On the "Dashboards" page, search for the "Kubernetes Summary" dashboard and select it.

    Dashboard list

  3. On the "Kubernetes Summary" dashboard, select your cluster from the drop-down list. A summary of your cluster with health and operational metrics will appear.

    Cluster metrics

  4. Navigate to the "Workloads" section. A summary of auto-discovered workloads will appear. In this example, you should see a MySQL workload representing the MySQL service running in the cluster.

    Workloads

  5. Click the workload. A workload-specific dashboard will load with specific details such as the number of connections, users, databases, tables, errors and locks. This information can be further filtered by instance IP address, database name, table name and/or user name to show more granular information.

    Database metrics

At this point, the integration is complete and verified. If you have other Tanzu Application Catalog charts deployed in the cluster, you can configure Wavefront to discover and display metrics from those services in a similar manner.

Useful links

To learn more about the topics discussed in this guide, use the links below:

check-circle-line exclamation-circle-line close-line
Scroll to top icon