Are you interested in our Early Access Program (EAP)? This program allows you to preview code, test in your lab and provide feedback prior to General Availability (GA) release of all Infoblox products. If so, please click the link here.

Getting Started

Reply

WAPI Function for Polling Grid Members

Techie
Posts: 3
225     1

NIOS v8.5.2:

 

I have a script that emails our team when a DNS restart is required (since we disabled the banner, it caused too much confusion amongst other users). It checks the member status for "REQUESTING". I realized this is not accurate since if the members aren't "polled" they will continue to report that they do not need a restart. I cannot find anywhere in the WAPI docs any sort of function for polling grid members as to their restart status. Anyone have any ideas?

 

Thanks!

Re: WAPI Function for Polling Grid Members

Community Manager
Community Manager
Posts: 178
226     1

Asking for the status:

curl -k1 -u admin:infoblox -X GET 'https://192.168.1.2/wapi/v2.11/restartservicestatus'

If you haven't polled recently, the status will be "NO_REQUEST". 

 

    {
        "dhcp_status": "NO_REQUEST", 
        "dns_status": "NO_REQUEST", 
        "member": "ddi.example.com", 
        "reporting_status": "DISABLED"
    }

 

Use the requestrestartservicestatus function to ask the grid to retrieve the current status from each member

 

curl -k1 -u admin:infoblox -X POST 'https://192.168.1.2/wapi/v2.11/grid/b25lLmNsdXN0ZXIkMA:Infoblox?_function=requestrestartservicestatus'

Then ask until the status changes from REQUESTING to either YES or NO:

 

    {
        "dhcp_status": "REQUESTING", 
        "dns_status": "REQUESTING", 
        "member": "ddi.example.com", 
        "reporting_status": "DISABLED"
    }

after a few seconds, it will flip.  DHCP is requesting restart in this case:

 

    {
        "dhcp_status": "YES", 
        "dns_status": "NO", 
        "member": "ddi.example.com", 
        "reporting_status": "DISABLED"
    }

 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You

Businesses are investing heavily into securing company resources from cyber-attacks form cybercrimin