Forum Discussion
cat_13700
Nimbostratus
Mar 18, 2010Display name of pool member server
In the BIG-IP gui, when you're displaying members of the pool, you can see availability, ip and port, and the server name (in the column "node name"), among other things. I've found everything I need for my dashboard app, except the user-friendly server name. Where can i dig that up to display it in my app? Thanks for considering the question!
- Pool members themselves don't have user friendly names. That is an attribute of the NodeAddress. You'll need to look at the addresses for the pool members you are interested in and then query the LocalLB.NodeAddress.get_screen_name() method to query out the user friends names for those addresses.
http://devcentral.f5.com/wiki/default.aspx/iControl/LocalLB__NodeAddress__get_screen_name.html
- cat_13700
Nimbostratus
not having much luck here. i see that the get_screen_name function takes a string[] of node_addresses. Assuming those were just ip addresses i wrote the following: - Have you ensured that those node addresses have an assigned screen name in the GUI? A screen name is something that has to be manually set.
- cat_13700
Nimbostratus
yes server names display. other ideas? - cat_13700
Nimbostratus
I had a discussion with my network guy. He says the server name is only entered in one place. If i pick a local traffic pool and view the members in the console, i see me server name in the "node name" column. If i go to local traffic nodes and view the list, i see my servers and the server name shows up in the name column. If i click on one of my ips, I see the server name greyed out in the name box.//get list of members CommonIPPortDefinition [][] members = m_interfaces.LocalLBPool.get_member(new string[] {sPoolName}); for (int i = 0; i < members[0].Length; i++) { //get address and port sAddPort = members[0][ i ].address + ":" + members[0][ i ].port; //get enable status LocalLBPoolMemberMemberSessionState[][] sessionStates = m_interfaces.LocalLBPoolMember.get_session_enabled_state(new string[] { sPoolName }); bEnable = ParseState(sessionStates[0][ i ].session_state); //get avail status LocalLBPoolMemberMemberObjectStatus[][] objStatus = m_interfaces.LocalLBPoolMember.get_object_status(new string[] { sPoolName }); LocalLBAvailabilityStatus availability = objStatus[0][ i ].object_status.availability_status; sAvailable = ParseAvail((CommonAvailabilityStatus)availability); //get server name string[] nalist = new string[] { members[0][ i ].address }; string[] sAdd = m_interfaces.LocalLBNodeAddress.get_screen_name(nalist); //populate members listview { ListViewItem tempLvi = new ListViewItem(sAddPort); tempLvi.SubItems.Add(sAdd[0]); lvMembers1.Items.Add(tempLvi); } if (bEnable) lvMembers1.Items[ i ].Checked = true; if (sAvailable == "DOWN") { lvMembers1.Items[ i ].BackColor = Color.LightCoral; } }
- I don't see anything wrong with your code so there's not much I can do from my end to diagnose it further. I just wrote up some test code to verify that the methods worked. Could you test this console code out? It will query all the pools, then for each pool, query the pool members and the screen names for those members and then print it out to the console. If you are getting zero screen names in the output then there must be a bug on your version of BIG-IP.
namespace cstest { class Program { static void Main(string[] args) { iControl.Interfaces m_interfaces = new iControl.Interfaces(); m_interfaces.initialize("BIGIP_ADDRESS_GOES_HERE", "BIGIP_USER", "BIGIP_PASS"); String [] pool_list = m_interfaces.LocalLBPool.get_list(); iControl.CommonIPPortDefinition [][] member_listAofA = m_interfaces.LocalLBPool.get_member(pool_list); // Loop over pools for (int i = 0; i < member_listAofA.Length; i++) { int node_len = member_listAofA[ i ].Length; String[] node_addresses = new String[node_len]; for (int j = 0; j < node_len; j++) { node_addresses[j] = member_listAofA[ i ][j].address; } String[] screen_names = m_interfaces.LocalLBNodeAddress.get_screen_name(node_addresses); Console.WriteLine("POOL {0}", pool_list[ i ]); for (int j = 0; j < node_len; j++) { Console.WriteLine(" {0} -> '{1}'", node_addresses[j], screen_names[j]); } } } } }
- Bummer man. It works fine for me on 10.1 and I know I've tested it on the 9.6 branch. You'll likely have to submit a support ticket on that one.
- cat_13700
Nimbostratus
SUCCESS!
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects