Reply

DDI - DHCP Lease

LiBpt
Techie
Posts: 14
703     0

hi,

 

I ask me if it's possible to get a view on the network utilization, I explain me, The ddi give an utilization with a percent. This percent is based on the DHCP scope etc...


But I would like to find a networks view without lease, it's possible without API Perl ?

 

 

Sorry for my bad english, and thanks for your help.

 

 

Best regard

Lionel

 

Re: DDI - DHCP Lease

Adviser
Posts: 62
703     0

Hi Lionel,

 

From the post, I understand that your requirement is to identify how many IP addresses are free in a network. Is this correct?

 

If this is correct, the main consideration is whether this is from a DHCP perspective or an IPAM perspective.

 

DHCP utilization shows the utilization percentage of a network in terms of how many IP addresses are leased out. IPAM utilization shows the utilization of a network in terms of IPAM objects, such as Fixed addresses, reservations, DNS records, DHCP ranges etc, that exist for IP addresses. 

 

There are no methods available to show how many addresses, or what percentage of a network is free, but, this can be calculated from the DHCP or IPAM utilization. 

 

I see that you have, asked if there was a method to obtain this information without using Perl API. If RESTful API is an option, please see the below examples on getting the IPAM utilization or the DHCP utilization using RESTful API. 

 

IPAM Utilization

 

https://10.192.33.220/wapi/v2.7/network?_return_fields=utilization&_return_type=json-pretty

 

Sample Output

 

0 
_ref"network/ZG5zLm5ldHdvcmskMTAuMTkyLjMyLjAvMjQvMA:10.192.32.0/24/default"
utilization393
1 
_ref"network/ZG5zLm5ldHdvcmskMTAuMTkyLjMzLjAvMjQvMA:10.192.33.0/24/default"
utilization1000

 

 

DHCP Utilization

 

https://10.192.33.220/wapi/v2.7/network?_return_fields=dhcp_utilization&_return_type=json-pretty

 

Sample Output

 

0 
_ref"network/ZG5zLm5ldHdvcmskMTAuMTkyLjMyLjAvMjQvMA:10.192.32.0/24/default"
dhcp_utilization333
1 
_ref"network/ZG5zLm5ldHdvcmskMTAuMTkyLjMzLjAvMjQvMA:10.192.33.0/24/default"
dhcp_utilization0

 

I understand that the representation seems a bit confusing, but the utilization of 1000 means 100%, 393 means 39.3% and so on.

 

Also if this method is not preferred, a CSV export of all networks from the DHCP tab with the export visible data option, in the GUI will show you the DHCP utilization and the same export from the IPAM tab will show you the IPAM utilization.

 

The data can then be used to calculate the number or percentage of the free IP addresses.

 

If I have understood your requirement incorrectly, please let me know and I will get back to you.

 

Regards,

Sandeep

Re: DDI - DHCP Lease

Adviser
Posts: 74
703     0

Hello Lionel,

 

Just in case if WAPI is not an option :

 

Do you have Infoblox reporting & analytics solution in your Grid ? If yes, slight changes made to one of the pre-defined search strings would be able to return the “networks views” with 0% net DHCP utilization :

 

 

sourcetype=ib:dhcp:network index=ib_dhcp| eval dedup_key=view."/".address."/".tostring(cidr) | dedup dedup_key | eval NETWORK=address."/".cidr | lookup network_ea_lookup_csv NETWORK, NETWORK_VIEW as view output EA | spath input=EA output=MSSITE path=BUILTIN-MSSite | eval MSSITE = if(isnull(MSSITE), "(no_value)", MSSITE) | mvexpand MSSITE | msservers ms_servers | mvcombine MSSITE | sort 0 -num(dhcp_utilization) | eval Free=address_total-dhcp_hosts | rename timestamp as Timestamp, view as "Network view", address as Network, cidr as CIDR, MSSITE as "AD Site", dhcp_utilization as "DHCPv4 Utilization %", ranges as Ranges, address_total as Provisioned, dhcp_hosts as Used, static_hosts as Static, dynamic_hosts as Dynamic | sort -Timestamp | dedup "Network" | stats sum("DHCPv4 Utilization %") by "Network view" | search "sum(DHCPv4 Utilization %)"=0 | rename "sum(DHCPv4 Utilization %)" as "OVERALL-DHCP-UTILIZATION"

 

 

Note : You would need to ensure that the DHCP data is configured to be forwarded to your reporting server for results to be generated. This is how the results look like in my lab :

 

test2.png 

Best regards,

Mohammed Alman.

 

 

Re: DDI - DHCP Lease

LiBpt
Techie
Posts: 14
703     0

Hi, 

 

Thanks for your response, but where can i find this option ?

 

And if I don't have this option, Is it possible to enable this ?

 

Is there any other way?

 

thanks for your help. 

 

Lionel

Highlighted

Re: DDI - DHCP Lease

[ Edited ]
Adviser
Posts: 74
703     0

Hello Lionel,

 

I just recalled your statement from one of your previous posts that your Grid is currently running on NIOS 6.12.5 & ‘Infoblox Reporting and Analytics’(IBRA) where you could use custom Splunk search string to generate custom reports was introduced from NIOS 7.3.0. So your Grid would need an upgrade in order to make use of the IBRA search functionality. If an upgrade is not feasible, we might not be able to do much with Reporting to meet your requirement. How about the suggestion by Sandeep using WAPI ? That’s going to give you the list of DHCP utilization for all the networks. Looking at the schema, I’m not sure whether you could get the list of network views in which we have 0% DHCP utilization via WAPI. As I’ve mentioned in my reply to the other post, an upgrade to 8.x would be highly beneficial in all aspects. I suggest speaking to your Infoblox representative to plan an upgrade to one of the latest 8.x versions as appropriate, so that you could get all the latest features offered by NIOS 8.x compared to the EOL version which you’re using as of now.

 

Now in case if you’re already running on any later versions which support custom Splunk search :

 

Go to Reporting -> Search -> Use the string that I’ve shared in my last reply to your question.

 

If you do not see any data in result, it could be because of two reasons :

 

1) There is no such network views with 0% net DHCP utilization. 

 

2) Your reporting server is not configured to index ib_dhcp data. To check this, please go to Grid -> Reporting -> Grid reporting properties(Just select ‘Edit’ from toolbar without selecting any members) -> Ensure that the DHCP categories are enabled & a non-zero number is assigned. If this is configured fine, see whether you get any results for "index=ib_dhcp" from Reporting -> Search. If yes, the reason is likely the first possibility. If not, please contact Infoblox support to understand why doesn't the reporting server index the data though the category is enabled.

 

Talking about other options if any, as what was advised by Sandeep earlier, you could make use of the CSV export feature, but you may need to do that for individual Network views. You may :

 

  • Go to the first network view -> DHCP -> Networks -> Networks -> Using the jo.JPG  icon, select "Export Visible Format".
  • Now you may use some Excel formulas to find the sum of "IPv4 DHCP Utilization" column & if that sum exceeds 0, then that means some of the networks in that Network view is utilized. Similarly perform the same steps for all network views.

 

I agree that this is a tedious job to do & might not be convenient if these reports are required quite often. That's where the Infoblox Reporting & Analytics solution would be of help. You could craft searches of your own & schedule these reports to your email for regular intervals as required. In this case, you could just use the string that i've provided & that report could be scheduled/saved as a new report.

 

 

Best regards,

Mohammed Alman.

Showing results for 
Search instead for 
Do you mean 

Recommended for You