我已经阅读了Kubernetes中的Appdynamics,但感到困惑。
场景就像我在EC2上运行Kubernetes并在其中运行POD,在1个Pod下运行多个容器。
我必须在哪里安装机器代理?在EC2中还是在守护程序中?
在哪里必须安装应用程序代理?我必须在每个容器Dockerfile中添加app-agent吗?
最后,我的hostName和uniqueHostId是什么?
最佳答案
如关于Kubernetes and AppDynamics APM的AppD文档所述
Install a Standalone Machine Agent (1) in a Kubernetes node.
Install an APM Agent (2) inside each container in a pod you want to monitor.
The Standalone Machine Agent then collects hardware metrics for each monitored container, as well as Machine and Server metrics for the host (3), and forwards the metrics to the Controller.
可以从
/proc/self/cgroup
中获取ContainerID和UniqueHostIDContainerID
cat /proc/self/cgroup | awk -F '/' '{print $NF}' | head -n 1
UniqueHostID
sed -rn '1s#.*/##; 1s/(.{12}).*/\1/p' /proc/self/cgroup
关于kubernetes - Kubernetes上的Appdynamics实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53537738/