Open for Voting

New macro suggestion: ${Node.All_IPAddresses}

Following an issue I've encountered with SAM on our environment (Detailed here: HTTP monitor multiple IP addresses Dyamically,

or in summary: "you can't use HTTP Monitor in a template for several nodes which serve multiple sites using multiple IIS IP bindings"),

I've been intuitively looking for this macro, which apparently doesn't exist in SAM (yet...)

I think it will be a great time saver on some very common configurations, I know it will in my case...

The ${Node.All_IPAddresses} (or any better name you can come up with) should be similar to the ${IP} macro (as used in HTTP Monitor),

only instead of only holding the value of the node's main (or polled) IP Address - it should be holding an array of ALL the node's IP Addresses.

A good way to use a specific IP address from this array, would be to access it in a similar way to most systems:  ${Node.All_IPAddresses[n]}

([n] being a [0... last] index value of IP Addresses in the array)

For example: assuming you need to set up a template with 3 HTTP Monitor components to assign for lets say, 50 web servers

and each HTTP Monitor should access a different site being served from a different IP on each web server,

Instead of manually overriding the default ${IP} macro and setting the wanted IP Address on your own for each site on each server (What are the templates for? emoticons_happy.png),

You would simply use this in the HTTP Monitor URL:

http://${Node.All_IPAddresses[0]}:${PORT}/TheURLToMonitor.aspx for the first site

http://${Node.All_IPAddresses[1]}:${PORT}/TheURLToMonitor.aspx for the second site
http://${Node.All_IPAddresses[2]}:${PORT}/TheURLToMonitor.aspx for the third site


e voila, your job is done.