Reply

API Call for grid members capacity report

New Member
Posts: 2
2173     0

I am looking to generate a capacity report for all grid members and wondering if someone has an API call that would generate a capacity report for all grid members

Re: API Call for grid members capacity report

Moderator
Moderator
Posts: 315
2173     0

REST cannot iterate through a list unfortunately.  You will need to specify each grid member, in a single API call per appliance, or a multibody request with a request for each appliance.

For example, here is a multibody rewuest, you can expand this to include each member:

curl -k -u admin:infoblox -H "Content-Type: application/json"  -X POST 'https://192.168.1.2/wapi/v2.11/request' -d \
'[
  {
    "method": "GET",
    "object": "capacityreport",
    "data": {"name": "gm.blox.corp"},
    "args": {"_return_fields+":"hardware_type,max_capacity,name,object_counts,percent_used,role,total_objects"},
    "discard": false
  },
  {
    "method": "GET",
    "object": "capacityreport",
    "data": {"name": "gmc.blox.corp"},
    "args": {"_return_fields+":"hardware_type,max_capacity,name,object_counts,percent_used,role,total_objects"},
    "discard": false
  },
  {
    "method": "STATE:DISPLAY"
  }
]'

returns this result:

 

[
    [
        {
            "_ref": "capacityreport/Li5jYXBhY2l0eXJlcG9ydCRjYXBhY2l0eV9yZXBvcnQ:gm.blox.corp", 
            "hardware_type": "IB-V825", 
            "max_capacity": 110000, 
            "name": "gm.blox.corp", 
            "object_counts": [
                {
                    "count": 41, 
                    "type_name": "A Record/Substitute (A Record) Rule/Substitute (IPv4 Address) Rule"
                }, 
                {
                    "count": 7, 
                    "type_name": "AAAA Record/Substitute (AAAA Record) Rule/Substitute (IPv6 Address) Rule"
                }, 
                {
                    "count": 33, 
                    "type_name": "Access Control Item"
                }, 
                {
                    "count": 7, 
                    "type_name": "Admin"
                }, 
                {
                    "count": 9, 
                    "type_name": "Admin Group"
                }, 
                {
                    "count": 1, 
                    "type_name": "Admin RADIUS Server"
                }, 
                {
                    "count": 1, 
                    "type_name": "Admin Radius Properties"
                }, 
                {
                    "count": 178, 
                    "type_name": "Blacklist Rule"
                }, 
                {
                    "count": 1, 
                    "type_name": "Bulk Host"
                }, 
                {
                    "count": 11, 
                    "type_name": "CNAME Record/Substitute Domain Name/Block/Passthru Rule"
                }, 
                {
                    "count": 9, 
                    "type_name": "DHCP Custom Option"
                }, 
                {
                    "count": 469, 
                    "type_name": "DHCP Fingerprints"
                }, 
                {
                    "count": 10, 
                    "type_name": "DHCP Lease"
                }, 
                {
                    "count": 2448, 
                    "type_name": "DHCP Option Fingerprint"
                }, 
                {
                    "count": 11, 
                    "type_name": "DHCP Range"
                }, 
                {
                    "count": 2, 
                    "type_name": "DHCP Range Option Filter"
                }, 
                {
                    "count": 19, 
                    "type_name": "DHCP Vendor Id Fingerprint"
                }, 
                {
                    "count": 2, 
                    "type_name": "DNS Traffic Control HTTP Monitor"
                }, 
                {
                    "count": 1, 
                    "type_name": "DNS Traffic Control ICMP Monitor"
                }, 
                {
                    "count": 2, 
                    "type_name": "DNS Traffic Control LBDN Pattern"
                }, 
                {
                    "count": 2, 
                    "type_name": "DNS Traffic Control Load Balanced Domain Name"
                }, 
                {
                    "count": 1, 
                    "type_name": "DNS Traffic Control PDP Monitor"
                }, 
                {
                    "count": 3, 
                    "type_name": "DNS Traffic Control Pool"
                }, 
                {
                    "count": 1, 
                    "type_name": "DNS Traffic Control SIP Monitor"
                }, 
                {
                    "count": 1, 
                    "type_name": "DNS Traffic Control SNMP Monitor"
                }, 
                {
                    "count": 3, 
                    "type_name": "DNS Traffic Control Server"
                }, 
                {
                    "count": 1, 
                    "type_name": "DNS Traffic Control Topology"
                }, 
                {
                    "count": 2, 
                    "type_name": "DNS Traffic Control Topology Rule"
                }, 
                {
                    "count": 74, 
                    "type_name": "DNS View AD Match Item"
                }, 
                {
                    "count": 74, 
                    "type_name": "DNS View Sortlist Entry"
                }, 
                {
                    "count": 3, 
                    "type_name": "DNSKEY Record"
                }, 
                {
                    "count": 30, 
                    "type_name": "Fixed Address"
                }, 
                {
                    "count": 1, 
                    "type_name": "Fixed Address Template"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid DHCP Fingerprint Filter"
                }, 
                {
                    "count": 4, 
                    "type_name": "Grid DHCP MAC Filter"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid DHCP Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid DNS Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid DNS Resolvers"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid Email Address"
                }, 
                {
                    "count": 5, 
                    "type_name": "Grid MAC Address Filter"
                }, 
                {
                    "count": 6, 
                    "type_name": "Grid Member"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid Monitoring Properties"
                }, 
                {
                    "count": 2, 
                    "type_name": "Grid NAT Group"
                }, 
                {
                    "count": 5, 
                    "type_name": "Grid NS Group"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid NTP Server"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid SNMP Trap Receiver"
                }, 
                {
                    "count": 3, 
                    "type_name": "Grid Scheduled Backups"
                }, 
                {
                    "count": 2, 
                    "type_name": "Grid Security Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid Security Properties Ruleset"
                }, 
                {
                    "count": 5, 
                    "type_name": "Grid Static Route"
                }, 
                {
                    "count": 2, 
                    "type_name": "Grid Syslog Server"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid TFTP Storage Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid Time Properties"
                }, 
                {
                    "count": 68, 
                    "type_name": "Host"
                }, 
                {
                    "count": 71, 
                    "type_name": "Host Address"
                }, 
                {
                    "count": 2, 
                    "type_name": "Host Alias"
                }, 
                {
                    "count": 6, 
                    "type_name": "Kerberos Key"
                }, 
                {
                    "count": 1, 
                    "type_name": "Lom User"
                }, 
                {
                    "count": 3, 
                    "type_name": "MAC Address Filter"
                }, 
                {
                    "count": 1, 
                    "type_name": "MX Record/Substitute (MX Record) Rule"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member Admin Email"
                }, 
                {
                    "count": 4, 
                    "type_name": "Member Anycast Address"
                }, 
                {
                    "count": 1, 
                    "type_name": "Member Anycast BGP Autonomous System Neighbor Address"
                }, 
                {
                    "count": 1, 
                    "type_name": "Member Anycast BGP Autonomous System Number"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member DHCP Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Member DNS Forwarder"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member DNS Properties"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member DNS Resolvers"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member Monitoring Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Member SNMP Trap Receiver"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member Security Properties"
                }, 
                {
                    "count": 2, 
                    "type_name": "Member Sync Pending Jobs"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member Syslog Server"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member TFTP Properties"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member Time Properties"
                }, 
                {
                    "count": 9, 
                    "type_name": "Member View"
                }, 
                {
                    "count": 16, 
                    "type_name": "Member View NAT Record"
                }, 
                {
                    "count": 1, 
                    "type_name": "NAC Filter"
                }, 
                {
                    "count": 4, 
                    "type_name": "NS Group External Primary"
                }, 
                {
                    "count": 2, 
                    "type_name": "NS Group External Secondary Server"
                }, 
                {
                    "count": 4, 
                    "type_name": "NS Group Grid Primary Server"
                }, 
                {
                    "count": 9, 
                    "type_name": "NS Group Secondary Server"
                }, 
                {
                    "count": 42, 
                    "type_name": "NS Record"
                }, 
                {
                    "count": 14, 
                    "type_name": "NSEC3 Record"
                }, 
                {
                    "count": 1, 
                    "type_name": "NSEC3PARAM Record"
                }, 
                {
                    "count": 39, 
                    "type_name": "Network"
                }, 
                {
                    "count": 5, 
                    "type_name": "Network Container"
                }, 
                {
                    "count": 1, 
                    "type_name": "Network Template"
                }, 
                {
                    "count": 2, 
                    "type_name": "Network View"
                }, 
                {
                    "count": 1, 
                    "type_name": "Network View DDNS             Forward Zone"
                }, 
                {
                    "count": 31, 
                    "type_name": "PTR Record/Substitute (PTR Record) Rule"
                }, 
                {
                    "count": 34, 
                    "type_name": "RRSIG Record"
                }, 
                {
                    "count": 41, 
                    "type_name": "Recycle Bin"
                }, 
                {
                    "count": 1, 
                    "type_name": "Roaming Host"
                }, 
                {
                    "count": 15, 
                    "type_name": "Role"
                }, 
                {
                    "count": 12, 
                    "type_name": "Router"
                }, 
                {
                    "count": 1, 
                    "type_name": "Ruleset"
                }, 
                {
                    "count": 107, 
                    "type_name": "SRV Record/Substitute (SRV Record) Rule"
                }, 
                {
                    "count": 1, 
                    "type_name": "Shared Network"
                }, 
                {
                    "count": 2, 
                    "type_name": "Shared Network Item"
                }, 
                {
                    "count": 7, 
                    "type_name": "Shared Record Group"
                }, 
                {
                    "count": 2, 
                    "type_name": "Snmp User"
                }, 
                {
                    "count": 365, 
                    "type_name": "TXT Record/Substitute (TXT Record) Rule"
                }, 
                {
                    "count": 4532, 
                    "type_name": "Threat Protection Rule"
                }, 
                {
                    "count": 360, 
                    "type_name": "Threat Protection Rule Category"
                }, 
                {
                    "count": 7268, 
                    "type_name": "Threat Protection Rule Parameter Definitions"
                }, 
                {
                    "count": 6800, 
                    "type_name": "Threat Protection Rule Parameters"
                }, 
                {
                    "count": 162, 
                    "type_name": "Threat Protection Rule Template"
                }, 
                {
                    "count": 9, 
                    "type_name": "Threat Protection Ruleset"
                }, 
                {
                    "count": 3, 
                    "type_name": "Unknown Record"
                }, 
                {
                    "count": 3, 
                    "type_name": "Upgrade Group"
                }, 
                {
                    "count": 1, 
                    "type_name": "VLAN"
                }, 
                {
                    "count": 1, 
                    "type_name": "VLAN View"
                }, 
                {
                    "count": 3, 
                    "type_name": "View"
                }, 
                {
                    "count": 37, 
                    "type_name": "Zone"
                }, 
                {
                    "count": 2, 
                    "type_name": "Zone Delegated Server"
                }, 
                {
                    "count": 1, 
                    "type_name": "Zone External Primary Server"
                }, 
                {
                    "count": 4, 
                    "type_name": "Zone External Secondary Server"
                }, 
                {
                    "count": 22, 
                    "type_name": "Zone SOA"
                }, 
                {
                    "count": 4, 
                    "type_name": "Zone Secondary Server"
                }, 
                {
                    "count": 9229, 
                    "type_name": "Other"
                }
            ], 
            "percent_used": 30, 
            "role": "Grid Master", 
            "total_objects": 33394
        }
    ], 
    [
        {
            "_ref": "capacityreport/Li5jYXBhY2l0eXJlcG9ydCRjYXBhY2l0eV9yZXBvcnQ:gmc.blox.corp", 
            "hardware_type": "IB-V825", 
            "max_capacity": 110000, 
            "name": "gmc.blox.corp", 
            "object_counts": [
                {
                    "count": 41, 
                    "type_name": "A Record/Substitute (A Record) Rule/Substitute (IPv4 Address) Rule"
                }, 
                {
                    "count": 7, 
                    "type_name": "AAAA Record/Substitute (AAAA Record) Rule/Substitute (IPv6 Address) Rule"
                }, 
                {
                    "count": 33, 
                    "type_name": "Access Control Item"
                }, 
                {
                    "count": 7, 
                    "type_name": "Admin"
                }, 
                {
                    "count": 9, 
                    "type_name": "Admin Group"
                }, 
                {
                    "count": 1, 
                    "type_name": "Admin RADIUS Server"
                }, 
                {
                    "count": 1, 
                    "type_name": "Admin Radius Properties"
                }, 
                {
                    "count": 178, 
                    "type_name": "Blacklist Rule"
                }, 
                {
                    "count": 1, 
                    "type_name": "Bulk Host"
                }, 
                {
                    "count": 11, 
                    "type_name": "CNAME Record/Substitute Domain Name/Block/Passthru Rule"
                }, 
                {
                    "count": 9, 
                    "type_name": "DHCP Custom Option"
                }, 
                {
                    "count": 469, 
                    "type_name": "DHCP Fingerprints"
                }, 
                {
                    "count": 10, 
                    "type_name": "DHCP Lease"
                }, 
                {
                    "count": 2448, 
                    "type_name": "DHCP Option Fingerprint"
                }, 
                {
                    "count": 11, 
                    "type_name": "DHCP Range"
                }, 
                {
                    "count": 2, 
                    "type_name": "DHCP Range Option Filter"
                }, 
                {
                    "count": 19, 
                    "type_name": "DHCP Vendor Id Fingerprint"
                }, 
                {
                    "count": 2, 
                    "type_name": "DNS Traffic Control HTTP Monitor"
                }, 
                {
                    "count": 1, 
                    "type_name": "DNS Traffic Control ICMP Monitor"
                }, 
                {
                    "count": 2, 
                    "type_name": "DNS Traffic Control LBDN Pattern"
                }, 
                {
                    "count": 2, 
                    "type_name": "DNS Traffic Control Load Balanced Domain Name"
                }, 
                {
                    "count": 1, 
                    "type_name": "DNS Traffic Control PDP Monitor"
                }, 
                {
                    "count": 3, 
                    "type_name": "DNS Traffic Control Pool"
                }, 
                {
                    "count": 1, 
                    "type_name": "DNS Traffic Control SIP Monitor"
                }, 
                {
                    "count": 1, 
                    "type_name": "DNS Traffic Control SNMP Monitor"
                }, 
                {
                    "count": 3, 
                    "type_name": "DNS Traffic Control Server"
                }, 
                {
                    "count": 1, 
                    "type_name": "DNS Traffic Control Topology"
                }, 
                {
                    "count": 2, 
                    "type_name": "DNS Traffic Control Topology Rule"
                }, 
                {
                    "count": 74, 
                    "type_name": "DNS View AD Match Item"
                }, 
                {
                    "count": 74, 
                    "type_name": "DNS View Sortlist Entry"
                }, 
                {
                    "count": 3, 
                    "type_name": "DNSKEY Record"
                }, 
                {
                    "count": 30, 
                    "type_name": "Fixed Address"
                }, 
                {
                    "count": 1, 
                    "type_name": "Fixed Address Template"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid DHCP Fingerprint Filter"
                }, 
                {
                    "count": 4, 
                    "type_name": "Grid DHCP MAC Filter"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid DHCP Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid DNS Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid DNS Resolvers"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid Email Address"
                }, 
                {
                    "count": 5, 
                    "type_name": "Grid MAC Address Filter"
                }, 
                {
                    "count": 6, 
                    "type_name": "Grid Member"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid Monitoring Properties"
                }, 
                {
                    "count": 2, 
                    "type_name": "Grid NAT Group"
                }, 
                {
                    "count": 5, 
                    "type_name": "Grid NS Group"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid NTP Server"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid SNMP Trap Receiver"
                }, 
                {
                    "count": 3, 
                    "type_name": "Grid Scheduled Backups"
                }, 
                {
                    "count": 2, 
                    "type_name": "Grid Security Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid Security Properties Ruleset"
                }, 
                {
                    "count": 5, 
                    "type_name": "Grid Static Route"
                }, 
                {
                    "count": 2, 
                    "type_name": "Grid Syslog Server"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid TFTP Storage Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Grid Time Properties"
                }, 
                {
                    "count": 68, 
                    "type_name": "Host"
                }, 
                {
                    "count": 71, 
                    "type_name": "Host Address"
                }, 
                {
                    "count": 2, 
                    "type_name": "Host Alias"
                }, 
                {
                    "count": 6, 
                    "type_name": "Kerberos Key"
                }, 
                {
                    "count": 1, 
                    "type_name": "Lom User"
                }, 
                {
                    "count": 3, 
                    "type_name": "MAC Address Filter"
                }, 
                {
                    "count": 1, 
                    "type_name": "MX Record/Substitute (MX Record) Rule"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member Admin Email"
                }, 
                {
                    "count": 4, 
                    "type_name": "Member Anycast Address"
                }, 
                {
                    "count": 1, 
                    "type_name": "Member Anycast BGP Autonomous System Neighbor Address"
                }, 
                {
                    "count": 1, 
                    "type_name": "Member Anycast BGP Autonomous System Number"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member DHCP Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Member DNS Forwarder"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member DNS Properties"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member DNS Resolvers"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member Monitoring Properties"
                }, 
                {
                    "count": 1, 
                    "type_name": "Member SNMP Trap Receiver"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member Security Properties"
                }, 
                {
                    "count": 2, 
                    "type_name": "Member Sync Pending Jobs"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member Syslog Server"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member TFTP Properties"
                }, 
                {
                    "count": 6, 
                    "type_name": "Member Time Properties"
                }, 
                {
                    "count": 9, 
                    "type_name": "Member View"
                }, 
                {
                    "count": 16, 
                    "type_name": "Member View NAT Record"
                }, 
                {
                    "count": 1, 
                    "type_name": "NAC Filter"
                }, 
                {
                    "count": 4, 
                    "type_name": "NS Group External Primary"
                }, 
                {
                    "count": 2, 
                    "type_name": "NS Group External Secondary Server"
                }, 
                {
                    "count": 4, 
                    "type_name": "NS Group Grid Primary Server"
                }, 
                {
                    "count": 9, 
                    "type_name": "NS Group Secondary Server"
                }, 
                {
                    "count": 42, 
                    "type_name": "NS Record"
                }, 
                {
                    "count": 14, 
                    "type_name": "NSEC3 Record"
                }, 
                {
                    "count": 1, 
                    "type_name": "NSEC3PARAM Record"
                }, 
                {
                    "count": 39, 
                    "type_name": "Network"
                }, 
                {
                    "count": 5, 
                    "type_name": "Network Container"
                }, 
                {
                    "count": 1, 
                    "type_name": "Network Template"
                }, 
                {
                    "count": 2, 
                    "type_name": "Network View"
                }, 
                {
                    "count": 1, 
                    "type_name": "Network View DDNS             Forward Zone"
                }, 
                {
                    "count": 31, 
                    "type_name": "PTR Record/Substitute (PTR Record) Rule"
                }, 
                {
                    "count": 34, 
                    "type_name": "RRSIG Record"
                }, 
                {
                    "count": 35, 
                    "type_name": "Recycle Bin"
                }, 
                {
                    "count": 1, 
                    "type_name": "Roaming Host"
                }, 
                {
                    "count": 15, 
                    "type_name": "Role"
                }, 
                {
                    "count": 12, 
                    "type_name": "Router"
                }, 
                {
                    "count": 1, 
                    "type_name": "Ruleset"
                }, 
                {
                    "count": 107, 
                    "type_name": "SRV Record/Substitute (SRV Record) Rule"
                }, 
                {
                    "count": 1, 
                    "type_name": "Shared Network"
                }, 
                {
                    "count": 2, 
                    "type_name": "Shared Network Item"
                }, 
                {
                    "count": 7, 
                    "type_name": "Shared Record Group"
                }, 
                {
                    "count": 2, 
                    "type_name": "Snmp User"
                }, 
                {
                    "count": 365, 
                    "type_name": "TXT Record/Substitute (TXT Record) Rule"
                }, 
                {
                    "count": 4532, 
                    "type_name": "Threat Protection Rule"
                }, 
                {
                    "count": 360, 
                    "type_name": "Threat Protection Rule Category"
                }, 
                {
                    "count": 7268, 
                    "type_name": "Threat Protection Rule Parameter Definitions"
                }, 
                {
                    "count": 6800, 
                    "type_name": "Threat Protection Rule Parameters"
                }, 
                {
                    "count": 162, 
                    "type_name": "Threat Protection Rule Template"
                }, 
                {
                    "count": 9, 
                    "type_name": "Threat Protection Ruleset"
                }, 
                {
                    "count": 3, 
                    "type_name": "Unknown Record"
                }, 
                {
                    "count": 3, 
                    "type_name": "Upgrade Group"
                }, 
                {
                    "count": 1, 
                    "type_name": "VLAN"
                }, 
                {
                    "count": 1, 
                    "type_name": "VLAN View"
                }, 
                {
                    "count": 3, 
                    "type_name": "View"
                }, 
                {
                    "count": 37, 
                    "type_name": "Zone"
                }, 
                {
                    "count": 2, 
                    "type_name": "Zone Delegated Server"
                }, 
                {
                    "count": 1, 
                    "type_name": "Zone External Primary Server"
                }, 
                {
                    "count": 4, 
                    "type_name": "Zone External Secondary Server"
                }, 
                {
                    "count": 22, 
                    "type_name": "Zone SOA"
                }, 
                {
                    "count": 4, 
                    "type_name": "Zone Secondary Server"
                }, 
                {
                    "count": 9229, 
                    "type_name": "Other"
                }
            ], 
            "percent_used": 30, 
            "role": "Grid Master Candidate", 
            "total_objects": 33388
        }
    ], 
    {}
]

Re: API Call for grid members capacity report

New Member
Posts: 2
2173     0

Many thanks

Showing results for 
Search instead for 
Did you mean: 

Recommended for You