- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Get name/IP of grid master from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2019 03:42 PM
Is there a call to get the name or IP address of the current grid master from a REST API call? If so, what is it?
I've looked through the grid and member object documentation but can't seem to find it. I also can't just use the IP/name that I'm accessing the WAPI from as it doesn't match the member details configured on the Infoblox appliance.
Solved! Go to Solution.
Re: Get name/IP of grid master from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2019 10:13 PM
Hi,
You can get this information using the /member endpoint like below:
curl -k -u admin:infoblox "https://grid-master/wapi/v2.11/member?_return_fields%2B=vip_setting"
Sample output:
[ { "_ref": "member/b25lLnZpcnR1YWxfbm9kZSQw:infoblox.localdomain", "config_addr_type": "IPV4", "host_name": "infoblox.localdomain", "platform": "VNIOS", "service_type_configuration": "ALL_V4", "vip_setting": { "address": "172.26.1.20", "dscp": 0, "gateway": "172.26.1.1", "primary": true, "subnet_mask": "255.255.255.0", "use_dscp": false } } ]
If you have MGMT port enabled, you can get the mgmt IP using the following API call:
curl -k -u admin:infoblox "https://grid-master/wapi/v2.11/member?_return_fields%2B=vip_setting,node_info"
Thanks and regards,
Krishna Vasudevan
Re: Get name/IP of grid master from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2019 10:23 PM
Thanks for the reply!
I have multiple members on the grid - this looks like it returns the IP addresses for all of the members. Is there a way to tell which one of the members is currently the grid master?
Re: Get name/IP of grid master from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2019 03:41 AM
Hi,
If you know the IP address of the grid master, you can send a query with that like below:
curl -k -u admin:infoblox "https://grid-master/wapi/v2.11/member?ipv4_address=172.26.1.20&_return_fields%2B=vip_setting"
Re: Get name/IP of grid master from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2019 02:39 PM
Thanks for the reply! In this case I'm wondering if there's any way to retrieve the identity of the grid master without knowing its IP address or name beforehand.
Re: Get name/IP of grid master from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2019 08:19 PM
Generally you need to know the gridmaster's name or IP address because that's where you need to send the HTTPS session for the WAPI call. By default the gridmaster is the only appliance that can accept WAPI calls. However it is possible to turn on WAPI access on other appliances.
If you're interested in finding out, in a generic way, such as for automation, you could ask for a list of all the appliances, and request the field "upgrade_group". The active gridmaster will be the only appliance in the "Grid Master" upgrade group.
The upgrade_group field is not searchable so you would need to return all the appliances, and then parse the data to get the one you want.
The hostname is included by default.
There are potentially multiple IP addresses on any appliance. Typically you would want the LAN1 or VIP address, which is stored in the "vip_setting" structure.
This call:
curl -k -u admin:infoblox -X GET 'https://10.100.42.6/wapi/v2.7/member?_return_fields%2b=upgrade_group,vip_setting'
would return a list like this:
[ { "_ref": "member/b25lLnZpcnR1YWxfbm9kZSQw:gm.example.net", "config_addr_type": "BOTH", "host_name": "gm.example.net", "platform": "VNIOS", "service_type_configuration": "ALL_V4", "upgrade_group": "Grid Master", "vip_setting": { "address": "10.100.42.6", "dscp": 0, "gateway": "10.100.42.1", "primary": true, "subnet_mask": "255.255.255.0", "use_dscp": false } }, { "_ref": "member/b25lLnZpcnR1YWxfbm9kZSQ3:gmc.example.net", "config_addr_type": "BOTH", "host_name": "gmc.example.net", "platform": "VNIOS", "service_type_configuration": "ALL_V4", "upgrade_group": "Default", "vip_setting": { "address": "10.100.42.7", "dscp": 0, "gateway": "10.100.42.1", "primary": true, "subnet_mask": "255.255.255.0", "use_dscp": false } } ]
Re: Get name/IP of grid master from WAPI
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2019 07:34 PM
This is what I'm looking for. Thank you!