Reputation: 3732
I'm using mule esb 3.7.1 with the latest HTTP connector. I have a flow with an incoming http connector; and need to know which IP addresses are sending requests. I have mmc etc - what's the easiest way to do this? Have looked at the all the docs afaik and see no mention.
Upvotes: 0
Views: 3280
Reputation: 367
Use the below logger statement to print the request IP address after HTTP inbound component
<logger doc:name="Logger" level="INFO" message="IP value --- #[message.inboundProperties.'http.remote.address']"></logger>
Upvotes: 2
Reputation: 86
The HTTP header property "http.remote.address" of the Mule message lets you identify the remote host for a HTTP request.
But you need to consider these:
1) In a typical client environment, the request calls may be routed from firewalls, reverse proxies etc and may reach Mule. In that case, the above HTTP header property might have your reverse Proxy IP address (you need to confirm this by testing this in a test environment)
2) If you want to monitor the http requests from different client IPs/hosts, then you need to use an external tool and route the calls to Mule (i.e. a front ending Load Balancer kind of tool which provides you these details).
Hope this helps!
Thank you,
Ananth Krishnan
www.app-integrators.com
Upvotes: 1