How can I forward IIS logs to a syslog deamon?
Created on 2002-10-04 by Rainer
Gerhards.
MonitorWare Agent can forward Microsoft Internet Information Server (IIS)
log files to any syslog deamon (or syslo server, if you like). Fortunately,
IIS stores web log files as plain text files in the file system. Even better,
other processes are allowed to read these files while IIS adds information to
them. This enables MonitorWare Agent to forward them in near real-time.
MonitorWare Agent's file monitor is optimized to pick up application log
files. This includes IIS log files. Specific logic enables it to gather only
the valid part of the currently being written log file (IIS writes files in 64K
increments and there is garbage after the valid log data lines). Special
replacement characters inside the file name allow to handle changing file names,
so monitoring even works while rolling over to new names.
To activate log forwarding, create one file monitor per IIS log file to
monitor. Be sure to use the proper replacement characters if IIS modifies
the log file name (by default, it includes the day of month). Details on them
can be found in the manual. Then be sure to send all file lines to a rule base
that has syslog forwarding enabled. There is a sample in the Step-By-Step Guides
inside the manual.
IIS log file data is like any other event data in MonitorWare Agent.
So it can not only be forwarded by syslog but also be filtered, acted on, alerts
generated and so on. Another possible approach is to generate alerts if specific
attack patterns show up in the logs. As long as the pattern is known and can be
seen in the log file line, this can easily be configured.
Just a reminder: besides IIS, all other text logs can be processed. Prominent
examples include the DHCP log or database message log files.
|