This is one of those quick blog posts. You may end up in situation where csHost field is missing when you ingest IIS logs.
This is just the default behavior. By default IIS web server generates a log with certain fields and host header name is not one of them. The solution is simple. On every IIS server add the fields that you want to be in W3C log. Go to IIS Manager and on the whole server or for specific site click on Logging.
Click on Select Fields and select the fields that you want to be added to the log.
Note that custom created fields are not ingested by OMS Log Analytics. After that change new logs will contain that field.
Stanislav Zhelyazkov has been working in IT since 2007. Stanislav has started his IT career as a Help Desk Specialist in 2007 while studying Informatics in the University of Ruse. He also worked in HP Enterprise Services (now known as DXC), maintaining large corporate IT infrastructures for clients in Holland, Switzerland and Germany and was involved in a Private Cloud project based on MS Hyper-V and System Center. He was also in the role of Principal Consultant in Lumagate developing and consulting companies on Azure, OMS, management and Private clouds. Currently he is Cloud Infrastructure Engineer at Sentia Denmark. Stanislav is active community member at MSDN forums providing answers on Azure. His blogposts can be found at www.cloudadministrator.net or www.systemcentercentral.com.
View all posts by Stanislav Zhelyazkov