Reply

IP-address and Level

New Member
Posts: 6
5779     0

Hi,

 

First: I have very limited experience with Infoblox in general, and NIOS/Ipam in particular. I am an appllication manager of our system though - so are learning. We are running a very old version (6.12) of the system, but are looking to update - providing our request gets the go-ahead.

 

I've come up against a problem, where developers of a service requires that they are able to get a report of all IP-networks and the data in the extensible attribute "Level" for each network. I've been unable to use the GUI tools (partly because they keep aborting without producing any report what ever). So was looking to extract this information through API calls.

 

Is this possible with this old version? How would such a call look? Any suggestions are greatly appreciated.

Re: IP-address and Level

[ Edited ]
Moderator
Moderator
Posts: 317
5780     0

Hello,

 

NIOS 6.12 will work great, it can use WAPI versions 1.0 through 2.0.  And WAPI version 2.0 can be used in any later release, so you don't need to rewrite any WAPI scripts once you upgrade the NIOS software.  Notice that the WAPI version must be included as part of the request.

 

I do all my examples with the unix comnand "curl", and I prefer JSON format.  It's a personal preference.  You could also write Powershell scripts, or even post the URL in a browser window, and it will display in XML format.  Either one will give you a list of networks and the extensible attribute/value pairs for each network.

 

This command:

 

curl -k1 -u admin:infoblox -X GET 'https://192.168.1.2/wapi/v2.0/network?_return_fields%2b=extattrs'

returns a long list of networks, including this one.  I don't have the "Level" extensibe attribute, but instead I have Data Center and Network Type.

 

[
...
   {
        "_ref": "network/ZG5zLm5ldHdvcmskMTAuMTAzLjAuMC8xNi8w:10.103.0.0/16/default", 
        "comment": "Infoblox DDNS", 
        "extattrs": {
            "Data Center": {
                "value": "San Jose"
            }, 
            "Network Type": {
                "value": "Data Center"
            }
        }, 
        "network": "10.103.0.0/16", 
        "network_view": "default"
    }, 
...
]

Obviously you would need to convert from either JSON or XML, into a report more compatible with humans.

 

If you want to show networks with a specific value, such as Level 42,  your call might look like this:

 

curl -k1 -u admin:infoblox -X GET 'https://192.168.1.2/wapi/v2.0/network?*Level:=42&_return_fields%2b=extattrs'

You can also use Smart Folders to show a list of all networks organized by Extensible Attributes, within the GUI.  This might work instead, as it doesn't require an external script + report conversion.

 

Ignore the differences in colors, the most recent release has a new skin on the same interface.  This example will also work on NIOS 6.12.   It displays a list of networks, organized by Data Center. 

 

There's a few different things going on in this screenshot. 

 

First, in My Smart Folders, I have created a Smart Folder called "Networks by Data Center".  I filter it to objects of type "Network" and then I group the resuls by "Data Center" (You would group by "Level" instead).

 

Second, once I create and save the Smart Folder, it will show up in the left-hand window, in the Smart Folders section.

 

Third, I have expanded my new Smart Folder, and then I have also expanded the "Honolulo" Extensible Attribute value to show the Honolulu networks.

 

 

Screen Shot 2019-04-30 at 9.33.42 AM.png

 

You can make your own smart folders, and they are only visible to you.  Or you can make Global smart folders, and they are visible to everyone within the Global Smart Folders tab.  You can also add a link to a Global Smart Folder so that it shows up in your list.  To do this, hover over the Global Smart Folder and click on the purple square (the tool tip is "Add Link").  If you change or update  the Global Smart Folder, everyone using it will see the updates also.

 

(sorry the mouse cursor doesn't show in my screenshot)

Screen Shot 2019-04-30 at 9.25.31 AM.png

 

Re: IP-address and Level

New Member
Posts: 6
5780     0

Thanks a lot! Lots of useful info there - unfortunately the images didn't seem to work, or I'm doing it wrong.

 

//M.

Re: IP-address and Level

Moderator
Moderator
Posts: 317
5780     0

I also could not see the images until I logged in.  Maybe try logging in, if you weren't?  I will also re-post them, in jpg format, in case it didn't like the png screenshots for some reason.

 

smartfolder.jpg

 

global.jpg

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