Reply

Export Show Capacity

Techie
Posts: 7
2704     0

I need export the command show capacity to file.  What is the command for this case?

Re: Export Show Capacity

Community Manager
Community Manager
Posts: 210
2705     0

The capacity report is for an individual appliance,.  If you want it for all appliances you will have to first get the list of all appliances.  Also it returns structured data (object_counts is an array) so you will need to format it to your needs and then output to a file.

 

Here's the curl example, with all the available fields added:

 

curl -k1 -u admin:infoblox -X GET 'https://192.168.1.2/wapi/v2.7/capacityreport' -d 'name=gm.example.org' -d '_return_fields%2b=hardware_type,max_capacity,object_counts,total_objects'

 

And here's an example output:

 

[
    {
        "_ref": "capacityreport/Li5jYXBhY2l0eXJlcG9ydCRjYXBhY2l0eV9yZXBvcnQ:gm.richard.network",
        "hardware_type": "IB-VNIOS/IB-VNIOS",
        "max_capacity": 110000,
        "name": "gm.richard.network",
        "object_counts": [
            {
                "count": 22,
                "type_name": "A Record/Substitute (A Record) Rule/Substitute (IPv4 Address) Rule"
            },
            {
                "count": 81,
                "type_name": "Access Control Item"
            },
            {
                "count": 8,
                "type_name": "Admin"
            },
            {
                "count": 9,
                "type_name": "Admin Group"
            },
            {
                "count": 1,
                "type_name": "Approval Workflow"
            },
            {
                "count": 2,
                "type_name": "Bulk Host"
            },
            {
                "count": 6,
                "type_name": "CNAME Record/Substitute Domain Name/Block/Passthru Rule"
            },
            {
                "count": 9,
                "type_name": "DHCP Custom Option"
            },
            {
                "count": 266,
                "type_name": "DHCP Fingerprints"
            },
            {
                "count": 12,
                "type_name": "DHCP Lease"
            },
            {
                "count": 692,
                "type_name": "DHCP Option Fingerprint"
            },
            {
                "count": 6,
                "type_name": "DHCP Range"
            },
            {
                "count": 3,
                "type_name": "DHCP Range Option Filter"
            },
            {
                "count": 48,
                "type_name": "DHCP Vendor Id Fingerprint"
            },
            {
                "count": 3,
                "type_name": "DNS Traffic Control HTTP Monitor"
            },
            {
                "count": 1,
                "type_name": "DNS Traffic Control ICMP Monitor"
            },
            {
                "count": 1,
                "type_name": "DNS Traffic Control PDP Monitor"
            },
            {
                "count": 1,
                "type_name": "DNS Traffic Control SIP Monitor"
            },
            {
                "count": 1,
                "type_name": "DNS Traffic Control SNMP Monitor"
            },
            {
                "count": 2,
                "type_name": "DNS Traffic Control TCP Monitor"
            },
            {
                "count": 91,
                "type_name": "DNS View AD Match Item"
            },
            {
                "count": 91,
                "type_name": "DNS View Sortlist Entry"
            },
            {
                "count": 6,
                "type_name": "DNSKEY Record"
            },
            {
                "count": 21,
                "type_name": "Fixed Address"
            },
            {
                "count": 1,
                "type_name": "Fixed Address Template"
            },
            {
                "count": 1,
                "type_name": "Grid DHCP Failover Association"
            },
            {
                "count": 1,
                "type_name": "Grid DHCP Fingerprint Filter"
            },
            {
                "count": 3,
                "type_name": "Grid DHCP MAC Filter"
            },
            {
                "count": 1,
                "type_name": "Grid DHCP Properties"
            },
            {
                "count": 1,
                "type_name": "Grid DNS AD Match Item"
            },
            {
                "count": 1,
                "type_name": "Grid DNS Properties"
            },
            {
                "count": 1,
                "type_name": "Grid DNS Resolvers"
            },
            {
                "count": 1,
                "type_name": "Grid DNS Sortlist Entry"
            },
            {
                "count": 1,
                "type_name": "Grid Email Address"
            },
            {
                "count": 6,
                "type_name": "Grid MAC Address Filter"
            },
            {
                "count": 5,
                "type_name": "Grid Member"
            },
            {
                "count": 1,
                "type_name": "Grid Monitoring Properties"
            },
            {
                "count": 2,
                "type_name": "Grid NAT Group"
            },
            {
                "count": 4,
                "type_name": "Grid NS Group"
            },
            {
                "count": 5,
                "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": 3,
                "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": 64,
                "type_name": "Host"
            },
            {
                "count": 68,
                "type_name": "Host Address"
            },
            {
                "count": 2,
                "type_name": "Host Alias"
            },
            {
                "count": 1,
                "type_name": "Lom User"
            },
            {
                "count": 4,
                "type_name": "MAC Address Filter"
            },
            {
                "count": 5,
                "type_name": "Member Admin Email"
            },
            {
                "count": 1,
                "type_name": "Member Anycast Address"
            },
            {
                "count": 1,
                "type_name": "Member Anycast BGP Autonomous System Number"
            },
            {
                "count": 5,
                "type_name": "Member DHCP Properties"
            },
            {
                "count": 2,
                "type_name": "Member DNS Forwarder"
            },
            {
                "count": 5,
                "type_name": "Member DNS Properties"
            },
            {
                "count": 5,
                "type_name": "Member DNS Resolvers"
            },
            {
                "count": 5,
                "type_name": "Member Monitoring Properties"
            },
            {
                "count": 1,
                "type_name": "Member SNMP Trap Receiver"
            },
            {
                "count": 5,
                "type_name": "Member Security Properties"
            },
            {
                "count": 2,
                "type_name": "Member Sync Pending Jobs"
            },
            {
                "count": 5,
                "type_name": "Member Syslog Server"
            },
            {
                "count": 5,
                "type_name": "Member TFTP Properties"
            },
            {
                "count": 5,
                "type_name": "Member Time Properties"
            },
            {
                "count": 8,
                "type_name": "Member View"
            },
            {
                "count": 14,
                "type_name": "Member View NAT Record"
            },
            {
                "count": 2,
                "type_name": "NS Group External Primary"
            },
            {
                "count": 1,
                "type_name": "NS Group External Secondary Server"
            },
            {
                "count": 3,
                "type_name": "NS Group Grid Primary Server"
            },
            {
                "count": 5,
                "type_name": "NS Group Secondary Server"
            },
            {
                "count": 19,
                "type_name": "NS Record"
            },
            {
                "count": 5,
                "type_name": "NSEC3 Record"
            },
            {
                "count": 1,
                "type_name": "NSEC3PARAM Record"
            },
            {
                "count": 16,
                "type_name": "Network"
            },
            {
                "count": 2,
                "type_name": "Network Container"
            },
            {
                "count": 1,
                "type_name": "Network Template"
            },
            {
                "count": 2,
                "type_name": "Network View"
            },
            {
                "count": 20,
                "type_name": "PTR Record/Substitute (PTR Record) Rule"
            },
            {
                "count": 62,
                "type_name": "RRSIG Record"
            },
            {
                "count": 11,
                "type_name": "Recycle Bin"
            },
            {
                "count": 1,
                "type_name": "Roaming Host"
            },
            {
                "count": 11,
                "type_name": "Role"
            },
            {
                "count": 4,
                "type_name": "Router"
            },
            {
                "count": 1,
                "type_name": "Ruleset"
            },
            {
                "count": 4,
                "type_name": "Shared Record Group"
            },
            {
                "count": 5,
                "type_name": "TXT Record/Substitute (TXT Record) Rule"
            },
            {
                "count": 5260,
                "type_name": "Threat Protection Rule"
            },
            {
                "count": 74,
                "type_name": "Threat Protection Rule Category"
            },
            {
                "count": 5880,
                "type_name": "Threat Protection Rule Parameter Definitions"
            },
            {
                "count": 5776,
                "type_name": "Threat Protection Rule Parameters"
            },
            {
                "count": 36,
                "type_name": "Threat Protection Rule Template"
            },
            {
                "count": 2,
                "type_name": "Threat Protection Ruleset"
            },
            {
                "count": 3,
                "type_name": "Upgrade Group"
            },
            {
                "count": 3,
                "type_name": "View"
            },
            {
                "count": 28,
                "type_name": "Zone"
            },
            {
                "count": 2,
                "type_name": "Zone External Secondary Server"
            },
            {
                "count": 1,
                "type_name": "Zone Forwarder"
            },
            {
                "count": 24,
                "type_name": "Zone SOA"
            },
            {
                "count": 1,
                "type_name": "Zone Secondary Server"
            },
            {
                "count": 3750,
                "type_name": "Other"
            }
        ],
        "percent_used": 21,
        "role": "Grid Master",
        "total_objects": 23127
    }
]

 

 

Re: Export Show Capacity

Techie
Posts: 7
2705     0

I do not know how I can only print these fields:

 

                 count": 4391,
                "type_name": "Bind_ns"
                "count": 2105,
                "type_name": "Zone"
                "count": 4579,
                "type_name": "Zone Delegated Server"

 

 

Tnaks very much

Showing results for 
Search instead for 
Did you mean: 

Recommended for You