Use Auto-Instrumentation with an On-Premises Controller

The .NET Core and Node.js applications support certificates signed by a certificate authority (CA) only. The applications do not support self-signed certificates. If your Controller is using a self-signed certificate, then only auto-instrumentation for Java applications is supported.

To support auto-instrumentation with an on-premises Controller, configure the Cluster Agent custom SSL Secret Configure the Cluster Agent to Use SSL for On-Premises Controllers. The Cluster Agent copies the certificates to the auto-instrumented pods where they are used by App Server Agents to establish connections with the on-premises Controller.

Configuration for Node.js and an On-Premises Controller

In addition to configuring the Cluster Agent custom SSL Secret property, you must perform these steps for auto-instrumented Node.js applications that use an on-premises Controller.

  1. Create a file named shim.js certificateFile Node.js Settings Reference.

    require("appdynamics").profile({
    certificateFile: "/opt/appdynamics-nodejs/custom-ssl.pem"
    });
  2. Create a ConfigMap appdynamics shim.js

    kubectl create cm nodejs-cert-configmap --from-file ./shim.js -n appdynamics

  3. Edit the cluster-agent.yaml customAgentConfigSource/configMapName ConfigMap nodejs-cert-configmap

    apiVersion: cluster.appdynamics.com/v1alpha1
    kind: Clusteragent
    metadata:
    name: k8s-cluster-agent
    namespace: appdynamics
    spec:
    # content removed for brevity
    # ...
    instrumentationRules:
    - namespaceRegex: dev
    appName: MyNodeJSApp
    language: nodejs
    customAgentConfigSource:
    - configMapName: nodejs-cert-configmap
    imageInfo:
    image: "docker.io/appdynamics/nodejs-agent:20.12.0-10.0.0-alpine"
    agentMountPath: /opt/appdynamics
  4. Apply the updated Cluster Agent configuration:

    kubectl apply -f cluster-agent.yaml

    The Cluster Agent updates the Node.js workload spec which recreates the pods and copies the certificate file to the pods. The certificate file is referenced by the Node.js Agent through the NODE_OPTIONS shim.js