We have GTM devices in several datacenters and when trying to find out where a website is active it sometimes takes a few clicks to get the data - and it isn’t in one view. So I was trying to make a little web page to show GTM WIP --> GTM Pool --> Server Name / Datacenter --> LTM Virtual Server --> LTM Pool. Eventually I would like to have the ratio at the GTM level if I am split between datacenters instead of 100% traffic to one datacenter.
I have some working code, but I am sure there is a much more efficient way to do what I am trying to do, so I am just looking for a better way to get information for a specific Wide IP pool - specifically searching for just one instead of iterating through all of them and can I get back the “Server Name” and “Data Center” fields. Also the same applies at the pool level.
Correct. I want to optimize it and make it a little more flexible. This also seemed like a good example to learn about how to get data for just one WIP/VS/Pool.
In the long run I want to be able to take my WideIP, show what Pool it goes to and show the ratio between DataCenters.
What I am trying to improve I think is as follows:
1) Put in the WIP and get the pool it points to (right now I know what pool is used for the WIP so I hard coded it to just look at the pool)
2) Get the GTM/LTM pool directly instead of getting all pools and iterating through them to find just the one I want to look at
3) Find out how to access the ‘Server Name’ and ‘Data Center’ values that I see in the GTM for the GTM Pool (this is on 10.2)
So although a working example would be great I think I can put something together if I can just figure out which functions I should use for the above or if I can even get back the values easily.
I am thinking eventually I would look for output something like this (assume I send it the WIP mytest.com)
However from this point I am still not sure how to get the additional information for the member - namely the member name, server name and data center values that are listed in the web GUI for the pool. I am thinking this is more of a calculated value than a property of the pool, but looking through the API guide I don’t see any place that this is exposed. It looks like I would have to query every LTM to find the member.address.
So I think that I have my first two goals covered but still not seeing in the API guide how to get the above data easily.