This page describes the steps required to install Database Collector on the Kubernetes cluster.

This document contains references to the cert-manager documentation. Cisco AppDynamics does not own any rights and assumes no responsibility for the accuracy or completeness of such third-party documentation.

Before You Begin

Before installing Database Monitoring, ensure that you meet the following requirements:

  • Your account is set up on Cisco Cloud Observability. See Account Administration.
  • You are connected to the cluster where you want to install Database Monitoring.
  • You have administrator privileges on the monitored cluster to run the Helm chart commands.
  • You have Set Up Database for Monitoring.

Hardware Requirements

The default hardware settings for every DBCollectorConfig includes:

ComponentCPUMemory
Database Collector200m750MiB

*For throughput-specific details, see Performance and Scaling for the Cisco AppDynamics Distribution of OpenTelemetry Collector.
**OpenTelemetry Operator manager and Kube RBAC Proxy

Software Requirements

The Database Monitoring is designed to run in Linux containers and is deployed using the Cisco AppDynamics Operator. Database Monitoring requires:

  • Helm >= 3.8.0
  • Sufficient licenses. See License Management.

  • Access to Dockerhub to pull the Cisco AppDynamics Operator and Collector images for the Kubernetes and App Service Monitoring:

NameURL
Database Collector

appdynamics/appdynamics-cloud-db-collector:24.2.0-1084

If you want to enable cloud correlation, ensure that you have configured AWS or Azure cloud connections using the following procedures:

Helm Chart Compatibility

Database Collector Image

Cisco AppDynamics-Operator Helm Chart

Cisco AppDynamics-Operator Image

Cisco AppDynamics-Cloud Helm Chart

23.2.0-539<= 1.7.9923.2.0-9101.7.441
23.3.0-627<= 1.9.12023.3.0-9641.8.483
23.6.0-780<= 1.12.14423.6.0-10521.11.589

Install Database Monitoring Using Helm Charts

Before you install Database Monitoring, install Cisco AppDynamics Operator using the steps mentioned at Install Kubernetes and App Service Monitoring.

Multi-tenancy enables you to install multiple Database Collectors in each namespace. Using this mode, different teams in your organization can manage their Database Collectors in their own namespaces in the case of shared Kubernetes clusters.

Installation in multi-tenant mode creates cluster-scoped permissions.

If you want to install Cisco AppDynamics Operator in multi-tenant mode, add the following section to the operators-values.yaml file during installation. 

appdynamics-cloud-operator:
  # cluster mode enables multi-tenancy
  watchMode: cluster
YML

