Cavisson Agent Installation on Kubernetes

Overview

This document details the Cavisson observability agent installation process in a Kubernetes environment to monitor the cluster, node, pod, container, and application levels.

Pre-Requisite(s)

  1. Outbound connectivity to from all POC servers

Installation Steps

Machine Agent Installation

Machine Agent is deployed in the Daemon Set. A user can acquire images of machine agent for

use with the Docker Engine from the repository: cavissonsystem/cmon:4.13.0.xx at the Docker Hub.

Following are the steps to deploy machine agent as a Daemon Set in Kubernetes environment

Create ConfigMap

  1. Create a yaml file cmon-config.yaml with below content

apiVersion: v1

kind: ConfigMap

metadata:

name: cmon-config

namespace: default

data:

NDC_COMM_PROTOCOL: WSS

TIER: DxpTier

CAV_CLUSTER_NAME: DxpTier

 

  1. Apply cmon-config.yaml which creates a config map

kubectl apply –f cmon-config.yaml

Config map can be verified by executing kubectl describe configMap cmon-config. Following is a sample output of the kubectl describe command:

Deploy Daemonset

  1. Download the cmon.yaml file from cavisson build repository

wget https://nde.cav-test.com/HUB/kubernetescloud/cmon.yaml –no-check-certificate

  1. Create pod using downloaded configuration file

kubectl apply –f cmon.yaml

  1. Verify CMON daemonset is created successfully. The result should show cmon-xxx pod is

ready, running and available (as shown in fig)

 

kubectl get pods -l app=cmon

 

Sample Output

kubeadmin@kube-master:~$ kubectl get pods -l app=cmon

NAME READY STATUS RESTARTS AGE

cmon-hxpjp 1/1 Running 0 3d22h

cmon-pf87q 1/1 Running 0 3d22h

cmon-wdjvt 1/1 Running 3 3d22h

Note: The cmon pod will automatically start monitoring of any new node/pod being created in the kubernetes cluster.

Application Agent Installation

 

  1. Download the application agent package

 

  1. Create ndsettings.conf file and specify below configuration (this file should be created in the directory where application docker file exists).

tier=DxpTier 
ndcPort=443                          NDC_COMM_PROTOCOL=WSS,WS,TCP

Note: TierName should be a name that defines services running in the pod (‘nginx’ for nginx service). ‘ndcHost’ is domain name or IP address of cavisson server.

  1. Copy the agent package at path where your application docker file exists. Append your application docker file with the following lines.

RUN mkdir -p /opt/cavisson/netdiagnostics

COPY ndsettings.conf /opt/cavisson/netdiagnostics/config/

RUN chmod -R 777 /opt/cavisson/netdiagnostics

  1. Modify the application’s jvm arguments with the following application agent’s arguments to include cavisson agent

–                            javaagent:/opt/cavisson/netdiagnostics/lib/ndmain.jar=time,ndAgentJar=/opt/cavisson/net

diagnostics/lib/ndagent-with-dep.jar,ndHome=/opt/cavisson/netdiagnostics                          

  1. Build the application docker image using the ‘docker build’ command.
  2. Now deploy this image.