{"id":1213,"date":"2025-05-07T11:14:17","date_gmt":"2025-05-07T03:14:17","guid":{"rendered":"https:\/\/aws-oncloudai.com\/?p=1213"},"modified":"2025-05-13T16:24:04","modified_gmt":"2025-05-13T08:24:04","slug":"aws-log-monitoring-cloudtrail-vs-cloudwatch","status":"publish","type":"post","link":"https:\/\/aws-oncloudai.com\/zh_hk\/aws-log-monitoring-cloudtrail-vs-cloudwatch\/","title":{"rendered":"AWS \u65e5\u8a8c\u76e3\u63a7CloudTrail Vs CloudWatch"},"content":{"rendered":"<p>AWS CloudTrail\u662f\u4e9e\u99ac\u905c\u7db2\u8def\u670d\u52d9\uff08AWS\uff09\u7684\u53e6\u4e00\u9805\u670d\u52d9\uff0c\u70ba\u4f60\u7684AWS\u5e33\u6236\u63d0\u4f9b\u7a3d\u6838\u3001\u6cbb\u7406\u3001\u76e3\u63a7\u3001\u5408\u898f\u6027\u548c\u98a8\u96aa\u76e3\u63a7\u3002<\/p>\n<p>\u8207CloudWatch\u4e0d\u540c\uff0cCloudTrail\u662f\u4e00\u500b\u7ba1\u7406\u548c\u6cbb\u7406\u5de5\u5177\uff0c\u8b93\u4f60\u53ef\u4ee5\u89c0\u5bdfAWS\u5e33\u6236\u76f8\u95dc\u6d3b\u52d5\u7684\u6574\u500b\u4e8b\u4ef6\u6b77\u53f2\u3002<\/p>\n<p>CloudTrail\u662f\u4e00\u7a2e\u8a18\u9304\u670d\u52d9\uff0c\u53ef\u8a18\u9304\u5f9e\u4efb\u4f55\u5916\u90e8\u5de5\u5177\u7522\u751f\u7684\u4e8b\u4ef6\u6216\u884c\u52d5\uff0c\u5982AWS\u63a7\u5236\u53f0\u3001AWS CLI\u548cSDK\u3002\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528CloudTrail\u8f15\u9b06\u5730\u5075\u6e2c\u4f60\u7684\u5e33\u6236\u4e2d\u7684\u4efb\u4f55\u7570\u5e38\u6d3b\u52d5\u3002<\/p>\n<p>\u6211\u5011<strong>Oncloud AI<\/strong>\u900f\u904e\u672c\u6587\u5e6b\u52a9\u60a8\u4e86\u89e3\u4e9e\u99ac\u905cCloudWatch\u548cCloudTrail\u7684\u5dee\u7570\u3002<\/p>\n<h3>\u512a\u52e2<\/h3>\n<p>\u900f\u904e\u5b83\u8a18\u9304\u7684\u4e8b\u4ef6\u6b77\u53f2\uff0c\u6975\u5927\u7c21\u5316\u4e86\u5b89\u5168\u5206\u6790\u3001\u8cc7\u6e90\u8b8a\u5316\u8ffd\u8e64\u548c\u6545\u969c\u6392\u9664\u7684\u5de5\u4f5c\u3002<\/p>\n<h3>\u5de5\u4f5c\u539f\u7406<\/h3>\n<div>\n<div>\n<p>AWS CloudTrail\u8a18\u9304\u5728\u7d66\u5b9a\u7684AWS\u8a2d\u5b9a\u4e2d\u57f7\u884c\u7684\u6d3b\u52d5\uff0c\u4e26\u5075\u6e2c\u4efb\u4f55\u4e0d\u5c0b\u5e38\u7684API\u4f7f\u7528\uff0c\u7136\u5f8c\u5b83\u9084\u9032\u884c\u4e8b\u4ef6\u8ffd\u8e64\u548c\u6d3b\u52d5\u8a18\u9304\u3002\u7522\u751f\u7684\u9019\u4e9b\u4e8b\u4ef6\u5c07\u6703\u50b3\u905e\u5230AWS CloudTrail\u63a7\u5236\u53f0\u3001CloudWatch\u65e5\u8a8c\u548cS3\u6876\u3002<\/p>\n<p>\u900f\u904e\u4f7f\u7528CloudWatch \u4e8b\u4ef6\u548cAlarms\uff0cCloudTrail \u5728\u767c\u73fe\u4efb\u4f55\u7570\u5e38\u4e8b\u4ef6\u6642\u90fd\u6703\u63a1\u53d6\u5fc5\u8981\u7684\u884c\u52d5\u3002\u4f7f\u7528\u8005\u53ef\u4ee5\u5728CloudTrail \u63a7\u5236\u53f0\u4e2d\u67e5\u770b\u6240\u6709\u6700\u8fd1\u7684\u884c\u52d5\u548c\u4e8b\u4ef6\uff0c\u540c\u6642\u9084\u53ef\u4ee5\u4f7f\u7528\u6b77\u53f2\u8a18\u9304\u4e0b\u8f09CloudTrail \u6d3b\u52d5\u8a18\u9304\u3002<\/p>\n<\/div>\n<\/div>\n<h3><strong>CloudWatch \u548cCloudTrail \u7684\u5340\u5225<\/strong><\/h3>\n<table style=\"border-collapse: collapse; width: 100%; height: 241px;\" border=\"1\">\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 13.6422%; text-align: center; height: 24px;\"><strong>\u6bd4\u8f03\u9805<\/strong><\/td>\n<td style=\"width: 41.6988%; text-align: center; height: 24px;\"><strong>CloudWatch<\/strong><\/td>\n<td style=\"width: 44.6589%; text-align: center; height: 24px;\"><strong>CloudTrail<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 96px;\">\n<td style=\"width: 13.6422%; height: 96px; text-align: center;\">\u76e3\u63a7\u65b9\u5411<\/td>\n<td style=\"width: 41.6988%; height: 96px; text-align: left;\">\u4e00\u500b\u91dd\u5c0dAWS\u8cc7\u6e90\u548c\u61c9\u7528\u7684\u76e3\u63a7\u670d\u52d9\uff0c\u5831\u544a\u61c9\u7528\u7a0b\u5f0f\u65e5\u8a8c\uff0c\u662f\u4e00\u500b\u63a5\u8fd1\u5373\u6642\u7684\u7cfb\u7d71\u4e8b\u4ef6\u6d41\uff0c\u63cf\u8ff0\u4e86\u4f60\u7684AWS\u8cc7\u6e90\u7684\u8b8a\u5316\u7684\u670d\u52d9<\/td>\n<td style=\"width: 44.6589%; height: 96px; text-align: left;\">\u4e00\u9805\u7db2\u8def\u670d\u52d9\uff0c\u8a18\u9304\u4f60\u7684AWS\u5e33\u6236\u4e2d\u7684API\u6d3b\u52d5\uff0c\u63d0\u4f9b\u95dc\u65bcAWS\u5e33\u6236\u4e2d\u767c\u751f\u7684\u5177\u9ad4\u4fe1\u606f\uff0c\u662f\u4e00\u500b\u66f4\u6ce8\u91cd\u5728\u4f60\u7684AWS\u5e33\u6236\u4e2d\u9032\u884c\u7684AWS API\u8abf\u7528\u7684\u670d\u52d9<\/td>\n<\/tr>\n<tr style=\"height: 49px;\">\n<td style=\"width: 13.6422%; height: 49px; text-align: center;\">\u57fa\u672c\u64cd\u4f5c<\/td>\n<td style=\"width: 41.6988%; height: 49px; text-align: left;\">\u9810\u8a2d\u70ba\u60a8\u7684\u8cc7\u6e90\u63d0\u4f9b\u514d\u8cbb\u7684\u57fa\u672c\u76e3\u63a7\uff0c\u4f8b\u5982EC2\u5be6\u4f8b\u3001EBS\u6372\u548cRDS DB\u5be6\u4f8b<\/td>\n<td style=\"width: 44.6589%; height: 49px; text-align: left;\">\u7576\u5efa\u7acbAWS\u5e33\u6236\u6642\uff0cCloudTrail\u4e5f\u88ab\u9810\u8a2d\u70ba\u555f\u7528<\/td>\n<\/tr>\n<tr style=\"height: 48px;\">\n<td style=\"width: 13.6422%; height: 48px; text-align: center;\">\u80fd\u529b<\/td>\n<td style=\"width: 41.6988%; height: 48px; text-align: left;\">\u53ef\u6536\u96c6\u548c\u8ffd\u8e64\u6307\u6a19\uff0c\u6536\u96c6\u548c\u76e3\u63a7\u65e5\u8a8c\u6587\u4ef6\uff0c\u4e26\u8a2d\u5b9a\u8b66\u5831<\/td>\n<td style=\"width: 44.6589%; height: 48px; text-align: left;\">\u8a18\u9304\u4e86\u8ab0\u63d0\u51fa\u4e86\u8acb\u6c42\u3001\u4f7f\u7528\u7684\u670d\u52d9\u3001\u57f7\u884c\u7684\u64cd\u4f5c\u3001\u64cd\u4f5c\u7684\u53c3\u6578\u4ee5\u53caAWS\u670d\u52d9\u8fd4\u56de\u7684\u97ff\u61c9\u5143\u7d20\u7b49\u4fe1\u606f\uff0c\u7136\u5f8c\u5b58\u5132\u5230\u6307\u5b9a\u4f4d\u7f6e<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 13.6422%; height: 24px; text-align: center;\">\u76e3\u63a7\u983b\u7387<\/td>\n<td style=\"width: 41.6988%; height: 24px; text-align: left;\">\u5728\u57fa\u672c\u76e3\u63a7\u4e2d\u4ee55 \u5206\u9418\u70ba\u9031\u671f\u4ea4\u4ed8\u6307\u6a19\u6578\u64da\uff0c\u5728\u8a73\u7d30\u76e3\u63a7\u4e2d\u4ee51 \u5206\u9418\u70ba\u9031\u671f\u4ea4\u4ed8\u6307\u6a19\u6578\u64da\uff1b\u5176\u65e5\u8a8c\u4ee3\u7406\u9810\u8a2d\u6bcf\u4e94\u79d2\u767c\u9001\u4e00\u6b21\u65e5\u8a8c\u6578\u64da<\/td>\n<td style=\"width: 44.6589%; height: 24px; text-align: left;\">\u5728API \u547c\u53eb\u5f8c15 \u5206\u9418\u5167\u63d0\u4f9b\u4e8b\u4ef6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><b>Oncloud AI<\/b>\u8eab\u70baAWS\u4ee3\u7406\u5546\uff0c\u63d0\u4f9b\u4e9e\u99ac\u905c\u96f2\u7aef\u670d\u52d9\uff0c\u652f\u63f4\u4e9e\u99ac\u905c\u96f2\u7aef\u4f3a\u670d\u5668AWS\u4ee3\u4ed8\u3001AWS\u9077\u79fb\u3001AWS\u7dad\u904b\u8a17\u7ba1\u7b49\u670d\u52d9\uff0c\u5982\u6709\u76f8\u95dc\u9700\u6c42\u53ef\u806f\u7e6b<strong>Oncloud AI<\/strong>\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>AWS CloudTrail\u662f\u4e9e\u99ac\u905c\u7db2\u8def\u670d\u52d9\uff08AWS\uff09\u7684\u53e6\u4e00\u9805\u670d\u52d9\uff0c\u70ba\u4f60\u7684AWS\u5e33\u6236\u63d0\u4f9b\u7a3d\u6838\u3001\u6cbb\u7406\u3001\u76e3\u63a7\u3001\u5408\u898f\u6027\u548c\u98a8\u96aa\u76e3\u63a7\u3002<br \/>\n\u8207CloudWatch\u4e0d\u540c\uff0cCloudTrail\u662f\u4e00\u500b\u7ba1\u7406\u548c\u6cbb\u7406\u5de5\u5177\uff0c\u8b93\u4f60\u53ef\u4ee5\u89c0\u5bdfAWS\u5e33\u6236\u76f8\u95dc\u6d3b\u52d5\u7684\u6574\u500b\u4e8b\u4ef6\u6b77\u53f2\u3002<br \/>\nCloudTrail\u662f\u4e00\u7a2e\u8a18\u9304\u670d\u52d9\uff0c\u53ef\u8a18\u9304\u5f9e\u4efb\u4f55\u5916\u90e8\u5de5\u5177\u7522\u751f\u7684\u4e8b\u4ef6\u6216\u884c\u52d5\uff0c\u5982AWS\u63a7\u5236\u53f0\u3001AWS CLI\u548cSDK\u3002\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528CloudTrail\u8f15\u9b06\u5730\u5075\u6e2c\u4f60\u7684\u5e33\u6236\u4e2d\u7684\u4efb\u4f55\u7570\u5e38\u6d3b\u52d5\u3002<\/p>","protected":false},"author":1,"featured_media":1214,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[65],"tags":[],"class_list":["post-1213","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technical-sharing"],"_links":{"self":[{"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/posts\/1213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/comments?post=1213"}],"version-history":[{"count":0,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/posts\/1213\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/media\/1214"}],"wp:attachment":[{"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/media?parent=1213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/categories?post=1213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aws-oncloudai.com\/zh_hk\/wp-json\/wp\/v2\/tags?post=1213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}