Installing and configuring the Unified Agent

You can deploy the Unified Agent by using Helm chart. In the deployment process, you need to do specific configurations for different plug-ins.

Before you begin

Ensure that you complete the preparation steps as instructed in Preparing the deployment of Unified Agent.

Procedure

  1. Extract the unifiedAgent_2019.4.0.1.tar.gz package to get cloud monitoring media.
    tar xzf unifiedAgent_2019.4.0.1.tar.gz
  2. Log in to your Docker registry.
    docker login -u my_username -p my_password my_clustername:my_clusterport
    Where
    • my_username and my_password are the user name and password for the Docker registry
    • my_clustername is the name of the cluster that you are monitoring
    • my_clusterport is the port number for the Docker registry
  3. Run the scripts to deploy the Unified Agent. You can choose to install plug-ins opentracing (Jaeger and Zipkin), NGINX, Redis, IBM APIC, IBM ACE, IBM MQ, DEM, and OpenShift by the option -pi.
    USAGE: deploy.sh
        [ -pi Plugin name ] # e.g -pi opentracing:nginx:redis:ibmmq:ibmapic:ibmace:dem:openshiftua
        [ -n Namespace to be deployed ] # e.g -n NameSpace , default is 'ua'
        [ -r Release name ] # e.g -r ReleaseName, default is 'monitor'
        [ -d Docker repository ]# e.g -d yourcluster.icp:8500, default is 'mycluster.icp:8500'
        [ -c Location of configpack zip ]# e.g -c /Configpack-AbsolutePath/ibm-cloud-apm-dc-configpack.tar
        [ -tls <TLS enabled> ] # e.g -tls true or false, default is 'true'
        
    Example:
    ./deploy.sh -pi opentracing:ibmmq:ibmapic:ibmace:nginx:redis:dem:openshiftua -r monitor  -c /tmp/ibm-cloud-apm-dc-configpack.tar
    

    In the example, all the plug-ins of Unified Agent are deployed.

    Important:
    • If you deploy the Unified Agent in IBM® Cloud Private, make sure you log in to IBM Cloud Private before you perform this step.
    • You can select multiple plug-ins to install, but you can deploy only once in one cluster. Next time when you run the deploy.sh script, the plug-ins that were previously deployed will be removed and redeployed.
    • -tls is not mandatory. It is required or not depending on whether ssl/tls is enabled in your environment.
  4. Configure the plug-ins that you select to install in step 3.
  5. Validate the deployment.
    1. Verify whether pods are successfully started by running the following command:
      kubectl get po -n namespace |grep ua
    2. If pods fail to start, check the pod status and pod logs by running the following command:
      • Check pod status:
        kubectl describe po pod-name -n namespace
      • Check pod logs:
        kubectl logs pod-name -n namespace
    3. If you have any issues with the plug-ins, check the plug-in log details:
      1. Get the primary pod for the plug-in by running the following command:
        kubectl describe cm plug-in-configmap -n namespace
        Where plug-in-configmap is the name of the plug-in configmap, for example, it is ualk-nginx for NGINX.
        Example:
        kubectl describe cm ualk-nginx -n ua
        Name:         ualk-nginx
        Namespace:    ua
        Labels:       <none>
        Annotations:  control-plane.alpha.kubernetes.io/leader:
                        {"holderIdentity":"ua:monitor-ua-cloud-monitoring-jqhcr","leaseDurationSeconds":60,"acquireTime":"2019-09-25T03:10:21Z","renewTime":"2019-...
        
        Data
        ====
        Events:  <none>
        In this example, monitor-ua-cloud-monitoring-jqhcr is the primary pod.
    4. Detail logs are located at var/log/ua.log in container by default. You can change log location by XXX. Run the following command to open the detail log:
      kubectl exec -it primary-pod -n ua cat var/log/ua.log
      Where primary-pod is the name of the primary pod of the plug-in, for example, monitor-ua-cloud-monitoring-jqhcr.

Results

The Unified Agent plug-ins are installed and begin sending data to the Cloud App Management server for display in the Resources dashboard pages.