Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Gtm get all Server and Virtual Server

Ray806574
Nimbostratus
Nimbostratus

I want to get all the virtual servers on a BIGIP GTM device and their servers

At present, it is realized by obtaining all servers on the device first and then iteratively obtaining virtual server, but its efficiency is very low. Is there a better solution?

# python

server_items = read_servers()  # /mgmt/tm/gtm/server; After processed.
for server_item in server_items:
  for server_item in server_items:
    server_name = server_item["name"] 
    vs_items = read_vs_in_server()  # /mgmt/tm/gtm/server/{server_name}/virtual-servers
    # ... Other codes

It obtains all the servers on the device through REST, and then obtains the virtual server from the server, but it is very slow when the amount of data on the device is large. Is there a better way?

0 REPLIES 0