caapm/openshiftmonitor

By caapm

Updated almost 6 years ago

CA APM Openshift Monitoring

Image
7

1M+

caapm/openshiftmonitor repository overview

DX 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.

Minimum Supported Version

Docker Remote API v17.06 Docker Server version 1.11.x Openshift 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12

Supported Tags
TagsDateSupported APM VersionInternal Build Number
latest15-Jan-202011.x, DX APMRelease 20.1.0.0_fixes ( 24 )
2020011415-Jan-202011.x, DX APMRelease 20.1.0.0_fixes ( 24 )
2.0.218-Feb-2019APM SaaS (DxI) , 10.7 SP2 +Release 10.7.0.45 ( 990045 )
2.0.126-Oct-2018APM SaaS (DxI) , 10.7 SP2 +Release 10.6.0.179 ( 990179 )
2.003-Oct-2018APM SaaS (DxI) , 10.7 SP2 +Release 10.6.0.173 ( 990173 )
1.014-Apr-201810.7 , SP1Release 10.7.0.0_sp (Build 22)
Tag content

latest

  • Pointing to 20141401 tag (alpine based ), for RHEL based image use rhel-20.1.0 tag

20200114

  • Support for s390x ( Not supported for RHEL based image )

2.0.2.5

  • Base image is changed to alpine
  • Project level filtering of data
  • Liveliness Probe

2.0.2

  • Fix 3rd party vulnerability and create a slim image
  • Platform Support till 3.12
  • Add support on installing Agent on Master Nodes
  • Bug fixes

2.0.1

  • Support for percentage utilisation for Memory RSS , Memory Cache and Memory Swap

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
  • Provide Cluster read permission for default Service Account
oc adm policy add-cluster-role-to-user cluster-reader system:serviceaccount:caapm:default
  • Make sure the project has access to run with root access
oc adm policy add-scc-to-user anyuid system:serviceaccount:caapm:default
  • Make sure the project has access to run with priviledged access
oc adm policy add-scc-to-user privileged system:serviceaccount:caapm:default
  • Download image stream

Alpine 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=docker.io/caapm/openshiftmonitor:rhel-20.1.0 --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
      tolerations:
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      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: MIN_HEAP_VAL_IN_MB
              value: "64"
            - name: apmenv_introscope_agent_extensions_bundles_load
              value: OpenshiftMonitor, HostMonitor

          name: podmonitor
          image: [registry_url]/caapm/apm-openshiftmonitor:latest
          imagePullPolicy: Always
          livenessProbe:
            exec:
              command:
              - /bin/bash
              - -c
              - "if (( $(expr `date +%s` - `stat -c %Y /tmp/apmia-health/extensions/Docker-health.txt`) > 120 )); then exit 1; fi"
            initialDelaySeconds: 120
          resources:
            limits:
              cpu: 2
              memory: 700Mi
            requests:
              cpu: 200m
              memory: 300Mi

          volumeMounts:
            - name: dockersock
              mountPath: /var/run/docker.sock
              readOnly: true
            - name: proc
              mountPath: /host/proc
              readOnly: true
      volumes:
        - name: dockersock
          hostPath:
            path: /var/run/docker.sock
        - name: proc
          hostPath:
            path: /proc
---
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:
      hostPID: true
      hostIPC: true
      hostNetwork: true
      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: "64"
          name: osemetainfo
          image: [registry_url]/caapm/apm-openshiftmonitor:latest
          resources:
            limits:
              cpu: 2
              memory: 700Mi
            requests:
              cpu: 200m
              memory: 300Mi
          imagePullPolicy: Always
          livenessProbe:
            exec:
              command:
              - /bin/bash
              - -c
              - "if (( $(expr `date +%s` - `stat -c %Y /tmp/apmia-health/extensions/Openshift-health.txt`) > 900 )); then exit 1; fi"
            initialDelaySeconds: 120


          
How to obtain the APITOKEN
  • Run the following command to obtain the apitoken for default service account under caapm project
oc sa get-token -n caapm default
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

FAQ and Troubleshooting

How to monitor some specific project from my entire cluster ?

If you want to capture data from project1 and project2 only – you need to pass this additional ENV variable during deployment on both DaemonSet and Deployment configuration :

- name: KUBERNETES_NAMESPACE_MONITOR_LIST 
  value: project1, project2
Agent fails to connect to 10.7 EM

If you are using the image from latest or 20200114 tag or rhel-20.1.0 tag onwards , you need to pass this additional ENV variable in both Deployment and DaemonSet Pods in order to establish the connection to 10.7 EM. This is not needed in case you are connecting to SaaS or 11.X EM

- name: apmenv_introscope_agent_connection_compatibility_version
  value: "10.7"

Uninstallation

oc delete -f caagent-openshiftmonitor.yml 

Tag summary

Content type

Image

Digest

Size

345.4 MB

Last updated

almost 6 years ago

docker pull caapm/openshiftmonitor:haproxy