Sign inSign up

bhaab01/kubernetesmonitor

By bhaab01

Updated almost 7 years ago

CA APM Kubernetes Monitoring

Image
0

10K+

bhaab01/kubernetesmonitor repository overview

CA APM Kubernetes Monitor

CA APM Kubernetes Monitoring is an extension that provides full monitoring insights into the containerized applications that you deploy, scale and manage with Kubernetes. Use the extension to monitor the availability and performance of your containerized applications, processes and cloud instances. Manage dependencies between your hosts and applications in Docker and Kubernetes container clusters in real time, and use the collected metrics data to streamline up or down-scaling of your environment.

Supported Tags
TagsDateSupported APM VersionInternal Build Number
latest03-Oct-2018APM SaaS (DxI) , 10.7 SP2 +10.6.0.144
2.003-Oct-2018APM SaaS (DxI) , 10.7 SP2 +10.6.0.144
1.014-Apr-201810.7 , SP110.7.0.0_sp (Build 22)
Tag content

latest

  • Pointing to 2.0 tag

2.0

  • Support for Throttling Metrics of Kubernetes Pod
  • Support for CPU Utilization (mCore) and Memory Cache & RSS metrics
  • Address possible Metric Explosion due to frequent scale up and down
  • Cluster node metrics
  • Health of the Kubernetes Deployment
  • Bug Fixes

1.0

  • Initial version of KubernetesMonitor

Installation

Run the following yml

kubectl create -f caagent-kubernetesmonitor.yml 
Note :
  • The following YML file contains a deployment & daemonset and the containers need to run in privileged mode.

  • Replace the following variables with your setup details

[AGENTMANAGER_URL]  : Agent/EM Connection details - similar to what we provide on IntroscopeAgent.profile
[AGENTMANAGER_CREDENTIAL] : Agent Manager Credentials needed to connect any SaaS instance 
[KUBERNETES_CONNECTION_URL] : Kubernetes connection details . This can be obtained by running  kubectl config view
[APITOKEN] : API Token for the connection URL. You can obtain this through creating a service account with cluster-reader role on the default workspace.
Content of caagent-kubernetesmonitor.yml
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: caagent
  labels:
    tier: monitoring
    app: caagent
    version: v1

spec:
  template:
    metadata:
      labels:
        app: caagent
    spec:
      hostPID: true
      hostIPC: true
      hostNetwork: true
      containers:
        - resources:
          securityContext:
            privileged: true

          env:
            - name: containerflow
              value: enabled
            - name: agentManager_url_1
              value: [AGENTMANAGER_URL]
            - name: agentManager_credential
              value: [AGENTMANAGER_CREDENTIAL]
            - name: type
              value: Kubernetes
            - name: interval
              value: "60"

          name: podmonitor
          image: caapm/kubernetesmonitor:latest
          imagePullPolicy: Always
          resources:
            limits:
              cpu: 500m
              memory: 700Mi
            requests:
              cpu: 200m
              memory: 300Mi

          volumeMounts:
            - name: dockersock
              mountPath: /var/run/docker.sock
            - name: proc
              mountPath: /host/proc
            - name: dev
              mountPath: /host/dev
            - name: sys
              mountPath: /host/sys
            - name: boot
              mountPath: /host/boot
            - name: home
              mountPath: /host/home
            - name: var
              mountPath: /host/var
            - name: run
              mountPath: /host/run
  
      volumes:
        - name: dockersock
          hostPath:
            path: /var/run/docker.sock
        - name: proc
          hostPath:
            path: /proc
        - name: dev
          hostPath:
            path: /dev
        - name: sys
          hostPath:
            path: /sys
        - name: boot
          hostPath:
            path: /boot
        - name: home
          hostPath:
            path: /home
        - name: var
          hostPath:
            path: /var
        - name: run
          hostPath:
            path: /run
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: caagent-deployment
  labels:
    tier: monitoring
    app: caagent_v2
    version: v1

spec:
  # oc adm policy add-scc-to-user privileged -z default
  template:
    metadata:
      labels:
        app: caagent_v2
    spec:
      containers:
        - resources:
          securityContext:
            privileged: true

          env:
            - name: agentManager_url_1
              value: [AGENTMANAGER_URL]
            - name: agentManager_credential
              value: [AGENTMANAGER_CREDENTIAL]
            - name: connectionurl
              value: [KUBERNETES_CONNECTION_URL]
            - name: apitoken
              value: [APITOKEN]
            - name: type
              value: Kubernetes
            - name: HostMonitoring
              value: disabled
            - name: MIN_HEAP_VAL_IN_MB
              value: "400"
            - name: MAX_HEAP_VAL_IN_MB
              value: "800"
          name: kubemetainfo
          image: caapm/kubernetesmonitor:latest
          resources:
            limits:
              cpu: 700m
              memory: 1000Mi
            requests:
              cpu: 400m
              memory: 500Mi
          imagePullPolicy: Always
How to obtain the APITOKEN
  • Create a Service Account on "default" namespace
kubectl create sa caapm
  • Add cluster-reader role
kubectl create clusterrolebinding cluster-read --serviceaccount=default:caapm  --clusterrole=cluster-admin
  • Get token
kubectl get secrets|grep caapm-token| cut -f1 -d " "|xargs kubectl describe secret | grep token

Uninstallation

kubectl delete -f caagent-kubernetesmonitor.yml

Tag summary

Content type

Image

Digest

Size

388.5 MB

Last updated

almost 7 years ago

docker pull bhaab01/kubernetesmonitor