将IIS日志移至S3

我有要求直接将IIS日志移动到S3。 有一些工具可以用来创build一个挂载并将IIS设置为挂载到S3存储桶。

我的问题是有一种方法,我可以从IIS级别做到这一点。 我被build议这篇文章

  • https://stackoverflow.com/questions/1904694/moving-files-to-amazon-s3-while-keeping-urls

但我不知道如何在IIS日志上实现上述scheme。

谁能帮我这个。

  • URL中给出的方法是否适用于IIS日志logging。

链接的文章处理您从站点提供的内容redirect – 所有这些都可以在IIS中configuration。

日志输出是完全不同的,IIRC在configuration选项上相当短。 上次我查看了IIS内置的唯一日志输出选项是写日志文件的地方,这意味着你被困在从窗口获取的path中。

您可以使用S3cmd将日志文件从Windows机器传输到S3

1) Setup python 2.x - Python 3 is not supported. 2) Download s3cmd from www.s3tools.org 3) Add python directory to your global path (should be C:\python2x) 4) Run python setup.py install 5) Run python s3cmd --configure (from the build path) 

您可以在名为s3cmd.ini的文件中编辑c:\ Users \“username”\ AppData \ Roaming \中的设置configuration中的值

然后你可以运行命令,例如:

  python s3cmd ls - it should list your buckets. 

一旦完成,您可以创build批处理脚本来上传日志。