{"id":1215,"date":"2021-02-14T23:47:56","date_gmt":"2021-02-14T14:47:56","guid":{"rendered":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/?p=1215"},"modified":"2021-10-29T13:23:50","modified_gmt":"2021-10-29T04:23:50","slug":"best-5ways-searching-cloudwatch-logs","status":"publish","type":"post","link":"https:\/\/p-corporate-blog-cms.mmmcorp.co.jp\/blog\/2021\/02\/14\/best-5ways-searching-cloudwatch-logs\/","title":{"rendered":"CloudWatch Logs \u30ed\u30b0\u30b0\u30eb\u30fc\u30d7\u3092 tail -f \u3059\u308b5\u3064\u306e\u65b9\u6cd5"},"content":{"rendered":"

\u6700\u8fd1\u3044\u308d\u3044\u308d\u306a\u52c9\u5f37\u3092\u3057\u3066\u3044\u3066\u8133\u306e\u4f53\u529b\u304c\u935b\u3048\u3089\u308c\u3066\u3044\u308b\u3088\u3046\u306a\u6c17\u304c\u3057\u3066\u3044\u307e\u3059\u3002\u3084\u3063\u3055\u3093\u3067\u3059\u3002<\/p>\n

CloudWatch Logs \u30ed\u30b0\u30b0\u30eb\u30fc\u30d7\u3092tail\u3057\u30ed\u30b0\u51fa\u529b\u60c5\u5831\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u76e3\u8996\u3057\u305f\u3044\u3068\u3044\u3046\u30b1\u30fc\u30b9\u306b\u3064\u3044\u3066\u3001\u4eca\u56de\u306f5\u3064\u306e\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002CLI4\u3064+GUI1\u3064\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n

\u4f55\u6545tail -f\u3092\u3057\u305f\u3044\u306e\u304b<\/h2>\n

CloudWatch Logs \u30ed\u30b0\u30b0\u30eb\u30fc\u30d7\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u753b\u9762\u306f\u9032\u5316\u3057\u7d9a\u3051\u3066\u3044\u307e\u3059\u304c\u3001\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u76e3\u8996\u3068\u3044\u3046\u8981\u4ef6\u306b\u304a\u3044\u3066\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u304b\u3089\u30ed\u30b0\u76e3\u8996\u3092\u884c\u3044\u305f\u3044\u30b1\u30fc\u30b9\u306f\u983b\u7e41\u306b\u767a\u751f\u3057\u307e\u3059\u3002CLI\u3067\u30ed\u30b0\u76e3\u8996\u3059\u308b\u3068\u3001\u4f7f\u3044\u6163\u308c\u305f\u30d1\u30a4\u30d7\u3084grep\u306a\u3069\u306eLinux\u30b3\u30de\u30f3\u30c9\u3092\u5229\u7528\u3067\u304d\u308b\u3001\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3057\u3066\u30ed\u30b0\u51fa\u529b\u60c5\u5831\u3092\u4fdd\u5b58\u3059\u308b\u306a\u3069\u69d8\u3005\u306a\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n

CloudWatch Logs \u30ed\u30b0\u30b0\u30eb\u30fc\u30d7\u3092 tail -f \u3059\u308b\u65b9\u6cd55\u9078<\/h2>\n

1 AWS CLI V2\u306e\u300ctails --follow\u300d\u3092\u5229\u7528\u3059\u308b<\/h3>\n

AWS CLI V2\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001CloudWatch Logs \u30ed\u30b0\u30b0\u30eb\u30fc\u30d7\u3092tail\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n

\u30b3\u30de\u30f3\u30c9\u4f8b<\/h4>\n
aws logs tail \\\n\u3010\u30ed\u30b0\u30b0\u30eb\u30fc\u30d7\u540d\u3011 \\\n--follow<\/code><\/pre>\n

\u51fa\u529b\u4f8b<\/h4>\n

\"\"<\/a><\/p>\n

Pros<\/h4>\n