--- # Source: uma/templates/configmap_general.yaml # Common comfig map needed for All extensions apiVersion: v1 kind: ConfigMap metadata: name: caaiops-config-common namespace: caapm data: cluster_name: "SandBox" agentManager_url_1: "localhost:5001" agentManager_credential: "credential" agentManager_version: "" agentManager_httpProxy_host: "" agentManager_httpProxy_port: "" agentManager_httpProxy_username: "" agentManager_httpProxy_password: "" prometheus_server_url: "http://:" prometheus_server_username: "" prometheus_server_password: "" prometheus_server_token: "" apmia_min_heap: "256" apmia_max_heap: "512" agentNaming_deployment_apmia_host: "SandBox" agentNaming_deployment_apmia_process: "ClusterDeployment" agentNaming_deployment_apmia_agent: "Infrastructure Agent" agentNaming_deployment_prometheus_host: "SandBox" agentNaming_deployment_prometheus_process: "ClusterPerformanceMonitor" agentNaming_deployment_prometheus_agent: "Prometheus Agent" agentNaming_daemonset_apmia_host: "" agentNaming_daemonset_apmia_process: "SandBox" agentNaming_daemonset_apmia_agent: "Kubernetes Agent" opentracing_grpc_hostport: "" --- # Source: uma/templates/configmap_prometheus.yaml apiVersion: v1 kind: ConfigMap metadata: name: caaiops-config-prometheus namespace: caapm data: kubernetes_remote_monitoring_bundles_load: KubernetesRemoteMonitor default.properties: | prometheus.metric.sets: set1 prometheus.metric.set1.metric_list: prometheus.metric.set1.apm_metric_path: prometheus.metric.set1.apm_metric_type: LongFluctuating prometheus.metric.set1.aggregation_type: sum additional.label.sets: cadvisor.properties: | prometheus.metric.sets:set1,set2 prometheus.metric.set1.metric_list: container_cpu_usage_seconds_total,container_spec_cpu_quota,container_spec_cpu_period,container_cpu_usage_seconds_total,container_cpu_cfs_throttled_seconds_total,container_memory_working_set_bytes,container_memory_max_usage_bytes,container_memory_failcnt,container_fs_writes_bytes_total,container_fs_reads_bytes_total,container_network_receive_bytes_total,container_network_transmit_bytes_total,container_network_receive_packets_dropped_total,container_network_transmit_packets_dropped_total prometheus.metric.set1.apm_metric_path: Kubernetes|Namespaces|(aiops_namespace)|Pods|(aiops_pod)|Containers|(aiops_container), Kubernetes|Namespaces|(aiops_namespace)|Pods|(aiops_pod) prometheus.metric.set1.apm_metric_type: LongFluctuating prometheus.metric.set1.aggregation_type: sum prometheus.metric.set2.metric_list: container_spec_memory_limit_bytes prometheus.metric.set2.apm_metric_path: Kubernetes|Namespaces|(aiops_namespace)|Pods|(aiops_pod)|Containers|(aiops_container):container_memory_max_usage_bytes, Kubernetes|Namespaces|(aiops_namespace)|Pods|(aiops_pod):container_memory_max_usage_bytes prometheus.metric.set2.apm_metric_type: LongFluctuating prometheus.metric.set2.aggregation_type: sum additional.label.sets: set1, set2, set3, set4, set5, set6 additional.label.set1.source_label: namespace additional.label.set1.target_label: aiops_namespace additional.label.set2.source_label: pod_name additional.label.set2.target_label: aiops_pod additional.label.set3.source_label: container_name additional.label.set3.target_label: aiops_container additional.label.set4.source_label: container_label_io_kubernetes_pod_namespace additional.label.set4.target_label: aiops_namespace additional.label.set5.source_label: container_label_io_kubernetes_pod_name additional.label.set5.target_label: aiops_pod additional.label.set6.source_label: container_label_io_kubernetes_container_name additional.label.set6.target_label: aiops_container node-exporter.properties: | prometheus.metric.sets: cpu,cpuload,memavailable,memtotal,diskreadwrite,filesystemfree,filesystemsize,network prometheus.metric.cpu.metric_list: node_cpu_seconds_total prometheus.metric.cpu.apm_metric_path: Prometheus|(node_name)|CPU:total_(aiops_mode)_node_cpu_seconds_total,Prometheus|(node_name)|CPU|Core(aiops_cpu):(aiops_mode)_node_cpu_seconds_total prometheus.metric.cpu.apm_metric_type:LongFluctuating prometheus.metric.cpu.aggregation_type:sum prometheus.metric.cpuload.metric_list:node_load1 prometheus.metric.cpuload.apm_metric_path:Prometheus|(node_name)|CPU prometheus.metric.memavailable.metric_list:node_memory_MemAvailable_bytes, node_memory_MemAvailable prometheus.metric.memavailable.apm_metric_path:Prometheus|(node_name)|Memory:node_memory_MemAvailable_bytes prometheus.metric.memtotal.metric_list:node_memory_MemTotal_bytes,node_memory_MemTotal prometheus.metric.memtotal.apm_metric_path:Prometheus|(node_name)|Memory:node_memory_MemTotal_bytes prometheus.metric.diskreadwrite.metric_list:node_disk_written_bytes_total,node_disk_read_bytes_total prometheus.metric.diskreadwrite.apm_metric_path:Prometheus|(node_name)|Storage prometheus.metric.filesystemfree.metric_list:node_filesystem_free_bytes prometheus.metric.filesystemfree.apm_metric_path:Prometheus|(node_name)|Storage:(aiops_device)_node_filesystem_free_bytes, Prometheus|(node_name)|Storage|(aiops_device)|(mountpoint) prometheus.metric.filesystemsize.metric_list:node_filesystem_size_bytes prometheus.metric.filesystemsize.apm_metric_path:Prometheus|(node_name)|Storage:(aiops_device)_node_filesystem_size_bytes, Prometheus|(node_name)|Storage|(aiops_device)|(mountpoint) prometheus.metric.network.metric_list:node_network_receive_bytes_total, node_network_transmit_bytes_total, node_network_receive_drop_total, node_network_transmit_drop_total, node_network_transmit_errs_total, node_network_receive_errs_total prometheus.metric.network.apm_metric_path:Prometheus|(node_name)|Network, Prometheus|(node_name)|Network|(aiops_device) additional.label.sets:set1, set2, set3, set4 additional.label.set1.source_label:device additional.label.set1.target_label:aiops_device additional.label.set2.source_label:cpu additional.label.set2.target_label:aiops_cpu additional.label.set3.source_label:mode additional.label.set3.target_label:aiops_mode kube-state-metric.properties: | prometheus.metric.sets=node_status,pod_status,unschedulable_node,container_status, container_waiting_reason,node_allocatable_capacity, daemonset1,daemonset2, deployments1, deployments2 prometheus.metric.node_status.metric_list=kube_node_status_condition prometheus.metric.node_status.apm_metric_path=Kubernetes|Nodes:kube_node_status_condition_(condition)_(status), Kubernetes|Nodes|(node):kube_node_status_condition_(condition)_(status) prometheus.metric.pod_status.metric_list=kube_pod_status_phase prometheus.metric.pod_status.apm_metric_path=Kubernetes|Namespaces:kube_pod_status_phase_(phase), Kubernetes|Namespaces|(namespace):kube_pod_status_phase_(phase) prometheus.metric.unschedulable_node.metric_list=kube_node_spec_unschedulable prometheus.metric.unschedulable_node.apm_metric_path=Kubernetes|Nodes, Kubernetes|Nodes|(node) prometheus.metric.container_status.metric_list=kube_pod_container_status_running, kube_pod_container_status_terminated, kube_pod_container_status_waiting prometheus.metric.container_status.apm_metric_path=Kubernetes|Namespaces, Kubernetes|Namespaces|(namespace) prometheus.metric.container_waiting_reason.metric_list=kube_pod_container_status_waiting_reason prometheus.metric.container_waiting_reason.apm_metric_path=Kubernetes|Namespaces|(namespace)|kube_pod_container_status_waiting_reason:(reason) prometheus.metric.node_allocatable_capacity.metric_list=kube_node_status_allocatable_cpu_cores, kube_node_status_capacity_cpu_cores, kube_node_status_allocatable_memory_bytes , kube_node_status_capacity_memory_bytes, kube_node_status_allocatable_pods, kube_node_status_capacity_pods prometheus.metric.node_allocatable_capacity.apm_metric_path=Kubernetes|Nodes, Kubernetes|Nodes|(node) prometheus.metric.daemonset1.metric_list=kube_daemonset_status_number_unavailable, kube_daemonset_status_desired_number_scheduled, kube_daemonset_status_number_available, kube_daemonset_updated_number_scheduled prometheus.metric.daemonset1.apm_metric_path=Kubernetes|Namespaces|(namespace), Kubernetes|Namespaces|(namespace)|kube_daemonset|(daemonset) prometheus.metric.daemonset2.metric_list=kube_daemonset_status_number_misscheduled, kube_daemonset_status_current_number_scheduled, kube_daemonset_status_number_ready prometheus.metric.daemonset2.apm_metric_path=Kubernetes|Namespaces, Kubernetes|Namespaces|(namespace), Kubernetes|Namespaces|(namespace)|kube_daemonset|(daemonset) prometheus.metric.deployments1.metric_list=kube_deployment_status_replicas, kube_deployment_status_replicas_available, kube_deployment_status_replicas_unavailable prometheus.metric.deployments1.apm_metric_path=Kubernetes|Namespaces, Kubernetes|Namespaces|(namespace), Kubernetes|Namespaces|(namespace)|kube_deployment|(deployment) prometheus.metric.deployments2.metric_list=kube_deployment_status_replicas_updated, kube_deployment_status_observed_generation, kube_deployment_spec_replicas, kube_deployment_spec_paused prometheus.metric.deployments2.apm_metric_path=Kubernetes|Namespaces|(namespace), Kubernetes|Namespaces|(namespace)|kube_deployment|(deployment) haproxy.properties: | prometheus.metric.sets:frontend, backend, server prometheus.metric.backend.metric_list:haproxy_backend_connections_total, haproxy_backend_current_queue, haproxy_backend_up prometheus.metric.backend.apm_metric_path:Kubernetes|HAProxyRouter|Backends|(backend) prometheus.metric.frontend.metric_list:haproxy_frontend_bytes_in_total,haproxy_frontend_max_sessions prometheus.metric.frontend.apm_metric_path:Kubernetes|HAProxyRouter|Frontends|(frontend) prometheus.metric.server.metric_list:haproxy_server_bytes_out_total, haproxy_server_check_failures_total, haproxy_server_connection_errors_total, haproxy_server_connections_total, haproxy_server_current_queue, haproxy_server_current_session_rate, haproxy_server_current_sessions, haproxy_server_downtime_seconds_total, haproxy_server_http_average_response_latency_milliseconds, haproxy_server_http_responses_total, haproxy_server_max_session_rate, haproxy_server_up, haproxy_server_response_errors_total prometheus.metric.server.apm_metric_path:Kubernetes|HAProxyRouter|Projects|(namespace)|Services|(service)|Pods|(pod) coredns.properties: | prometheus.metric.sets=build,cache,counter,request,response,forward,panic prometheus.metric.build.metric_list=coredns_build_info prometheus.metric.build.apm_metric_path=Kubernetes|Coredns|Build_info|(goversion)|Revision|(revision)|Version|(version) prometheus.metric.cache.metric_list=coredns_cache_misses_total prometheus.metric.cache.apm_metric_path=Kubernetes|Coredns|Cache|Server|(server) prometheus.metric.counter.metric_list=coredns_dns_request_count_total prometheus.metric.counter.apm_metric_path=Kubernetes|Coredns|Request|Family|(proto)|Server|(server)|zone-(zone) prometheus.metric.request.metric_list=coredns_dns_request_type_count_total prometheus.metric.request.apm_metric_path=Kubernetes|Coredns|Request|Server|(server)|Query_type|(type)|Zone-(zone) prometheus.metric.response.metric_list=coredns_dns_response_rcode_count_total prometheus.metric.response.apm_metric_path=Kubernetes|Coredns|Response|(rcode)|Server|(server)|Zone-(zone) prometheus.metric.forward.metric_list=coredns_forward_healthcheck_failure_count_total,coredns_forward_sockets_open prometheus.metric.forward.apm_metric_path=Kubernetes|Coredns|Forward|Destination_IP|(to) prometheus.metric.panic.metric_list=coredns_panic_count_total prometheus.metric.panic.apm_metric_path=Kubernetes|Coredns additional.label.sets=set1 additional.label.set1.source_label=family additional.label.set1.target_label=Family etcd.properties: | prometheus.metric.sets=server,disk,network,debugging,grpc,snapdb,process,mvcc,go prometheus.metric.server.metric_list=etcd_server_go_version, etcd_server_has_leader, etcd_server_health_failures, etcd_server_health_success, etcd_server_heartbeat_send_failures_total, etcd_server_id, etcd_server_is_leader,etcd_server_leader_changes_seen_total, etcd_server_proposals_applied_total, etcd_server_proposals_committed_total, etcd_server_proposals_failed_total, etcd_server_proposals_pending, etcd_server_quota_backend_bytes,etcd_server_read_indexes_failed_total, etcd_server_slow_apply_total, etcd_server_slow_read_indexes_total, etcd_server_snapshot_apply_in_progress_total, etcd_server_version prometheus.metric.server.apm_metric_path=Kubernetes|etcd|server prometheus.metric.disk.metric_list=etcd_disk_backend_commit_duration_seconds, etcd_disk_backend_defrag_duration_seconds, etcd_disk_backend_snapshot_duration_seconds, etcd_disk_wal_fsync_duration_seconds prometheus.metric.disk.apm_metric_path=Kubernetes|etcd|disk prometheus.metric.network.metric_list=etcd_network_client_grpc_received_bytes_total, etcd_network_client_grpc_sent_bytes_total, etcd_network_peer_received_bytes_total, etcd_network_peer_received_failures_total, etcd_network_peer_round_trip_time_seconds etcd_network_peer_sent_bytes_total, etcd_network_peer_sent_failures_total prometheus.metric.network.apm_metric_path=Kubernetes|etcd|network prometheus.metric.debugging.metric_list=etcd_debugging_mvcc_compact_revision, etcd_debugging_mvcc_current_revision, etcd_debugging_mvcc_db_compaction_keys_total, etcd_debugging_mvcc_db_compaction_pause_duration_milliseconds, etcd_debugging_mvcc_db_compaction_total_duration_milliseconds, etcd_debugging_mvcc_db_total_size_in_bytes, etcd_debugging_mvcc_delete_total, etcd_debugging_mvcc_events_total, etcd_debugging_mvcc_index_compaction_pause_duration_milliseconds, etcd_debugging_mvcc_keys_total, etcd_debugging_mvcc_pending_events_total, etcd_debugging_mvcc_put_total, etcd_debugging_mvcc_range_total, etcd_debugging_mvcc_slow_watcher_total, etcd_debugging_mvcc_total_put_size_in_bytes, etcd_debugging_mvcc_txn_total, etcd_debugging_mvcc_watch_stream_total, etcd_debugging_mvcc_watcher_total, etcd_debugging_server_lease_expired_total, etcd_debugging_snap_save_marshalling_duration_seconds, etcd_debugging_snap_save_total_duration_seconds, etcd_debugging_store_expires_total, etcd_debugging_store_reads_total, etcd_debugging_store_watch_requests_total, etcd_debugging_store_watchers, etcd_debugging_store_writes_total prometheus.metric.debugging.apm_metric_path=Kubernetes|etcd|debugging prometheus.metric.grpc.metric_list=etcd_grpc_proxy_cache_hits_total, etcd_grpc_proxy_cache_keys_total, etcd_grpc_proxy_cache_misses_total, etcd_grpc_proxy_events_coalescing_total, etcd_grpc_proxy_watchers_coalescing_total prometheus.metric.grpc.apm_metric_path=Kubernetes|etcd|grpc prometheus.metric.snapdb.metric_list=etcd_snap_db_save_total_duration_seconds,etcd_snap_db_fsync_duration_seconds prometheus.metric.snapdb.apm_metric_path=Kubernetes|etcd|snapshot prometheus.metric.process.metric_list=process_open_fds, process_max_fds, process_cpu_seconds_total, process_resident_memory_bytes, process_start_time_seconds, process_virtual_memory_bytes prometheus.metric.process.apm_metric_path=Kubernetes|etcd|process prometheus.metric.mvcc.metric_list=etcd_mvcc_db_total_size_in_bytes, etcd_mvcc_db_total_size_in_use_in_bytes, etcd_mvcc_hash_duration_seconds, etcd_mvcc_hash_rev_duration_seconds prometheus.metric.mvcc.apm_metric_path=Kubernetes|etcd|mvcc --- # Source: uma/templates/service_account.yaml apiVersion: v1 kind: ServiceAccount metadata: name: uma namespace: caapm --- # Source: uma/templates/role.yaml apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRole metadata: name: uma-cluster-role rules: - apiGroups: - "" resources: - nodes - nodes/proxy - services - pods - pods/exec - resourcequotas - replicationcontrollers - limitranges - namespaces - persistentvolumes - persistentvolumeclaims verbs: - get - create - list - watch - apiGroups: - apps resources: - deployments - replicasets - daemonsets verbs: - get - list - watch - create - patch - apiGroups: - extensions resources: - deployments - replicasets - daemonsets verbs: - get - list - watch - create - patch - delete - apiGroups: - "" resources: - configmaps - secrets verbs: - '*' - apiGroups: - ca.broadcom.com resources: - '*' verbs: - '*' - apiGroups: - security.openshift.io resources: - securitycontextconstraints resourceNames: - anyuid - privileged verbs: - use --- # Source: uma/templates/role_binding.yaml # ClusterRoleBinding for binding with Service Account apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: name: uma-cluster-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: uma-cluster-role subjects: - kind: ServiceAccount name: uma namespace: caapm --- # Source: uma/templates/service_clusterdiscovery.yaml # Service for Cluster Discovery apiVersion: v1 kind: Service metadata: name: clusterinfo namespace: caapm spec: selector: module: clusterinfo ports: - port: 8080 type: ClusterIP --- # Source: uma/templates/daemonset_apmia.yaml # DaemonSet Configuration # Agent from Container1 will be reported to |Infrastructure|Agent # Agent from Container2 will be reported to |Application|JMX Agent apiVersion: apps/v1 kind: DaemonSet metadata: name: app-container-monitor namespace: caapm labels: tier: monitoring app: cagent spec: # oc adm policy add-scc-to-user privileged -z default selector: matchLabels: app: caagent template: metadata: labels: app: caagent annotations: ca.broadcom.application.name: container-monitoring spec: hostPID: true hostIPC: true hostNetwork: true tolerations: - key: node-role.kubernetes.io/master effect: NoSchedule - key: node-role.kubernetes.io/storage effect: NoSchedule - key: node-role.kubernetes.io/infra effect: NoSchedule serviceAccountName: uma initContainers: - name: init-clusterinfo image: caapm/universalmonitoragent:stable-osev4 command: ['bash', '-c', 'until [ $(curl --connect-timeout 5 --max-time 10 --write-out %{http_code} --silent --output /dev/null ${CLUSTERINFO_SERVICE_HOST}:${CLUSTERINFO_SERVICE_PORT}/up) -eq 200 ]; do sleep 2; done'] containers: - name: containerinfo image: caapm/universalmonitoragent:stable-osev4 imagePullPolicy: Always command: ["/containerinfo-linux-amd64","--config=/usr/local/openshift/config/config.yaml"] livenessProbe: httpGet: path: /runtime/info port: 7777 initialDelaySeconds: 60 periodSeconds: 60 resources: limits: cpu: 100m memory: 150Mi volumeMounts: - name: dockersock mountPath: /var/run/docker.sock readOnly: true - name: criosock mountPath: /var/run/crio/crio.sock readOnly: true - name: containerdsock mountPath: /run/containerd/containerd.sock readOnly: true - name: sys mountPath: /host/sys readOnly: true - name: proc mountPath: /host/proc readOnly: true - env: - name: containerflow value: disabled - name: agentManager_url_1 valueFrom: configMapKeyRef: key: agentManager_url_1 name: caaiops-config-common - name: agentManager_credential valueFrom: configMapKeyRef: key: agentManager_credential name: caaiops-config-common - name: apmenv_introscope_agent_connection_compatibility_version valueFrom: configMapKeyRef: key: agentManager_version name: caaiops-config-common - name: type value: Kubernetes - name: interval value: "60" - name: DOCKERSTATS_CGROUP_MODE value: enabled - name: apmenv_introscope_agent_extensions_bundles_load value: java-attach, dotnet-attach,kubernetes-overrider,KubernetesRemoteMonitor, ########################## # Auto Attach properties: ########################## - name: apmenv_autoattach_enable_agentNameSuffix value: "false" # Free memory threshold required for attaching to containers (%) - name: apmenv_autoattach_free_memory_threshold value: "50.00" # Interval for attaching to memory unbounded containers (sec). One unbounded container will be attached to per interval. - name: apmenv_autoattach_unbounded_container_attach_interval value: "300" # Operation Mode for Auto Attach (whitelist/blacklist). # whitelist: will only attach to processes marked with env variable CA_APM_MONITORING_ENABLED=true # blacklist: will attach to all processes except those marked with env variable CA_APM_MONITORING_ENABLED=false - name: apmenv_autoattach_filter_type value: "whitelist" - name: apmenv_autoattach_java_enabled_applications value: " " # Properties for aggressively monitoring every JVM - name: apmenv_autoattach_java_proactiveMode_enabled value: "true" - name: apmenv_autoattach_java_proactiveMode_agent_load_delay value: "300" - name: apmenv_autoattach_net_enabled_applications value: " " # Properties for aggressively monitoring every.NET Runtime - name: apmenv_autoattach_net_proactiveMode_enabled value: "true" - name: apmenv_autoattach_net_proactiveMode_agent_load_delay value: "30" - name: apmenv_com_ca_apm_kubernetes_remote_monitor_type value: jmx,prometheus - name: apmenv_com_ca_apm_kubernetes_autodiscovery_local value: "true" - name: nodename valueFrom: fieldRef: fieldPath: spec.nodeName - name: apmenv_com_ca_apm_kubernetes_clusterName valueFrom: configMapKeyRef: key: cluster_name name: caaiops-config-common - name: apmenv_com_ca_apm_kubernetes_prometheus_datafile value: node-exporter, cadvisor - name: apmenv_introscope_agent_hostName valueFrom: configMapKeyRef: key: agentNaming_daemonset_apmia_host name: caaiops-config-common - name: apmenv_introscope_agent_customProcessName valueFrom: configMapKeyRef: key: agentNaming_daemonset_apmia_process name: caaiops-config-common - name: apmenv_introscope_agent_agentName valueFrom: configMapKeyRef: key: agentNaming_daemonset_apmia_agent name: caaiops-config-common - name: MIN_HEAP_VAL_IN_MB value: "64" - name: apmenv_introscope_epagent_config_httpServerPort value: "8888" - name: REDUCE_METRIC_EXPLOSION value: "false" - name: apmenv_com_ca_apm_kubernetes_monitor_legacy value: "false" name: podmonitor image: caapm/universalmonitoragent:stable-osev4 resources: limits: cpu: 2 memory: 1G requests: cpu: 200m memory: 300Mi livenessProbe: httpGet: path: /healthz port: 8888 initialDelaySeconds: 60 periodSeconds: 60 imagePullPolicy: Always # resources: # limits: # cpu: 500m # memory: 700Mi # requests: # cpu: 200m # memory: 300Mi securityContext: privileged: true volumeMounts: - name: dockersock mountPath: /var/run/docker.sock readOnly: true - name: dev mountPath: /host/dev readOnly: true - name: run mountPath: /host/run readOnly: true - name: sys mountPath: /host/sys readOnly: true - name: boot mountPath: /host/boot readOnly: true - name: home mountPath: /host/home readOnly: true - name: proc mountPath: /host/proc readOnly: true - name: config-volume mountPath: /usr/local/openshift/apmia/extensions/KubernetesRemoteMonitor/config/prometheus volumes: - name: dockersock hostPath: path: /var/run/docker.sock - name: criosock hostPath: path: /var/run/crio/crio.sock - name: containerdsock hostPath: path: /run/containerd/containerd.sock - name: dev hostPath: path: /dev - name: run hostPath: path: /run - name: sys hostPath: path: /sys - name: boot hostPath: path: /boot - name: home hostPath: path: /home - name: proc hostPath: path: /proc - name: config-volume configMap: name: caaiops-config-prometheus --- # Source: uma/templates/deployment_apmia.yaml # ( and .Values.monitor.container.prometheus.backend.endPoint.url .Values.agentManager.url ) # APMIA based Deployment. # Agent from Container1 will be reported to |ClusterMonitoring|Infrastructure Agent apiVersion: apps/v1 kind: Deployment metadata: name: container-monitor namespace: caapm labels: app: apmia-deployment spec: replicas: 1 template: metadata: name: apmia-deployment labels: app: apmia-deployment deployment.name: container-monitor spec: serviceAccountName: uma initContainers: - name: init-clusterinfo image: caapm/universalmonitoragent:stable-osev4 command: ['bash', '-c', 'until [ $(curl --connect-timeout 5 --max-time 10 --write-out %{http_code} --silent --output /dev/null ${CLUSTERINFO_SERVICE_HOST}:${CLUSTERINFO_SERVICE_PORT}/up) -eq 200 ]; do sleep 2; done'] containers: - env: - name: agentManager_url_1 valueFrom: configMapKeyRef: key: agentManager_url_1 name: caaiops-config-common - name: agentManager_credential valueFrom: configMapKeyRef: key: agentManager_credential name: caaiops-config-common - name: apmenv_introscope_agent_connection_compatibility_version valueFrom: configMapKeyRef: key: agentManager_version name: caaiops-config-common - name: interval value: "120" - name: KUEBRNETES_CLUSTER_MONITORING value: "true" - name: apmenv_introscope_epagent_config_httpServerPort value: "8888" - name: REDUCE_METRIC_EXPLOSION value: "false" - name: type value: "Kubernetes" - name: HostMonitoring value: disabled - name: apmenv_com_ca_apm_clusterdatareporter_additional_attributes_cluster value: k8s_cluster_name=(k8s_cluster_clustername) - name: apmenv_com_ca_apm_clusterdatareporter_additional_attributes_node value: k8s_cluster_name=(k8s_node_clustername), k8s_pod_nodename=(name), k8s_node_agentpath=(agent) - name: apmenv_com_ca_apm_clusterdatareporter_additional_attributes_namespace value: k8s_project=(name), k8s_cluster_name=(k8s_namespace_clustername) - name: apmenv_com_ca_apm_clusterdatareporter_additional_attributes_pod value: k8s_pod_name=(name), k8s_project=(k8s_pod_namespace), k8s_cluster_name=(k8s_pod_clustername) - name: apmenv_com_ca_apm_clusterdatareporter_additional_attributes_deployment value: k8s_project=(k8s_deployment_namespace), k8s_cluster_name=(k8s_deployment_clustername) - name: apmenv_com_ca_apm_clusterdatareporter_additional_attributes_daemonset value: k8s_project=(k8s_daemonset_namespace), k8s_cluster_name=(k8s_daemonset_clustername) - name: apmenv_com_ca_apm_clusterdatareporter_additional_attributes_container value: k8s_pod_nodename=(k8s_container_nodename), k8s_pod_container_name=(name), k8s_pod_name=(k8s_container_podname),k8s_project=(k8s_container_namespace),k8s_pod_container_id=(k8s_container_id), k8s_cluster_name=(k8s_container_clustername) - name: apmenv_com_ca_apm_clusterdatareporter_additional_attributes_replicaset value: k8s_project=(k8s_replicaset_namespace), k8s_cluster_name=(k8s_replicaset_clustername) - name: apmenv_com_ca_apm_clusterdatareporter_additional_attributes_service value: k8s_project=(k8s_service_namespace), k8s_cluster_name=(k8s_service_clustername) - name: apmenv_cluster_name valueFrom: configMapKeyRef: key: cluster_name name: caaiops-config-common - name: apmenv_introscope_agent_customProcessName valueFrom: configMapKeyRef: key: agentNaming_deployment_apmia_process name: caaiops-config-common - name: apmenv_introscope_agent_hostName valueFrom: configMapKeyRef: key: agentNaming_deployment_apmia_host name: caaiops-config-common - name: apmenv_introscope_agent_agentName valueFrom: configMapKeyRef: key: agentNaming_deployment_apmia_agent name: caaiops-config-common - name: apmenv_introscope_agent_extensions_bundles_load value: OpenTracing, - name: MIN_HEAP_VAL_IN_MB value: "64" - name: cluster_name valueFrom: configMapKeyRef: key: cluster_name name: caaiops-config-common - name: apmenv_introscope_agent_opentracing_grpc_server_hostport valueFrom: configMapKeyRef: key: opentracing_grpc_hostport name: caaiops-config-common name: uma image: caapm/universalmonitoragent:stable-osev4 livenessProbe: httpGet: path: /healthz port: 8888 initialDelaySeconds: 60 periodSeconds: 60 resources: limits: cpu: 2 memory: 1G requests: cpu: 200m memory: 300Mi imagePullPolicy: Always restartPolicy: Always selector: matchLabels: app: apmia-deployment --- apiVersion: v1 kind: Service metadata: name: opentracing namespace: caapm spec: selector: app: apmia-deployment ports: - nodePort: 31313 port: 8888 protocol: TCP targetPort: 8888 type: LoadBalancer --- # Source: uma/templates/deployment_clusterdiscovery.yaml # Cluster Discovery Service apiVersion: apps/v1 kind: Deployment metadata: name: clusterinfo namespace: caapm labels: app: cagent module: clusterinfo annotations: ca.broadcom.application.name: kubernete-cluster-monitoring spec: replicas: 1 template: metadata: name: clusterinfo labels: app: cagent module: clusterinfo spec: serviceAccountName: uma containers: - name: clusterinfo image: caapm/universalmonitoragent:stable-osev4 env: - name: type value: Kubernetes - name: cluster_name valueFrom: configMapKeyRef: key: cluster_name name: caaiops-config-common resources: limits: cpu: 2 memory: 1G requests: cpu: 200m memory: 300Mi imagePullPolicy: Always command: ["/usr/local/openshift/apmia/jre/bin/java", "-Xms64m","-Xmx512m", "-jar", "/clusterinfo-1.0.jar"] # Comment out this section in case you want to enable debug # command: ["java", "-jar", "-Dlogging.level.com.ca.apm.broadcom.kubernetes.springboot.ClusterInfoController=DEBUG","/clusterinfo-1.0.jar"] restartPolicy: Always selector: matchLabels: module: clusterinfo --- # Source: uma/templates/deployment_prometheus.yaml # Prometheus based Deployment. What is the Agent triplet name ? # Agent from Container1 will be reported to |ClusterMonitoring|Prometheus Agent apiVersion: apps/v1 kind: Deployment metadata: name: cluster-performance-prometheus namespace: caapm labels: app: prometheus-deployment spec: replicas: 1 template: metadata: name: prometheus-deployment labels: app: prometheus-deployment spec: serviceAccountName: uma initContainers: - name: init-clusterinfo image: caapm/universalmonitoragent:stable-osev4 command: ['bash', '-c', 'until [ $(curl --connect-timeout 5 --max-time 10 --write-out %{http_code} --silent --output /dev/null ${CLUSTERINFO_SERVICE_HOST}:${CLUSTERINFO_SERVICE_PORT}/up) -eq 200 ]; do sleep 2; done'] containers: - env: - name: agentManager_url_1 valueFrom: configMapKeyRef: key: agentManager_url_1 name: caaiops-config-common - name: agentManager_credential valueFrom: configMapKeyRef: key: agentManager_credential name: caaiops-config-common - name: apmenv_introscope_agent_connection_compatibility_version valueFrom: configMapKeyRef: key: agentManager_version name: caaiops-config-common - name: apmenv_introscope_agent_extensions_bundles_load value: KubernetesRemoteMonitor, PrometheusImporter, - name: apmenv_com_ca_apm_kubernetes_remote_monitor_type value: prometheus - name: apmenv_com_ca_apm_kubernetes_prometheus_datafile value: haproxy,kube-state-metric,coredns,etcd - name: apmenv_introscope_agent_agentName valueFrom: configMapKeyRef: key: agentNaming_deployment_prometheus_agent name: caaiops-config-common - name: apmenv_introscope_agent_customProcessName valueFrom: configMapKeyRef: key: agentNaming_deployment_prometheus_process name: caaiops-config-common - name: apmenv_introscope_agent_hostName valueFrom: configMapKeyRef: key: agentNaming_deployment_prometheus_host name: caaiops-config-common - name: apmenv_com_ca_apm_kubernetes_clusterName valueFrom: configMapKeyRef: key: cluster_name name: caaiops-config-common - name: nodename valueFrom: fieldRef: fieldPath: spec.nodeName - name: apmenv_com_ca_apm_kubernetes_prometheus_autodiscovery value: "true" - name: type value: "Kubernetes" - name: MIN_HEAP_VAL_IN_MB value: "64" - name: apmenv_introscope_epagent_config_httpServerPort value: "8888" - name: HostMonitoring value: disabled - name: cluster_name valueFrom: configMapKeyRef: key: cluster_name name: caaiops-config-common - name: apmenv_cluster_name valueFrom: configMapKeyRef: key: cluster_name name: caaiops-config-common - name: apmenv_com_ca_apm_prometheus_metric_importer_endpoints value: prometheus - name: apmenv_com_ca_apm_prometheus_metric_importer_endpoint_prometheus_url valueFrom: configMapKeyRef: key: prometheus_server_url name: caaiops-config-common - name: apmenv_com_ca_apm_prometheus_metric_importer_endpoint_prometheus_username valueFrom: configMapKeyRef: key: prometheus_server_username name: caaiops-config-common - name: apmenv_com_ca_apm_prometheus_metric_importer_endpoint_prometheus_password valueFrom: configMapKeyRef: key: prometheus_server_password name: caaiops-config-common - name: apmenv_com_ca_apm_prometheus_metric_importer_endpoint_prometheus_token valueFrom: configMapKeyRef: key: prometheus_server_token name: caaiops-config-common - name: apmenv_com_ca_apm_prometheus_metric_importer_endpoint_prometheus_polling_frequency value: "30" - name: apmenv_com_ca_apm_prometheus_metric_importer_endpoint_prometheus_config_files value: "k8s-cluster.yaml,k8s-container.yaml,k8s-pod.yaml,k8s-namespace.yaml,k8s-node.yaml,k8s-istio.yaml" - name: apmenv_prometheus_metric_name_alias value: "container_name=container,pod_name=pod" - name: apmenv_prometheus_metric_name_alias_exception value: k8s-pod-mapdata.yaml,k8s-container-mapdata.yaml name: kubernetesservice image: caapm/universalmonitoragent:stable-osev4 resources: limits: cpu: 2 memory: 1G requests: cpu: 200m memory: 300Mi livenessProbe: httpGet: path: /healthz port: 8888 initialDelaySeconds: 60 periodSeconds: 60 imagePullPolicy: Always volumeMounts: - name: config-volume mountPath: /usr/local/openshift/apmia/extensions/KubernetesRemoteMonitor/config/prometheus volumes: - name: config-volume configMap: name: caaiops-config-prometheus selector: matchLabels: app: prometheus-deployment --- # Source: uma/templates/deployment_aws.yaml