Collecting IIS logs from multiple W3SVC directories

128 views
Skip to first unread message

Daniel Garczek

unread,
Jan 15, 2019, 11:10:55 AM1/15/19
to Wazuh mailing list
Hi Wazuh Community,

I'm looking to collect IIS log files from multiple W3SVCx directories (multiple IIS profiles). My current configuration only grabs logs from W3SVC1 and looks like this:

  <localfile>
    <location>F:\logfiles\W3SVC1\u_ex%y%m%d.log</location>
    <log_format>iis</log_format>
  </localfile>

I would like to also collect logs from W3SVC2, W3SVC3, and so on. I understand that a wildcard W3SVC* will not work in Windows. Is there any other way to specify a recursive directory search OR will I have to manually define all W3SVC folder locations, like in the example below?

  <localfile>
    <location>F:\logfiles\W3SVC1\u_ex%y%m%d.log</location>
    <location>F:\logfiles\W3SVC2\u_ex%y%m%d.log</location>
    <location>F:\logfiles\W3SVC3\u_ex%y%m%d.log</location>
    ...
    <location>F:\logfiles\W3SVC254\u_ex%y%m%d.log</location>
    <log_format>iis</log_format>
  </localfile>

Thanks,

Dan

jesus.g...@wazuh.com

unread,
Jan 16, 2019, 3:14:46 AM1/16/19
to Wazuh mailing list

Hi Dan,

From our documentation, I can see localfile#location, it says that we can’t use wildcards on Windows systems so for now, you should achieve that as you said.

We’ll take this feedback, it’s a good point and the team will discuss this.

Best regards,
Jesús

Message has been deleted

Dan G

unread,
Jan 17, 2019, 12:35:48 PM1/17/19
to Wazuh mailing list
Thanks, Jesus.

I did some more testing and found that placing all folders inside a single element will not work - they have to be separated like so:

 <localfile>
   <location>F:\logfiles\W3SVC1\u_ex%y%m%d.log</location>
   <log_format>iis</log_format>
 </localfile>

 <localfile>
  <location>F:\logfiles\W3SVC2\u_ex%y%m%d.log</location>
  <log_format>iis</log_format>
</localfile>
  
 <localfile>
   <location>F:\logfiles\W3SVC3\u_ex%y%m%d.log</location>
   <log_format>iis</log_format>
</localfile>

jesus.g...@wazuh.com

unread,
Jan 18, 2019, 3:51:08 AM1/18/19
to Wazuh mailing list
Hi Dan,

Thanks for your feedback, we note down this thread for future releases. Really appreciated.

Regards!
Reply all
Reply to author
Forward
0 new messages