藉助ARMS應用監控,您可以對通用Kubernetes環境的Golang應用進行應用拓撲、介面調用、異常事務和慢事務監控、SQL分析等監控。本文協助您將通用Kubernetes環境中的應用接入ARMS應用監控。
如果您使用的Kubernetes叢集由Container ServiceACK提供,本文不適用,ACK叢集接入ARMS的操作請參見Container ServiceACK通過ack-onepilot組件安裝Go探針。
前提條件
請確保您的Kubernetes叢集的kube-apiserver組件介面版本在1.10及以上。
如果您的Kubernetes叢集沒有部署在阿里雲,請確保叢集連通公網,或者通過雲企業網等方式打通阿里雲VPC和叢集之間的串連。
確保您的Go應用版本在1.18及以上。
步驟一:編譯Go二進位檔案
使用
wget
命令下載編譯工具,請根據編譯環境和編譯機器所在地區,選擇對應的下載地址。說明各地區下載的編譯工具是相同的,如果您的公網環境可以訪問OSS地址,可以直接使用對應作業系統和架構的杭州公網地址擷取編譯工具。
展開查看各地區對應的下載命令
Linux(AMD64)
地區
公網地址
VPC地址
華東1(杭州)
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華東2(上海)
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華北1(青島)
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華北2(北京)
wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華北3(張家口)
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華北5(呼和浩特)
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華北6(烏蘭察布)
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華南1(深圳)
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華南2(河源)
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華南3(廣州)
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
西南1(成都)
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
中國(香港)
wget "http://arms-apm-cn-hongkong.oss-cn-hongkong.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
新加坡
wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
亞太地區東南3(吉隆坡)
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
亞太地區東南5(雅加達)
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
亞太地區東北1(東京)
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
歐洲中部1(法蘭克福)
wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
歐洲西部1(倫敦)
wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
美國東部1(維吉尼亞)
wget "http://arms-apm-us-east-1.oss-us-east-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-us-east-1.oss-us-east-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
美國西部1(矽谷)
wget "http://arms-apm-us-west-1.oss-us-west-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華東1金融雲
無
wget "http://arms-apm-cn-hangzhou-finance.oss-cn-hzjbp-b-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華東2金融雲
無
wget "http://arms-apm-cn-shanghai-finance-1.oss-cn-shanghai-finance-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
華南1金融雲
無
wget "http://arms-apm-cn-shenzhen-finance-1.oss-cn-shenzhen-finance-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
政務雲
wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo
Linux(ARM64)
地區
公網地址
VPC地址
華東1(杭州)
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華東2(上海)
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華北1(青島)
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華北2(北京)
wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華北3(張家口)
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華北5(呼和浩特)
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華北6(烏蘭察布)
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華南1(深圳)
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華南2(河源)
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華南3(廣州)
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
西南1(成都)
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
中國(香港)
wget "http://arms-apm-cn-hongkong.oss-cn-hongkong.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
新加坡
wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
亞太地區東南3(吉隆坡)
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
亞太地區東南5(雅加達)
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
亞太地區東北1(東京)
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
歐洲中部1(法蘭克福)
wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
歐洲西部1(倫敦)
wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
美國東部1(維吉尼亞)
wget "http://arms-apm-us-east-1.oss-us-east-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-us-east-1.oss-us-east-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
美國西部1(矽谷)
wget "http://arms-apm-us-west-1.oss-us-west-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華東1金融雲
無
wget "http://arms-apm-cn-hangzhou-finance.oss-cn-hzjbp-b-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華東2金融雲
無
wget "http://arms-apm-cn-shanghai-finance-1.oss-cn-shanghai-finance-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
華南1金融雲
無
wget "http://arms-apm-cn-shenzhen-finance-1.oss-cn-shenzhen-finance-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
政務雲
wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
Darwin(ARM64)
地區
公網地址
VPC地址
華東1(杭州)
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華東2(上海)
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華北1(青島)
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華北2(北京)
wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華北3(張家口)
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華北5(呼和浩特)
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華北6(烏蘭察布)
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華南1(深圳)
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華南2(河源)
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華南3(廣州)
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
西南1(成都)
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
中國(香港)
wget "http://arms-apm-cn-hongkong.oss-cn-hongkong.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
新加坡
wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
亞太地區東南3(吉隆坡)
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
亞太地區東南5(雅加達)
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
亞太地區東北1(東京)
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
歐洲中部1(法蘭克福)
wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
歐洲西部1(倫敦)
wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
美國東部1(維吉尼亞)
wget "http://arms-apm-us-east-1.oss-us-east-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-us-east-1.oss-us-east-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
美國西部1(矽谷)
wget "http://arms-apm-us-west-1.oss-us-west-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華東1金融雲
無
wget "http://arms-apm-cn-hangzhou-finance.oss-cn-hzjbp-b-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華東2金融雲
無
wget "http://arms-apm-cn-shanghai-finance-1.oss-cn-shanghai-finance-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
華南1金融雲
無
wget "http://arms-apm-cn-shenzhen-finance-1.oss-cn-shenzhen-finance-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
政務雲
wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo
Darwin(AMD64)
地區
公網地址
VPC地址
華東1(杭州)
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華東2(上海)
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華北1(青島)
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華北2(北京)
wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華北3(張家口)
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華北5(呼和浩特)
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華北6(烏蘭察布)
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華南1(深圳)
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華南2(河源)
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華南3(廣州)
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
西南1(成都)
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
中國(香港)
wget "http://arms-apm-cn-hongkong.oss-cn-hongkong.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
新加坡
wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
亞太地區東南3(吉隆坡)
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
亞太地區東南5(雅加達)
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
亞太地區東北1(東京)
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
歐洲中部1(法蘭克福)
wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
歐洲西部1(倫敦)
wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
美國東部1(維吉尼亞)
wget "http://arms-apm-us-east-1.oss-us-east-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-us-east-1.oss-us-east-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
美國西部1(矽谷)
wget "http://arms-apm-us-west-1.oss-us-west-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華東1金融雲
無
wget "http://arms-apm-cn-hangzhou-finance.oss-cn-hzjbp-b-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華東2金融雲
無
wget "http://arms-apm-cn-shanghai-finance-1.oss-cn-shanghai-finance-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
華南1金融雲
無
wget "http://arms-apm-cn-shenzhen-finance-1.oss-cn-shenzhen-finance-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
政務雲
wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo
Windows(AMD64)
地區
公網地址
VPC地址
華東1(杭州)
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華東2(上海)
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華北1(青島)
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華北2(北京)
wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華北3(張家口)
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華北5(呼和浩特)
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華北6(烏蘭察布)
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華南1(深圳)
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華南2(河源)
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華南3(廣州)
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
西南1(成都)
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
中國(香港)
wget "http://arms-apm-cn-hongkong.oss-cn-hongkong.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
新加坡
wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
亞太地區東南3(吉隆坡)
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
亞太地區東南5(雅加達)
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
亞太地區東北1(東京)
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
歐洲中部1(法蘭克福)
wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
歐洲西部1(倫敦)
wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-eu-west-1.oss-eu-west-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
美國東部1(維吉尼亞)
wget "http://arms-apm-us-east-1.oss-us-east-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-us-east-1.oss-us-east-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
美國西部1(矽谷)
wget "http://arms-apm-us-west-1.oss-us-west-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華東1金融雲
無
wget "http://arms-apm-cn-hangzhou-finance.oss-cn-hzjbp-b-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華東2金融雲
無
wget "http://arms-apm-cn-shanghai-finance-1.oss-cn-shanghai-finance-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
華南1金融雲
無
wget "http://arms-apm-cn-shenzhen-finance-1.oss-cn-shenzhen-finance-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
政務雲
wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
wget "http://arms-apm-cn-north-2-gov-1.oss-cn-north-2-gov-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe
為編譯工具賦予可執行許可權。
Linux/Darwin
# 賦予可執行許可權 chmod +x instgo
Windows
Windows中無需賦予可執行許可權。
通過OpenAPI擷取LicenseKey,具體方法,參見DescribeTraceLicenseKey - 列出LicenseKey。
在專案main函數所在檔案的目錄下執行編譯工具編譯Go專案,請替換命令列中的
{licenseKey}
為上一步擷取到的LicenseKey。如果您需要測試編譯效果,或暫時無法擷取到LicenseKey,可以添加
--dev
來開啟Dev編譯模式,此模式下不需要傳入LicenseKey。重要Dev模式下編譯結果部分功能有降級,請勿用於線上。
使用以下
./instgo build
替換go build
命令。Linux/Darwin
./instgo build --licenseKey="{licenseKey}"
Windows
.\instgo.exe build --licenseKey="{licenseKey}"
如果您原本編譯命令中含有後續的編譯參數,請在所有選項添加完畢後,添加
--
分隔字元,並將編譯參數按照原有格式添加在後面,例如:Linux/Darwin
./instgo build --licenseKey="{licenseKey}" -- {arg1} {arg2} ...
Windows
.\instgo.exe build --licenseKey="{licenseKey}" -- {arg1} {arg2} ...
相關資訊
Instgo常見命令與釋義如下:
命令
flag
接收參數類型
含義
是否必傳
build
(編譯)--licenseKey, -l
string
指定ARMS的LicenseKey。
是(dev 模式下可不傳)
--dev
-
指定編譯模式為開發模式,此模式下無需指定LicenseKey即可編譯,用於測試基本可用性。
重要部分功能有降級,請勿用於線上。
否
--agentVersion
string
指定探針版本。
否
--agentPath
string
指定本地探針路徑。
否
--cacheDir
string
指定探針緩衝目錄。
否
--regionId, -r
string
指定拉取探針包依賴的OSS所在RegionId,預設為cn-hangzhou。
否
--timeout, -t
int
指定拉取探針逾時時間,預設為180秒。
否
--verbose, -v
-
開啟後,打出詳細的編譯日誌。
否
--vpc
-
開啟後,預設走內網拉取探針包依賴。
否
clean
(清理產物)
-
-
-
-
update
(更新)--licenseKey, -l
string
指定ARMS的LicenseKey。
是
--cacheDir
string
指定探針緩衝目錄。
否
--regionId, -r
string
指定拉取探針包依賴的OSS所在RegionId,預設為cn-hangzhou。
否
--timeout, -t
int
指定拉取探針逾時時間,預設為180秒。
否
--vpc
開啟後,預設走內網拉取探針包依賴。
否
version
(輸出版本號碼)
-
-
-
-
初次編譯時間,探針會預設被下載到
/opt
目錄下(Windows為C:\ProgramData
),如果該目錄沒有許可權,可以使用--cacheDir
flag指定緩衝目錄,或使用sudo -E
命令執行編譯(Windows請使用管理員權限執行編譯命令)。編譯過程中如果強制退出或出現異常退出,可能會存在編譯殘留。清理Golang探針編譯殘留的方法,請參見清理Golang探針編譯殘留。
步驟二:安裝Helm3
步驟三:安裝探針
ARMS應用監控目前僅支援無狀態(Deployment)和有狀態(StatefulSet)兩種類型的應用接入,兩種類型的應用接入方法相同。此處以將Kubernetes環境中的無狀態(Deployment)類型的應用接入ARMS應用監控為例。
執行以下
wget
命令下載ack-onepilot安裝包。wget 'https://aliacs-app-catalog.oss-cn-hangzhou.aliyuncs.com/charts-incubator/ack-onepilot-3.2.2.tgz'
執行以下命令解壓ack-onepilot安裝包。
tar xvf ack-onepilot-3.2.2.tgz
編輯安裝包下的values.yaml檔案,根據實際情況修改以下參數,然後儲存。
registry: registry-__ACK_REGION_ID__.ack.aliyuncs.com/acs/ cluster_id: __ACK_CLUSTER_ID__ accessKey: __ACCESSKEY__ accessKeySecret: __ACCESSKEY_SECRET__ uid: "__ACK_UID__" region_id: __ACK_REGION_ID__
registry
:ack-onepilot鏡像地址。cluster_id
:自訂Kubernetes叢集ID,叢集的唯一標識。建議格式為<uid>-<clusterid>
。accessKey
和accessKeySecret
:阿里雲帳號(主帳號)的AccessKey ID和AccessKey Secret。擷取方法,請參見建立AccessKey。重要請確認對應的阿里雲帳號(主帳號)已包含AliyunARMSFullAccess和AliyunSTSAssumeRoleAccess許可權。
uid
:阿里雲帳號(主帳號)ID。將滑鼠懸浮於阿里雲控制台右上方的頭像上可以擷取。region_id
:阿里雲地區ID,應用監控支援的地區,請參見開服地區。
執行以下命令安裝ack-onepilot。
請在ack-onepilot安裝包外執行此命令。
helm3 upgrade --install ack-onepilot ack-onepilot --namespace ack-onepilot --create-namespace
步驟四:修改應用的YAML檔案
執行以下命令查看目標無狀態(Deployment)應用的YAML檔案。
kubectl get deployment {deployment名稱} -o yaml
說明若您不清楚
{deployment名稱}
,請先執行以下命令查看所有無狀態(Deployment)應用,在執行結果中找到目標無狀態(Deployment)應用,再查看目標無狀態(Deployment)應用的YAML檔案。kubectl get deployments --all-namespace
編輯目標無狀態(Deployment)應用的YAML檔案。
kubectl edit deployment {Deployment名稱} -o yaml
在YAML檔案中的
spec.template.metadata
層級下添加以下內容。labels: aliyun.com/app-language: "golang" # Go應用必填,標明此應用是Go應用。 armsPilotAutoEnable: "on" armsPilotCreateAppName: "<your-deployment-name>" #請將<your-deployment-name>替換為您的應用程式名稱。
如果您需要在K8s環境中建立一個新的無狀態(Deployment)應用並接入ARMS,則應用的完整YAML檔案如下:
展開查看完整樣本YAML檔案(Golang)
apiVersion: apps/v1 kind: Deployment metadata: labels: app: fasthttp-server name: fasthttp-server namespace: default spec: replicas: 1 selector: matchLabels: app: fasthttp-server strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: labels: app: fasthttp-server aliyun.com/app-language: golang armsPilotAutoEnable: 'on' armsPilotCreateAppName: fasthttp-server hostLabelA: aaa hostLabelB: bbb spec: containers: - image: >- registry.cn-hangzhou.aliyuncs.com/private-mesh/hellob:fasthttp-server-arms-go-test-0.0.1 imagePullPolicy: Always name: fasthttp-server resources: requests: cpu: 250m memory: 300Mi terminationMessagePath: /dev/termination-log terminationMessagePolicy: File dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30 --- apiVersion: v1 kind: Service metadata: labels: app: fasthttp-server name: fasthttp-server namespace: default spec: internalTrafficPolicy: Cluster ipFamilies: - IPv4 ipFamilyPolicy: SingleStack ports: - name: http port: 8080 protocol: TCP targetPort: 8080 selector: app: fasthttp-server sessionAffinity: None type: ClusterIP --- apiVersion: apps/v1 kind: Deployment metadata: labels: app: fasthttp-client name: fasthttp-client namespace: default spec: replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: fasthttp-client strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate template: metadata: labels: app: fasthttp-client aliyun.com/app-language: golang armsPilotAutoEnable: 'on' armsPilotCreateAppName: fasthttp-client hostLabelA: aaa hostLabelB: bbb spec: containers: - image: >- registry.cn-hangzhou.aliyuncs.com/private-mesh/hellob:fasthttp-client-arms-go-test-0.0.1 imagePullPolicy: Always name: fasthttp-client resources: requests: cpu: 250m memory: 300Mi terminationMessagePath: /dev/termination-log terminationMessagePolicy: File dnsPolicy: ClusterFirst restartPolicy: Always schedulerName: default-scheduler securityContext: {} terminationGracePeriodSeconds: 30
執行結果
約一分鐘後,若Golang應用出現在ARMS控制台的應用監控 > 應用列表頁面中且有資料上報,則說明接入成功。