Reply

Rest API to Extract Grid Status from Infoblox NIOS

New Member
Posts: 5
6479     0

Dear All,

WE are running infobox NIOS in system, and we wanted to automate the daily grid status of the same via rest API

 

we are using rest API as mentioned from ServiceNow Platform as http query 

 

https://infoblox.com /wapi/v2.9/grid 

for extracting the grid status command execution shows success as 200, but no result gets populated i am doing something wrong 

In GUI I can see the grid status but not via Rest API as it appears as Blank 

Help will be highly appreciated 

 

 

Re: Rest API to Extract Grid Status from Infoblox NIOS

[ Edited ]
Moderator
Moderator
Posts: 321
6480     0

in your call, grid is an object, not a data field.  If you want to get the grid status, you need to ask for the service_status field.

 

for example:

https://gm.example.com/wapi/v2.12/grid?_return_fields%2b=service_status

 

 

Also for individual appliances, take a look at the member object, and the service status:

 

https://gm.example.com/wapi/v2.12/member?_return_fields%2b=service_status

 

or the member node info:

 

https://gm.example.com/wapi/v2.12/member?_return_fields%2b=node_info

 

 

 

Re: Rest API to Extract Grid Status from Infoblox NIOS

New Member
Posts: 5
6480     0

Hi 

 

tried this calls also but status is like error admconprotoerror :unknown object type 

 

and when using v2.12 it says it is not supported 

 

Mahendra

 

Re: Rest API to Extract Grid Status from Infoblox NIOS

Moderator
Moderator
Posts: 321
6480     0

What version of NIOS are you running?  Can you post the exact code you're using?  it's working for me here, even with earlier WAPI versions.

 

 

Re: Rest API to Extract Grid Status from Infoblox NIOS

New Member
Posts: 5
6480     0

We are running infoblox version 

 

Version :8.5.3-417434 

Re: Rest API to Extract Grid Status from Infoblox NIOS

[ Edited ]
Moderator
Moderator
Posts: 321
6480     0

You can use WAPI version 2.11 on NIOS 8.5.x.  Here is an example using the unix curl command:

 

 

curl -k -u admin:infoblox -X GET 'https://gm.example.com/wapi/v2.11/grid?_return_fields%2b=service_status'

 

If all appliances are online, and all services are running normally, the response will look like this:

[
    {
        "_ref": "grid/b25lLmNsdXN0ZXIkMA:My_Grid", 
        "service_status": "WORKING"
    }
]

 

If there are issues with appliances or services, the grid's service status will be in error:

 

[
    {
        "_ref": "grid/b25lLmNsdXN0ZXIkMA:My_Grid", 
        "service_status": "FAILED"
    }
]

Re: Rest API to Extract Grid Status from Infoblox NIOS

New Member
Posts: 5
6480     0

HI Matt,

Thanks for the resolution , as i am looking via http interface and via curl i am getting 2 things 

via http get query, it is saying service status as_

<service_Status>FAILED </service_status>

<_ref>grid/b25xxxxxxxxxxxxxxxxxxxxx:infoblox</ref>

</value>

 

and when  i am running via curl 

403 forbidden you dont have permission to access /wapi/v2.11/grid on this server.

 

 

Re: Rest API to Extract Grid Status from Infoblox NIOS

New Member
Posts: 5
6480     0

Infoblox.service.status.image.png

 

Hi further to this one more if any of the services are red then the entire grid will be showing failed, or it will be showing as working 

 

Thanks....Mahendra

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You