Perform the following steps to install Database Monitoring using Helm charts:

  1. In the generated collectors-values.yaml file, add the following section if it does not exist:

    global:
       clusterName: <cluster-name>
    YML
  2. Deploy Database Collector with any of the following deployment types:

    Deployment TypeAction

    New Helm release

    1. From the Cisco Cloud Observability Tenant UI, copy the configuration parameters for the Database Monitoring solution.
    2. Create a new collectors-values.yaml file and add the parameters that you copied in the previous step. This will be used to deploy the appdynamics-collectors Helm chart for Kubernetes monitoring.
    3. On the collectors-values.yaml file, turn the appdynamics-otel-collector > install field to false.

    Existing Helm release

    1. From the Cisco Cloud Observability Tenant UI, copy the snippet that includes the default values of appdynamics-cloud-db-collector.
    2. Append the copied snippet in the same collectors-values.yaml file that was used to deploy the appdynamics-collectors Helm chart for Kubernetes monitoring.

      Ensure that the indentation of the copied snippet matches with the collectors-values.yaml file.

    collectors-values.yaml

    global:
       # Cluster name must be same as the operators-values.yaml
       clusterName: <cluster-name>
    appdynamics-otel-collector:
      install: false
    appdynamics-cloud-k8s-monitoring:
      install:
        clustermon: false
        defaultInfraCollectors: false
        logCollector: false
    appdynamics-cloud-db-collector:
      install:
        dbCollector: true
        dbMonitoringConfigs: true
      appdCloudAuth:
        clientId: <client-id>
        clientSecret: <secret>
        endpoint: <data-endpoint>
        tokenUrl: <auth-endpoint>
    
      # dbCollector Configs
      dbCollectorConfig:
        logLevel: info
    
      # Each Object in the list will create a custom resource of dbconfig type
      dbMonitoringConfigs:
        - dbType: <database-type>
          configName : <config-name>
          hostname: <hostname>
          hostport: <port>
          username: <user-name>
          password: <db-password>
    
          # Uncomment the following field to specify the name of the secret containing the password instead of specifying the password in the above field
          # passwordSecretName: <secret-name>
          
          # Uncomment below field to specify the DbCollector this config needs to be assigned to
          # Defaults to collector of current release <release-name>-appdynamics-db-collector and <release-namespace>
          # dbCollector:
          #   name: <parent-collector-name>
          #   namespace: <parent-collector-namespace>
    
          # Uncomment below field to specify environment (defaults to self-hosted)
          # environment:
          #   platform: self-hosted # Other possible properties "AWS", "Azure"
     
          # Uncomment below field to monitor specific schema/view
          # database: <database-name>   
          # Uncomment below fields to use TLS connection
          # tlsConfig:
          #   hostNameInCertificate: <hostname>
          #   certSecretName: <secret-name>
    
        # Uncomment below section to monitor more database(s)
        # - dbType: <database-type>
        #   configName : <config-name>
        #   hostname: <hostname>
        #   hostport: <port>
        #   username: <user-name>
        #   password: <password> 
    YML

    The database field is not supported for MySQL, MariaDB, and Aurora MySQL. If you specify these values in the database field, an error is displayed during the Helm installation.

  3. Specify the  password (db-password) in the collectors-values.yaml file using one of the following ways:

    • Using the password field: Helm creates a secret automatically to store the password. The created secret's name is <release-name>-<config-name>-db-password.
    • Using the passwordSecretName field: 

      1. Create a secret by using the following template. Ensure that you create the secret in the same namespace as the corresponding dbMonitoringConfig.  

        apiVersion: v1
        kind: Secret
        metadata:
          name: <secret-name>
          namespace: <db-config namespace>
        type: Opaque
        stringData:
          password: <db-password>
        CODE

        b. Specify the <secret-name> in the passwordSecretName field of the collectors-values.yaml file. AppDynamics Operator uses the password from the specified secret.

  4. Install the Database Collector using the updated collectors-values.yaml file by running the following Helm command:

    • For the new Helm release:

      helm install appdynamics-collectors appdynamics-cloud-helmcharts/appdynamics-collectors -n appdynamics -f collectors-values.yaml
      CODE
    • For existing Helm release

      helm upgrade appdynamics-collectors appdynamics-cloud-helmcharts/appdynamics-collectors -n appdynamics -f collectors-values.yaml
      CODE

      Use a different release name if appdynamics-collectors is already used.

  5. Set the Database Collector field in the collectors-values.yaml to point to the parent collector. Specify the following details for each Database configuration:

    collectors-values.yaml

    # dbCollector:
      #  name: <parent-collector-name>
      #  namespace: <parent-collector-namespace>
    YML

    If you do not set this field, dbConfig points to the existing helm release’s collector by default.

  6. Validate the installation:

    Check K8s pods in appdynamics namespace using the following command: 

    kubectl get all -n appdynamics
    BASH

    This is a sample output with the validation:

    NAME                                                                  READY   STATUS    RESTARTS   AGE
    pod/appdynamics-collectors-appdynamics-db-collector-666f7d74f46jfx9   1/1     Running   0          6m5s
    pod/appdynamics-operators-appdynamics-cloud-operator-6446855ffn2vjw   2/2     Running   0          10m
    pod/opentelemetry-operator-controller-manager-58669c595-5khtg         2/2     Running   0          10m
    
    NAME                                                                      TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                                           AGE
    service/appdynamics-cloud-operator-metrics-service                        ClusterIP   10.96.33.84     <none>        8443/TCP                                          10m
    service/appdynamics-otel-collector-service                                ClusterIP   10.96.115.147   <none>        4318/TCP,4317/TCP,14317/TCP,55679/TCP             6m6s
    service/opentelemetry-operator-controller-manager-metrics-service         ClusterIP   10.96.113.98    <none>        8443/TCP,8080/TCP                                 10m
    service/opentelemetry-operator-webhook-service                            ClusterIP   10.96.140.251   <none>        443/TCP                                           10m
    
    NAME                                                               READY   UP-TO-DATE   AVAILABLE   AGE
    deployment.apps/appdynamics-collectors-appdynamics-db-collector    1/1     1            1           6m5s
    deployment.apps/appdynamics-operators-appdynamics-cloud-operator   1/1     1            1           10m
    deployment.apps/opentelemetry-operator-controller-manager          1/1     1            1           10m
    
    NAME                                                                          DESIRED   CURRENT   READY   AGE
    replicaset.apps/appdynamics-collectors-appdynamics-db-collector-666f7d74f4    1         1         1       6m5s
    replicaset.apps/appdynamics-operators-appdynamics-cloud-operator-6446855fff   1         1         1       10m
    replicaset.apps/opentelemetry-operator-controller-manager-58669c595           1         1         1       10m
    CODE