始める前に
-
まだ設定していない場合は、認証を設定します。認証とは、 Trusted Cloud by S3NS サービスと API にアクセスするために ID を確認するプロセスです。ローカル開発環境からコードまたはサンプルを実行するには、次のいずれかのオプションを選択して Compute Engine に対する認証を行います。
Select the tab for how you plan to use the samples on this page:
Console
When you use the Trusted Cloud console to access Trusted Cloud by S3NS services and APIs, you don't need to set up authentication.
gcloud
-
After installing the Google Cloud CLI, sign in to the gcloud CLI with your federated identity and then initialize it by running the following command:
gcloud init
- Set a default region and zone.
-
Compute インスタンス管理者(v1)(
roles/compute.instanceAdmin.v1
) - インスタンスに Ops エージェントをインストールする: OSPolicyAssignment 編集者(
roles/osconfig.osPolicyAssignmentEditor
) - インスタンスのステータスを確認して、使用可能になるタイミングを確認する方法を学習する。
- instance0 に接続する方法を確認する。
REST
このページの REST API サンプルをローカル開発環境で使用するには、gcloud CLI に指定した認証情報を使用します。
After installing the Google Cloud CLI, sign in to the gcloud CLI with your federated identity and then initialize it by running the following command:
gcloud init
詳細については、 Trusted Cloud 認証ドキュメントの REST を使用して認証するをご覧ください。
必要なロール
Ops エージェントのモニタリングとロギング用のインスタンスを作成するために必要な権限を取得するには、プロジェクトに対する次の IAM ロールを付与するよう管理者に依頼してください。
ロールの付与については、プロジェクト、フォルダ、組織へのアクセス権の管理をご覧ください。
必要な権限は、カスタムロールや他の事前定義ロールから取得することもできます。
インスタンスに Ops エージェントをインストールする
Ops エージェントは既存のインスタンスにのみインストールできます。Ops エージェントを個々のインスタンスまたはインスタンス フリートにインストールするには、Trusted Cloud コンソール、gcloud CLI、または自動化ツールを使用します。手順については、Ops エージェントをインストールするをご覧ください。
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-21 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-21 UTC。"],[[["The Ops Agent collects telemetry data for instances, aiding in troubleshooting and performance tuning."],["Authentication to Google Cloud services and APIs is necessary, and can be done through the Google Cloud console, gcloud CLI, or REST API."],["Creating an instance for Ops Agent monitoring and logging can be done via the Google Cloud console by enabling the \"Install the Ops Agent for Monitoring and Logging\" option during instance creation."],["The Ops Agent can also be installed on existing instances using the Google Cloud console, gcloud CLI, or an automation tool."],["To install the agent, required roles include Compute Instance Admin (v1) and OSPolicyAssignment Editor."]]],[]] -