Container Service for Kubernetes (ACK) または Container Compute Service (ACS) の Go アプリケーションを監視するには、ack-onepilot アプリケーション監視コンポーネントをインストールし、Go バイナリファイルをコンパイルします。インストール後、CloudMonitor 2.0 でアプリケーションのトポロジー、API 呼び出し、データベース分析、その他のモニタリングデータを表示できます。このトピックでは、Container Service for Kubernetes (ACK) または Container Compute Service (ACS) の Go アプリケーションにプローブをインストールする方法について説明します。
Golang プローブの使用中に質問がある場合は、DingTalk グループからお問い合わせください。グループ番号は 35568145 です。
ack-onepilot コンポーネントについて
アプリケーション監視エージェントインストールアシスタント (ack-onepilot) は、さまざまなプログラミング言語のエージェントをインストールする主要なコンポーネントです。コンテナー内でアプリケーション監視エージェントパッケージを自動的に準備し、エージェントのレポート環境を設定します。ack-onepilot の仕組みの詳細については、「ack-onepilot コンポーネントの基本原則」をご参照ください。
エージェントがインストールされると、アプリケーションが再起動したときに ack-onepilot はエージェントを最新バージョンに自動的にアップグレードします。エージェントが自動的にアップグレードされないようにしたい場合は、エージェントのバージョンを制御できます。詳細については、「エージェントのバージョンを制御する」をご参照ください。
前提条件
ACK または ACS クラスターが作成されていること。
ACK クラスター: ビジネス要件に基づいて、ACK マネージドクラスター、ACK 専用クラスター、Serverless Kubernetes クラスター、または登録済みクラスターを作成できます。
ACS クラスター: ACS クラスターの作成方法の詳細については、「ACS クラスターの作成」をご参照ください。
名前空間を作成します。このトピックでは、名前空間名として default を使用します。詳細については、「名前空間とクォータの管理」をご参照ください。
コンパイル時のオペレーティングシステム、アーキテクチャ、Go のバージョン、およびフレームワークのバージョンを確認します。詳細については、「アプリケーション監視でサポートされている Go コンポーネントとフレームワーク」をご参照ください。
ステップ 1: プローブインストールアシスタント (ack-onepilot) のインストール
ACK コンソールにログインします。 [クラスター] ページで、クラスターの名前をクリックします。
左側のナビゲーションウィンドウで、[コンポーネント管理] をクリックします。次に、ack-onepilot を検索します。
重要ack-onepilot のバージョンは 5.1.0 以降である必要があります。現在のバージョンはグレースケールリリースです。このバージョンを使用するには、DingTalk サポートグループ (グループ ID: 35568145) にお問い合わせください。
ack-onepilot カードの [インストール] をクリックします。
説明デフォルトでは、ack-onepilot コンポーネントは 1,000 個の Pod をサポートします。クラスター内で 1,000 個の Pod を追加するごとに、コンポーネントに 0.5 CPU コアと 512 MB のメモリを追加する必要があります。
表示されるダイアログボックスで、パラメーターを設定し、[OK] をクリックします。デフォルト値を使用することをお勧めします。
説明ack-onepilot をインストールした後、[アドオン] ページでアップグレード、設定、またはアンインストールできます。
ステップ 3: Golang アプリケーションイメージのコンパイル
(オプション) プロジェクトがコンパイルに vendor モードを使用している場合、またはコンパイル時のパラメーターに
-mod=vendorが含まれている場合は、以下を確認してください。go.mod ファイルに `google.golang.org/protobuf` 依存関係が直接または間接的に含まれているかどうかを確認します。含まれていない場合は、次の手順を参照してください。
protobuf 依存関係の追加方法を展開して表示
go.mod ファイルに protobuf 依存関係が含まれていない場合は、次のように追加します。
プロジェクトの main.go ファイルの
importセクションに、次の依存関係を追加します。_ "google.golang.org/protobuf/proto" _ "google.golang.org/protobuf/runtime/protoimpl"次のコマンドを実行して、不足している依存関係を自動的にダウンロードし、
vendorフォルダに同期します。go mod tidy go mod vendor
コンパイル時のパラメーターに
-mod=vendorが含まれているかどうかを確認します。含まれていない場合は、go buildの後に-mod=vendorを追加します。
wgetコマンドを使用して、コンパイル時ツール instgo をダウンロードします。コンパイル時の環境とマシンのリージョンに基づいてダウンロードアドレスを選択します。instgo はコンパイル時に自動的に更新されることに注意してください。変更権限のあるフォルダに instgo を保存してください。
説明Instgo は、ARMS が Go アプリケーション用に提供するコンパイル時ツールです。instgo を使用して Go プロジェクトをコンパイルすると、ARMS はアプリケーションを監視できます。
コンパイル時ツールはすべてのリージョンで同じです。お使いの環境がインターネット経由で Object Storage Service (OSS) にアクセスできる場合は、お使いのオペレーティングシステムとアーキテクチャに合わせて中国 (杭州) のインターネットダウンロードアドレスを使用できます。
各リージョンのダウンロードコマンドを展開して表示
Linux (AMD64)
リージョン
インターネットアドレス
VPC アドレス
中国 (杭州)
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo中国 (上海)
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo中国 (青島)
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo中国 (北京)
wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo中国 (張家口)
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo中国 (フフホト)
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo中国 (ウランチャブ)
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo中国 (深セン)
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo中国 (河源)
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo中国 (広州)
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgo中国 (成都)
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "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 instgowget "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 instgowget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgoアジア太平洋 SE 3 (クアラルンプール)
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgoアジア太平洋 SE 5 (ジャカルタ)
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgoアジア太平洋 NE 1 (東京)
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgoEU 中央 1 (フランクフルト)
wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgoEU 西部 1 (ロンドン)
wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-linux-amd64" -O instgowget "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 instgowget "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 instgowget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-linux-amd64" -O instgoLinux (ARM64)
リージョン
インターネットアドレス
VPC アドレス
中国 (杭州)
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo中国 (上海)
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo中国 (青島)
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo中国 (北京)
wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo中国 (張家口)
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo中国 (フフホト)
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo中国 (ウランチャブ)
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo中国 (深セン)
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo中国 (河源)
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo中国 (広州)
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo中国 (成都)
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "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 instgowget "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 instgowget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgoアジア太平洋 SE 3 (クアラルンプール)
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgoアジア太平洋 SE 5 (ジャカルタ)
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgoアジア太平洋 NE 1 (東京)
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgoEU 中央 1 (フランクフルト)
wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgoEU 西部 1 (ロンドン)
wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-linux-arm64" -O instgowget "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 instgowget "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 instgowget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-linux-arm64" -O instgoMac (ARM64)
リージョン
インターネットアドレス
VPC アドレス
中国 (杭州)
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo中国 (上海)
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo中国 (青島)
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo中国 (北京)
wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo中国 (張家口)
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo中国 (フフホト)
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo中国 (ウランチャブ)
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo中国 (深セン)
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo中国 (河源)
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo中国 (広州)
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgo中国 (成都)
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "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 instgowget "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 instgowget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgoアジア太平洋 SE 3 (クアラルンプール)
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgoアジア太平洋 SE 5 (ジャカルタ)
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgoアジア太平洋 NE 1 (東京)
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgoEU 中央 1 (フランクフルト)
wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgoEU 西部 1 (ロンドン)
wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgowget "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 instgowget "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 instgowget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-darwin-arm64" -O instgoMac (AMD64)
リージョン
インターネットアドレス
VPC アドレス
中国 (杭州)
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo中国 (上海)
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo中国 (青島)
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo中国 (北京)
wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo中国 (張家口)
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo中国 (フフホト)
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo中国 (ウランチャブ)
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo中国 (深セン)
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo中国 (河源)
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo中国 (広州)
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgo中国 (成都)
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "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 instgowget "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 instgowget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgoアジア太平洋 SE 3 (クアラルンプール)
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgoアジア太平洋 SE 5 (ジャカルタ)
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgoアジア太平洋 NE 1 (東京)
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgoEU 中央 1 (フランクフルト)
wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgoEU 西部 1 (ロンドン)
wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgowget "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 instgowget "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 instgowget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-darwin-amd64" -O instgoWindows (AMD64)
リージョン
インターネットアドレス
VPC アドレス
中国 (杭州)
wget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe中国 (上海)
wget "http://arms-apm-cn-shanghai.oss-cn-shanghai.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-cn-shanghai.oss-cn-shanghai-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe中国 (青島)
wget "http://arms-apm-cn-qingdao.oss-cn-qingdao.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-cn-qingdao.oss-cn-qingdao-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe中国 (北京)
wget "http://arms-apm-cn-beijing.oss-cn-beijing.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-cn-beijing.oss-cn-beijing-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe中国 (張家口)
wget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-cn-zhangjiakou.oss-cn-zhangjiakou-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe中国 (フフホト)
wget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-cn-huhehaote.oss-cn-huhehaote-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe中国 (ウランチャブ)
wget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-cn-wulanchabu.oss-cn-wulanchabu-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe中国 (深セン)
wget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-cn-shenzhen.oss-cn-shenzhen-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe中国 (河源)
wget "http://arms-apm-cn-heyuan.oss-cn-heyuan.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-cn-heyuan.oss-cn-heyuan-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe中国 (広州)
wget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-cn-guangzhou.oss-cn-guangzhou-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exe中国 (成都)
wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "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.exewget "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.exewget "http://arms-apm-ap-southeast-1.oss-ap-southeast-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exeアジア太平洋 SE 3 (クアラルンプール)
wget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-ap-southeast-3.oss-ap-southeast-3-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exeアジア太平洋 SE 5 (ジャカルタ)
wget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-ap-southeast-5.oss-ap-southeast-5-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exeアジア太平洋 NE 1 (東京)
wget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-ap-northeast-1.oss-ap-northeast-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exeEU 中央 1 (フランクフルト)
wget "http://arms-apm-eu-central-1.oss-eu-central-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "http://arms-apm-eu-central-1.oss-eu-central-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exeEU 西部 1 (ロンドン)
wget "http://arms-apm-eu-west-1.oss-eu-west-1.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exewget "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.exewget "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.exewget "http://arms-apm-us-west-1.oss-us-west-1-internal.aliyuncs.com/instgo/instgo-windows-amd64.exe" -O instgo.exeコンパイル時ツールに実行権限を付与します。
Linux/Mac
# 実行権限を付与 chmod +x instgoWindows
Windows では実行権限は必要ありません。
LicenseKey を取得し、コンパイル時のパラメーターを設定します。
重要このステップをスキップすると、instgo は dev モードに入り、デフォルトで最新バージョンの ARMS エージェントをインストールします。本番環境にアプリケーションをデプロイするには、次のパラメーターを設定する必要があります。
DescribeTraceLicenseKey OpenAPI 操作を呼び出して LicenseKey を取得します。
DescribeTraceLicenseKey ページで、[デバッグ] をクリックします。リージョンを選択し、[呼び出し開始] をクリックして LicenseKey を取得します。

