HUB
Sign inSign up

bhaab01/openshiftmonitor

By bhaab01

•Updated over 7 years ago

CA APM Openshift Monitoring

Image
0

10K+

bhaab01/openshiftmonitor repository overview

⁠CA APM Openshift Monitor

CA APM OpenShift Monitoring is an extension that provides full monitoring insights into the hosts and applications that you deploy with OpenShift. 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. 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 Openshift DeploymentConfig
  • Bug Fixes

1.0

  • Initial version of Openshift Monitor

⁠Installation

  • Create a project called "caapm"
oc new-project caapm
  • Download image stream

CentOS based:

oc import-image my-ca/apm-openshiftmonitor --from=docker.io/caapm/openshiftmonitor:latest --confirm

RHEL based:

oc import-image my-ca/apm-openshiftmonitor --from=registry.connect.redhat.com/ca/apm-openshiftmonitor --confirm
  • Install via YML file
oc create -f caagent-openshiftmonitor.yml -n caapm
⁠Note :
[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 
[OPENSHIFT_CONNECTION_URL] : Openshif connection details . This can be obtained by running  oc config view
[APITOKEN] : API Token for the connection URL. See How to obtain the APITOKEN section below
[registry_url] : Openshift registry details. See How to obtain the registry details section
⁠Content of caagent-openshiftmonitor.yml
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: caagent
  labels:
    tier: monitoring
    app: caagent
    version: v1

spec:
  # oc adm policy add-scc-to-user privileged -z default
  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: Openshift
            - name: interval
              value: "60"

          name: podmonitor
          image: [registry_url]/caapm/apm-openshiftmonitor: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: v1
kind: DeploymentConfig
metadata:
  name: caagent-deployment
  labels:
    tier: monitoring
    app: caagent_v2
    version: v1

spec:
  replicas: 1
  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: [OPENSHIFT_CONNECTION_URL]
            - name: apitoken
              value: [APITOKEN]
            - name: type
              value: Openshift
            - name: HostMonitoring
              value: disabled
            - name: MIN_HEAP_VAL_IN_MB
              value: "400"
            - name: MAX_HEAP_VAL_IN_MB
              value: "800"
        
          name: osemetainfo
          image: [registry_url]/caapm/apm-openshiftmonitor: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
oc login -u system:admin
oc project default
oc create sa caapm
  • Add cluster-reader role
oc adm policy add-cluster-role-to-user cluster-reader system:serviceaccount:default:caapm
  • Get token
oc sa get-token -n default caapm
⁠How to obtain the registry details
  • Identify docker-registry service
oc login -u system:admin
oc get svc -n default
  • Sample output would be
NAME              CLUSTER-IP       EXTERNAL-IP   PORT(S)                   AGE
docker-registry   172.30.1.1       <none>        5000/TCP                  9d
  • Here registry_url would be
172.30.1.1:5000
Tag summary
Recent tags
Content type
Image
Digest
Size
240.9 MB
Last updated
over 7 years ago
docker pull bhaab01/openshiftmonitor:saas-production