Does AppServiceHTTPLogs contain client IP?

Victor 1 Reputation point
2020-01-15T15:33:47.723+00:00

Im trying out the new diagnostic AppServiceHTTPLogs feature, to get http logs for a linux docker container. https://azure.github.io/AppService/2019/11/01/App-Service-Integration-with-Azure-Monitor.html

It seems like the CIp field (which I assume should contain the client IP) contains a local IP from azure, in my case 10.0.128.32, instead of the actual client ip. Is this by design or is it possible to get the real client ip somehow?

Without real client ip the http logs becomes much less useful, since its super tricky to connect log rows with each other.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
4,938 questions
{count} votes

4 answers

Sort by: Most helpful
  1. John Paul Garcia 1 Reputation point
    2020-01-22T15:30:04.323+00:00

    yes, the server side logs do. They are in W3C Logging format.

    See notes in:

    https://learn.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs

    Good Luck!

    0 comments No comments

  2. Ryan Hill 18,556 Reputation points Microsoft Employee
    2020-01-23T00:43:24.05+00:00

    Hi Victor,

    I've heard from the product group. The CIp is currently being populated with the load balancer IP. This is why the address is a local IP instead of the HTTP request IP. Nonetheless, they will make the necessary changes to use the request IP address in an upcoming update.

    UDPATED: The team has committed the fix and is awaiting deployment. It will take some time before it will be deployed to your region.

    Thanks,
    Ryan


  3. Indicaarcher 1 Reputation point
    2020-01-23T04:14:04.19+00:00

    Check server logs until load balancer is available. I look at the CIp rarely but have found W3C server logs as well.


  4. groomsb3 1 Reputation point
    2022-10-24T09:03:33.353+00:00

    To retrieve the client IP address of your Azure Function, you need to inspect the HTTP request and check for the X–Forwarded-For request header. The X-Forwarded-For request header is a de-facto standard header for identifying the originating IP address of a client connecting to a web server through a proxy server. https://savefromig.id/
    Client IP means proprietary systems, software, information, logos, services names, domain names, marks and copyrights the Client uses.
    find server client IP
    ?> Determining IP Address using $_SERVER Variable Method : There is another way to get the IP Address by using the $_SERVER['REMOTE_ADDR'] or $_SERVER['REMOTE_HOST'] variables. The variable in the $_SERVER array is created by the web server such as apache and those can be used in PHP.

    0 comments No comments