4

完全なAPIアクセスを備えた新しいGoogle Compute Engineインスタンスを導入し、Stackdriverエージェントをインストールした後で、監視はエージェントからのメトリックを表示しません。完全アクセススコープを含むスタックドライブの監視が許可されていません

Install Agentマニュアルによれば、(APIキーを手動で設定するなどの)設定は必要ありません。

Cloud API access scopes 
This instance has full API access to all Google Cloud services. 

とインスタンス内の以下のコマンドを実行するには示しています:

$ curl --silent -f -H "Metadata-Flavor: Google" http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/scopes 
https://www.googleapis.com/auth/cloud-platform 

$ systemctl status stackdriver-agent 
Jul 13 10:14:00 host stackdriver-agent[21203]: [ OK ] 
Jul 13 10:14:00 host systemd[1]: Started LSB: start and stop Stackdriver Agent. 
Jul 13 10:14:00 host collectd[21226]: Initialization complete, entering read-loop. 
Jul 13 10:14:00 host collectd[21226]: match_throttle_metadata_keys: 1 history entries, 1 distinct keys, 46 bytes server memory. 
Jul 13 10:14:00 host collectd[21226]: tcpconns plugin: Reading from netlink succeeded. Will use the netlink method from now on. 
Jul 13 10:14:00 host collectd[21226]: write_gcm: Asking metadata server for auth token 
Jul 13 10:14:01 host collectd[21226]: write_gcm: Unsuccessful HTTP request 403: { 
               "error": { 
               "code": 403,... 
Jul 13 10:14:01 host collectd[21226]: write_gcm: Error talking to the endpoint. 
Jul 13 10:14:01 host collectd[21226]: write_gcm: wg_transmit_unique_segment failed. 
Jul 13 10:14:01 host collectd[21226]: write_gcm: wg_transmit_unique_segments failed. Flushing. 

Googleクラウドコンソールが持つインスタンスを示しています

は、エージェントサービスのステータスは、次のエラーが表示さ

何がうまくいかないと思っていますか?

答えて

6

私はそれを考え出した:

をあなたはデフォルトで有効にされていない、API ManagerGoogle Monitoring APIを有効にする必要があります。 APIキーを指定する必要はなく、デフォルトのアプリケーション認証情報が取得されます。

興味深いことに、今年初めからStackdriver Monitoringを使用しているプロジェクトが2つあり、でない場合は、ではGoogle Monitoring APIを有効にする必要があります。

+0

私はこれも持っていた、私の推測は、最近作成されたvmsは、古いvmsのチェックがスキップされる可能性がありますか? – Jaap

+1

Google Cloud Monitoring APIを有効にすることも私の答えでした。私は "API Manager" Webアプリケーションでそれを閲覧することができませんでした。私はそれを検索しなければなりませんでした。このリンクに私はhttps://console.cloud.google.com/apis/api/cloudmonitoring.googleapis.comを持ってきました。 /概要@Jaapは言っていますが、これは古いVMでのみ起こります。それでも、この修正はVMを再構築するよりも優れていました。あなたがた両方に感謝します。 – vdm

関連する問題