gcloud logging read
安全Cloud Loggingの照会
gcloud logging read '<filter>' --limit 50
GCPの集中ログをフィルタ式で照会。severity>=ERRORやresource.typeで絞り、障害調査の一次情報を取る。
実行例
gcloud logging read 'severity>=ERROR' --freshness 1h --limit 30直近1時間のエラー
書式
gcloud logging read 'filter' [--limit N] [--freshness 1h]
実行前の注意
参照のみ。
関連コマンド
- gcloud compute instances listGCE一覧
- aws logs tailCloudWatchログ追従