传统服务器安装 OneAgent
最后于 更新
APO 分为两部分:
- APO-server: APO 服务侧组件
- APO-one-agent: APO 用户侧组件,用于采集Kubernetes集群或者虚机环境下被监控业务以及集群、主机信息。
本文档包含在 传统服务器(非Kubernetes)上安装和运行 APO-one-agent 的说明。请确保在安装 APO-one-agent 之前,您已经安装 APO-Server。
APO-one-agent 内置各个编程语言的默认采集探针版本:
- Java agent: opentelemetry-java-instrumentation v2.8.0
- Python agent: opentelemetry-python 1.27.0/0.48b0
- NodeJs agent: opentelemetry-js v1.24.1/0.51.1
- Go agent: Grafana Beyla v1.8.4
注意:对于 Java 应用,APO 默认采用 Opentelemetry v2.8.0 采集链路追踪数据,如果您想利用 OneAgent 的自动注入能力为您的业务自动注入自定义 Trace 探针(例如 Skywalking 或 Opentelemetry 其他版本等,请参考 高级:自定义 Trace 探针替换 OneAgent Otel 探针 构建自定义探针镜像并配置。
下载安装包
这里默认下载 latest 版本,本文档接下来以 latest 版本为例
export APO_VERSION=latest
# export APO_VERSION=v0.0.000 # 可以指定您的版本
wget https://apo-ce.oss-cn-hangzhou.aliyuncs.com/apo-one-agent-compose-${APO_VERSION}.tgz
部署 APO-one-agent
运行以下命令,部署 APO-one-agent 传统服务器版本
export APO_VERSION=latest
export APO_PROXY_IP=<YOUR APO-server NodeIP> # FIXME
tar -zxvf apo-one-agent-compose-$APO_VERSION.tgz
cd apo-one-agent-compose/
bash deploy.sh init $APO_SERVER_IP
验证
见到类似输出即代表安装成功
==================================================
___ ___ ___
/\ \ /\ \ /\ \
/::\ \ /::\ \ /::\ \
/:/\:\ \ /:/\:\ \ /:/\:\ \
/::\~\:\ \ /::\~\:\ \ /:/ \:\ \
/:/\:\ \:\__\ /:/\:\ \:\__\ /:/__/ \:\__\
\/__\:\/:/ / \/__\:\/:/ / \:\ \ /:/ /
\::/ / \::/ / \:\ /:/ /
/:/ / \/__/ \:\/:/ /
/:/ / \::/ /
\/__/ \/__/
Official Website: https://apo.kindlingx.com/
DEPLOY_VERSION: <version>
APO_ONE_AGENT_VERSION:
==================================================
INFO: APO-server-ip = <YOUR APO-server NodeIP>
Container apo-otel-collector-agent Started
Container apo-grafana-alloy Started
Container apo-node-agent Started
Container apo-preload-agent Started
Container apo-go-sdk-auto Started
Container apo-ilogtail Started
Container apo-ebpf-agent Started
输入下方命令检查容器是否启动成功
bash deploy.sh list
# 您应该看到类似于以下内容输出
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
apo-ebpf-agent registry.cn-hangzhou.aliyuncs.com/originx/ebpf-agent:v1.5.0 "sh start.sh" apo-ebpf-agent 5 minutes ago Up 5 minutes
apo-go-sdk-auto registry.cn-hangzhou.aliyuncs.com/originx/sdk-auto:v1.0.0 "/app/originx-sdk-au…" apo-go-sdk-auto 5 minutes ago Up 5 minutes
apo-grafana-alloy registry.cn-hangzhou.aliyuncs.com/originx/grafana-alloy:v1.2.1 "/bin/alloy run --st…" apo-grafana-alloy 5 minutes ago Up 5 minutes
apo-ilogtail registry.cn-hangzhou.aliyuncs.com/originx/ilogtail:v1.5.0 "/usr/local/ilogtail…" apo-ilogtail 5 minutes ago Up 5 minutes
apo-node-agent registry.cn-hangzhou.aliyuncs.com/originx/node-agent:v1.5.0 "/app/pinger" apo-node-agent 5 minutes ago Up 5 minutes
apo-otel-collector registry.cn-hangzhou.aliyuncs.com/originx/apo-otel-collector:v0.1.0 "./otelcol --config …" apo-otel-collector-agent 5 minutes ago Up 5 minutes
注意
安装成功后需重启目标被监控服务!!!
遇到问题 :
- 如遇 apo-ebpf-agent 和 apo-grafana-beyla 状态异常,可以通过查看文档《解决ebpf-agent始终未就绪问题》 和 《解决grafana-beyla始终未就绪问题》)进一步排查