LicenseKey を取得した後、
setコマンドを使用してコンパイル時のパラメーターを設定します。instgo set --licenseKey=${YourLicenseKey}
元のコンパイルコマンドのプレフィックスとして `instgo` を追加し、コマンドを実行します。
instgo go build {arg1} {arg2} {arg3}`go install` を使用してプロジェクトをコンパイルする場合も、コマンドのプレフィックスとして `instgo` を追加できます。
前のステップでコンパイルしたバイナリファイルを使用してイメージをビルドします。
ステップ 4: Go アプリケーションの ARMS アプリケーション監視を有効にする
次のサンプル YAML テンプレートは、ステートレス (Deployment) アプリケーションを作成し、ARMS アプリケーション監視を有効にします。
完全なサンプル YAML ファイル (Golang) を展開して表示
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: otel-go-client
name: otel-go-client
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: otel-go-client
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
aliyun.com/app-language: golang
armsPilotAppWorkspace: "workspace"
armsPilotAutoEnable: 'on'
armsPilotCreateAppName: otel-go-client
app: otel-go-client
spec:
containers:
- image: registry.cn-hangzhou.aliyuncs.com/private-mesh/hellob:otel-client-arms-go-test-0.0.1
imagePullPolicy: Always
name: client
resources:
requests:
cpu: 250m
memory: 300Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: otel-go-server
name: otel-go-server
namespace: default
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: otel-go-server
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: otel-go-server
aliyun.com/app-language: golang
armsPilotAutoEnable: 'on'
armsPilotCreateAppName: otel-go-server
armsPilotAppWorkspace: "workspace"
spec:
containers:
- image: registry.cn-hangzhou.aliyuncs.com/private-mesh/hellob:otel-server-arms-go-test-0.0.1
imagePullPolicy: Always
name: 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: otel-go-server
name: otel-server
namespace: default
spec:
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: http
port: 9000
protocol: TCP
targetPort: 9000
selector:
app: otel-go-server
sessionAffinity: None
type: ClusterIPACK コンソールにログインします。左側のナビゲーションウィンドウで、[クラスター] をクリックします。
[クラスター] ページで、左上隅にあるターゲットクラスターのリソースグループとリージョンを選択します。ターゲットクラスターの名前をクリックします。左側のナビゲーションウィンドウで [ワークロード] をクリックし、[ステートレス]、[ステートフル]、または [デーモンセット] を選択します。
ターゲットアプリケーションの右側で、
> [YAML の編集] を選択します。新しいアプリケーションを作成するには、[YAML から作成] をクリックします。
YAML ファイルで、`spec.template.metadata` の下に次の
labelsを追加します。labels: aliyun.com/app-language: golang # Go アプリケーションに必須です。このラベルは、アプリケーションが Go アプリケーションであることを指定します。 armsPilotAutoEnable: 'on' armsPilotCreateAppName: "deployment-name" # deployment-name をアプリケーション名に置き換えます。 armsPilotAppWorkspace: "workspace" # これを現在のワークスペース名に置き換えます。
[更新] をクリックします。
モニタリング詳細の表示
Cloud Monitor 2.0 コンソールにログインし、ワークスペースを選択します。左側のナビゲーションウィンドウで、[アプリケーションセンター] > [アプリケーション可観測性] > [アプリケーション監視] を選択します。
[アプリケーションリスト] ページで、[アプリケーション名] をクリックして、詳細なアプリケーション監視データを表示します。