External project integration and configuration
Home > Select Project > Dashboard > Container Map
The WhaTap Kubernetes agent 1.7.16 or later is required.
WhaTap provides various monitoring services on a project basis. The External project integration feature allows you to integrate external projects related to Pods in the Kubernetes projects.
To link to an external project, you need to configure the Kubernetes agent and a Pod to link to. Build an integrated monitoring scheme by linking the Kubernetes projects with external projects.
External project integration
When the external project integration feature is enabled, the project logo appears on the linked containers and Pods as follows. This makes it easy to visually see which external projects are linked. You can also navigate to the project via the button within the Summary View panel by clicking the block.
External project configuration
Agent CONFIG.
You must change the whatap-node-agent DaemonSet setting of the whatap-monitoring namespace in the YAML file for installation of the Kubernetes agent. In particular, you must add the following environment variables into the env section of the whatap-node-agent container.
- name: "collect_foreign_project"
value: "true"
Example
Below is an example of the YAML file with environment variables added. Because there may be significant differences from the YAML file in the operation environment, see the example and then modify only the required parts before use. The highlighted lines are environment variables added.
apiVersion: "apps/v1"
kind: "DaemonSet"
metadata:
labels:
name: "whatap-node-agent"
name: "whatap-node-agent"
namespace: "whatap-monitoring"
spec:
selector:
matchLabels:
name: "whatap-node-agent"
template:
metadata:
labels:
name: "whatap-node-agent"
spec:
containers:
- command:
- "/data/agent/node/cadvisor_helper"
- "-port"
- "6801"
env:
- name: "NODE_NAME"
valueFrom:
fieldRef:
fieldPath: "spec.nodeName"
image: "whatap/kube_mon_dev:foreign-2"
name: "whatap-node-helper"
ports:
- containerPort: 6801
name: "helperport"
resources:
limits:
cpu: "200m"
memory: "350Mi"
requests:
cpu: "100m"
memory: "100Mi"
volumeMounts:
- mountPath: "/rootfs"
name: "rootfs"
readOnly: true
- mountPath: "/sys"
name: "hostsys"
readOnly: true
- mountPath: "/dev/disk"
name: "hostdiskdevice"
readOnly: true
- mountPath: "/run/containerd/containerd.sock"
name: "containerddomainsocket"
- command:
- "/bin/entrypoint.sh"
env:
- name: "NODE_IP"
valueFrom:
fieldRef:
fieldPath: "status.hostIP"
- name: "NODE_NAME"
valueFrom:
fieldRef:
fieldPath: "spec.nodeName"
- name: "WHATAP_LICENSE"
value: "x6050rs80f4eg-x1g0egm9rjb3mg-z7p9533a2ea87e"
- name: "WHATAP_HOST"
value: "13.124.11.223/13.209.172.35"
- name: "WHATAP_PORT"
value: "6600"
- name: "HOST_PREFIX"
value: "/rootfs"
- name: "WHATP_MEM_LIMIT"
valueFrom:
resourceFieldRef:
containerName: "whatap-node-agent"
resource: "limits.memory"
- name: "collect_foreign_project"
value: "true"
image: "whatap/kube_mon_dev:foreign-2"
name: "whatap-node-agent"
ports:
- containerPort: 6600
name: "nodeport"
resources:
limits:
cpu: "200m"
memory: "350Mi"
requests:
cpu: "100m"
memory: "300Mi"
volumeMounts:
- mountPath: "/rootfs"
name: "rootfs"
readOnly: true
- mountPath: "/bin/entrypoint.sh"
name: "start-script-volume"
readOnly: true
subPath: "entrypoint.sh"
- mountPath: "/whatap_conf"
name: "whatap-config-volume"
initContainers:
- command:
- "/data/agent/tools/whatap_debugger"
- "run"
image: "whatap/kube_mon_dev:foreign-2"
name: "whatap-node-debug"
volumeMounts:
- mountPath: "/rootfs"
name: "rootfs"
readOnly: true
serviceAccount: "whatap"
tolerations:
- effect: "NoSchedule"
key: "node-role.kubernetes.io/master"
- effect: "NoSchedule"
key: "node-role.kubernetes.io/control-plane"
volumes:
- hostPath:
path: "/"
name: "rootfs"
- hostPath:
path: "/sys"
name: "hostsys"
- hostPath:
path: "/dev/disk"
name: "hostdiskdevice"
- configMap:
defaultMode: 448
name: "node-start-script"
name: "start-script-volume"
- emptyDir: {}
name: "whatap-config-volume"
- hostPath:
path: "/run/containerd/containerd.sock"
name: "containerddomainsocket"
Configuring the Pod to be linked
Modify the settings of the Pod to link to. For example, in order to integrate the Redis Pod, add the following environment variables to the env section of the Redis container.
- name: "license"
value: "here_is_whatap_license"
- name: "whatap_platform"
value: "redis"
-
here_is_whatap_license
: Enter the license information of the external project. -
whatap_platform
: Enter the platform of the external project to link to.
The platforms that currently support integration with external projects are as follows: When entering on the platform, you can enter it without case sensitive.
Redis, Java, Node.js, Python, PHP
Example
Below is an example of the YAML file in which environment variables are added to the Redis Pod configuration. The highlighted lines are environment variables added.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: redis-cluster
namespace: backend
spec:
serviceName: redis-cluster-svc
replicas: 6
selector:
matchLabels:
app: redis-cluster
template:
metadata:
labels:
app: redis-cluster
spec:
containers:
- name: redis
image: redis:5.0.1-alpine
ports:
- containerPort: 6379
name: client
- containerPort: 16379
name: gossip
command: ["/conf/update-node.sh", "redis-server", "/conf/redis.conf"]
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: license
value: x6050s081i709-z2lhh7gpi3bdr4-x7jovr61kumi5k
- name: whatap_platform
value: redis
volumeMounts:
- name: conf
mountPath: /conf
readOnly: false
- name: data
mountPath: /data
readOnly: false
Checking the external project to link to
Analysis > Metrics Search
After configuring an external project integration, go to the Metrics Search menu. Click Select Category as shown in the example image.
If the following category appears, it indicates that the integration has been made successfully.
container_foreign_project_mapping