Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Enable the feature, as described in Enabling Object Change Tracking.
  2. Select whether you want to use a full synchronization or an incremental synchronization. When you use one of these synchronization methods to synchronize data through Infoblox API or RESTful API, they return updated objects that can be used to update your relational database. For full synchronization, see Using Full Synchronization3. For incremental synchronization, see Using Incremental Synchronization on page 1426.

...

  1. .

...

Anchor
Best Practices for Object Change Trackin
Best Practices for Object Change Trackin
Anchor
bookmark2838
bookmark2838
Best Practices for Object Change Tracking

  • The Object Change Tracking feature is optimized to reduce impact on the DDI services and it runs only on the Grid Master. The synchronization process synchronizes 1000 objects at a time with a 2 second pause in between. There might be a slight impact on the Grid Master Candidate as they get updates from the Grid Master. When protocol services are running on the Grid Master Candidate you might encounter a 5% drop in the protocol performance. This feature does not impact the services that are running on the Grid members.
  • NIOS does not update the sequence ID of the respective parent when you modify a child object. For example, inserting an A record under DNS zone does not increase the sequence number of the zone object.
  • When you delete a parent object, NIOS saves the child objects in the deleted object table. But, if the associated child objects are either resource records or leases, NIOS will neither save them in the deleted object table nor update the sequence ID for these child objects.
  • If you update a parent object, then the sequence ID of its child objects will not change.
  • NIOS updates the sequence ID of the host record and IPv4 and IPv6 host addresses, if there are any changes to host addresses, both IPv4 and IPv6. The sequence ID is also updated when you update the host alias records that results in increase in the sequence ID of the host record and all its child objects.




Wiki Markup
For example, if you create a host record hhh.test.com with an IPv4 address and perform an incremental synchronization to get updates, the response contains an updated host record and host address:
curl -k1 -u admin:infoblox -H content-type:application/json -X GET https://10.32.2.202/wapi/v2.5/db_objects?start_sequence_id=2830689052:0\&object_types= record:host,record:host_ipv4addr\;_return_fields=last_sequence_id,object,object_type\;
_return_type=json-pretty
The response is as follows:
\[
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDIw:38", "object": \{
"_ref": "record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS5rYXJqYWdpLmhvc3Qx:
hhh.test.com/default",
"ipv4addrs": \[
\{
"_ref": "record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLmthcmphZ2kuaG9zdDEuMS4x LjEuMS4:1.1.1.1/ hhh.test.com/default",
"configure_for_dhcp": false, "host": " hhh.test.com",
"ipv4addr": "1.1.1.1",
"mac": "11:11:11:11:11:11"
\}
\],
"ipv6addrs": \[
\{
"_ref": "record:host_ipv6addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLmthcmphZ2kuaG9zdDEuYWE6 OmFhLg:aa%3A%3Aaa/ hhh.test.com/default",
"configure_for_dhcp": false, "host": " hhh.test.com",
"ipv6addr": "aa::aa"
\}
\\
\\
!worddav82aac1426f41e4bf41b080762501fdd1.png|height=20,width=11!
NIOS 8.1NIOS Administrator Guide (Rev. A) 1419
Monitoring the Appliance
\\
\\
\],
"name": " hhh.test.com", "view": "default"
\},
"object_type": "record:host",
"unique_id": "c326fcf8058c4022939050af96a0fdb2"
\},
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDIx:38", "object": \{
"_ref":
"record:host_ipv6addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLmthcmphZ2kuaG9zdDEuYWE6 OmFhLg:aa%3A%3Aaa/ hhh.test.com/default",
"configure_for_dhcp": false, "host": " hhh.test.com",
"ipv6addr": "aa::aa"
\},
"object_type": "record:host_ipv6addr", "unique_id": "2b19a399c3f747538d879fdd33a4de32"
\},
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDIy:38", "object": \{
"_ref":
"record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLmthcmphZ2kuaG9zdDEuMS4x LjEuMS4:1.1.1.1/ hhh.test.com/default",
"configure_for_dhcp": false, "host": " hhh.test.com",
"ipv4addr": "1.1.1.1",
"mac": "11:11:11:11:11:11"
\},
"object_type": "record:host_ipv4addr", "unique_id": "3fb8fba003d647ceac5796a28459725a"
\},
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDIz:3956302770%3A38", "last_sequence_id": "3956302770:38"
\}
\]




  • When you update DNS host, host address, and host alias, NIOS updates the sequence IDs of child objects associated with these parent objects even though the changes do not affect the child objects. For example, when you update an existing comment in the host record, NIOS updates the sequence IDs of child objects associated with the respective host record.




Wiki Markup
Example:
\\
\\
\\
\\
\\
!worddav82aac1426f41e4bf41b080762501fdd1.png|height=20,width=11!
1420NIOS Administrator Guide (Rev. A)NIOS 8.1
Tracking Object Changes in the Database
\\
\\
curl -k1 -u admin:infoblox -H content-type:application/json -X GET https://10.32.2.202/wapi/v2.5/db_objects?start_sequence_id=2830689052:0\&object_types= record:host,record:host_ipv4addr\;_return_fields=last_sequence_id,object,object_type,o bject.comment\;_return_type=json-pretty
The response is as follows:
\[
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDI:27", "object": \{
"_ref":
"record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS50ZXN0LmhoaA:hhh.test.com/default", "comment": "hi"
\},
"object_type": "record:host"
"unique_id": "1ab6c989d8fd454ca06ffac6ac600fe6"
\},
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDM:27", "object": \{
"_ref":
"record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLnRlc3QuaGhoLjEuMC4wLjEu
:1.0.0.1/hhh.test.com/default",
"configure_for_dhcp": false, "host": "hhh.test.com",
"ipv4addr": "1.0.0.1"
\},
"object_type": "record:host_ipv4addr" "unique_id": "1ab6c989d8fd454ca06ffac6ac600fe7"
\},
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDQ:2830689052%3A27", "last_sequence_id": "2830689052:27"
\}




  • When an IPv4 or an IPv6 host address changes, NIOS deletes the old record and creates a new record with the updated IP address. Note that new sequence IDs are generated for the associated objects. When you query a host record, NIOS displays the list of host addresses associated with it.




Wiki Markup
Example:
curl -k1 -u admin:infoblox -H content-type:application/json -X GET https://10.32.2.202/wapi/v2.5/db_objects?start_sequence_id=2830689052:0\&object_types= record:host,record:host_ipv4addr\;_return_fields=last_sequence_id,object,object_type\;
_return_type=json-pretty
The response is as follows:
\[
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDA:28", "object": \{
"_ref":
"record:host/ZG5zLmhvc3QkLl9kZWZhdWx0LmNvbS50ZXN0LmhoaA:hhh.test.com/default",
\\
\\
!worddav82aac1426f41e4bf41b080762501fdd1.png|height=20,width=11!
NIOS 8.1NIOS Administrator Guide (Rev. A) 1421
Monitoring the Appliance
\\
\\
"ipv4addrs": \[
\{
"_ref": "record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLnRlc3QuaGhoLjEuMC4wLjIu
:1.0.0.2/hhh.test.com/default",
"configure_for_dhcp": false, "host": "hhh.test.com",
"ipv4addr": "1.0.0.2"
\}
\],
"name": "hhh.test.com", "view": "default"
\},
"object_type": "record:host"
"unique_id": "1ab6c989d8fd454ca06ffac6ac600fe6"
\},
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDE:28", "object": \{
"_ref": "deleted_objects/Li5kZWxldGVkX29iamVjdHMkMA", "object_type": "record:host_ipv4addr",
"unique_id": "68cad3406a244aa0b34b3ea3be383598"
\},
"object_type": "deleted_objects"
"unique_id": "1ab6c989d8fd454ca06ffac6ac600fe4"
\},
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDI:28", "object": \{
"_ref":
"record:host_ipv4addr/ZG5zLmhvc3RfYWRkcmVzcyQuX2RlZmF1bHQuY29tLnRlc3QuaGhoLjEuMC4wLjIu
:1.0.0.2/hhh.test.com/default",
"configure_for_dhcp": false, "host": "hhh.test.com",
"ipv4addr": "1.0.0.2"
\},
"object_type": "record:host_ipv4addr" "unique_id": "1ab6c989d8fd454ca06ffac6ac600fe9"
\},
\{
"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDM:2830689052%3A28", "last_sequence_id": "2830689052:28"
\}




  • NIOS returns the shared records per zone when you query for them. For example, consider two zones, z1 and z2, and a shared record group, srg1, which contains a shared record sr1. The shared record group srg1 is associated with the zones z1 and z2. Hence, the shared record sr1 is shared between two zones, z1 and z2, but NIOS saves only a single copy of the shared record sr1 in the database. When you query for shared record


Image Modified
1422NIOS Administrator Guide (Rev. A)NIOS 8.1
Tracking Object Changes in the Database

updates, NIOS returns two records for z1 and z2, as sr1 is associated with both the zones, z1 and z2, and saves these records with a UUID and a sequence ID in the table. The response also contains new records with zone pointing to the zone it belongs to, UUID and sequence ID of the new records and a shared_record_group, which indicates that it is a shared record and not a normal resource record. When you enable Object Change Tracking feature, NIOS clears this table and recreates a new table for the existing shared records.

...



Note: This operation might take a longer time to complete when you have a large database. For example, 1 million objects on an IB-4010 appliance takes approximately 1 hour. Infoblox recommends that you enable this feature during off-peak hours.

    • Maximum time to track deleted objects: Specify the maximum time period to retain change tracking information in the database. You can select days or hours. The default value is four hours and the maximum value is seven days. The object change tracking information that is older than this time period is removed periodically.
    • Maximum number of deleted objects that will be tracked: Specify the total number of deleted objects that must be present in the database. The minimum value is 2,000 and the maximum value is 20,000. The default value is 4,000.

...

  • When _output_location = "FILE_DISTRIBUTION"





Image Modified
NIOS 8.1NIOS Administrator Guide (Rev. A) 1423
Monitoring the Appliance

When you set the output location as mentioned above, you must specify a file name or a prefix for the file. NIOS saves the output file in the file distribution area and displays an error message if you do not specify a file name or a prefix. For more information about file distribution area, see Managing Directories .
When you select the above output location for a Grid Master Candidate, you must select Allow Upload to Grid Members to upload files to the file distribution area. Infoblox recommends that you use the Grid Master Candidate to offload the Grid Master. You must enable a full synchronization during off-peak hours if protocol services are running on the Grid Master Candidate. For more information, see Enabling Upload to Grid Members .
Example:
curl -k1 -u admin:infoblox -X POST 'https://..../wapi/v2.5/fileop?_function=read' -H 'Content-Type: application/json; charset=UTF-8' -d '{"_filename": "test.json", "_output_location":"FILE_DISTRIBUTION","_object": "db_objects", "all_object_types_supported_in_version": "2.5","_encoding": "ROWJSON"}'
You can specify either _object = db_objects or all_object_types_supported_in_version=2.5 to retrieve all objects. When you specify _object = db_objects, NIOS returns only standard Restful API fields as response. To retrieve all fields of all objects, you can specify all_object_types_supported_in_version=2.5. To fetch the output file, start file distribution service and use the following URL:
curl -k1 -u admin:infoblox -X GET http://<ipaddress>/wapi_output/test.json -H 'Content-Type:application/json'

...

  • A full synchronization is required initially for a complete snapshot of the database.
  • Depending on the size of requested data, a full synchronization may take a longer time to complete. For example, when 1 million objects are requested with all fields on an IB-4010 appliance, full synchronization takes a couple of hours. When 1 million objects are requested with standard RESTful API fields on an IB-4010 appliance, full synchronization takes less than an hour.
  • Infoblox recommends that you request only object types with standard RESTful API fields and specify any additional required fields during a full synchronization.
  • To dump full synchronization updates into a file using fileop->read operation when the updated objects are large in number, you can specify _object=db_objects and all the necessary parameters.
  • Infoblox recommends a full synchronization in the following cases:
    • After an upgrade, restore or master promotion, which resets the sequence ID.



Image Modified
1424NIOS Administrator Guide (Rev. A)NIOS 8.1
Tracking Object Changes in the Database

    • During off-peak hours for busy Grids with high rate of change that is greater than 500/sec.
    • When the maximum time or maximum number to track deleted objects is met, with the default being 4 hours and 4000 objects, then synchronization API returns an error if the last deleted sequence ID is newer than the current sequence ID.

...

curl -k1 -u admin:infoblox -X POST 'https://127.0.0.1/wapi/v2.5/fileop?_function=read&_schedinfo.schedule_now=true' -H 'Content-Type: application/json; charset=UTF-8' -d '{"_filename": "test2.txt", "_object": "db_objects", "all_object_types_supported_in_version": "2.5", "_encoding": "JSON"}' scheduledtask/b25lLnF1ZXVlZF90YXNrJDE:1/WAITING_EXECUTION
NIOS returns the scheduled task reference so that you can query and find out when will the scheduled task be complete:

Image Modified
NIOS 8.1NIOS Administrator Guide (Rev. A) 1425
Monitoring the Appliance

curl -k1 -u admin:infoblox -X GET https://127.0.0.1/wapi/v2.5/scheduledtask/b25lLnF1ZXVlZF90YXNrJDE:1/WAITING_EXECUTION The response is as follows:
{ "_ref": "scheduledtask/b25lLnF1ZXVlZF90YXNrJDE:1/COMPLETED", "approval_status": "NONE", "execution_status": "COMPLETED", "task_id": 1 }
Note that the result is in either JSON or XML format. You can fetch the output file from the wapi-output
directory of the file distribution area when the scheduled task is complete.

Anchor
Using Incremental Synchronization
Using Incremental Synchronization
Anchor
bookmark2841
bookmark2841
Using Incremental Synchronization

...

  • You cannot perform a full or an incremental synchronization during Grid Master Candidate promotions, restores, and upgrades.
  • The output of an incremental synchronization is either in JSON or XML format. The following are a few samples of API requests for incremental synchronization:



Image Modified
1426NIOS Administrator Guide (Rev. A)NIOS 8.1
Tracking Object Changes in the Database

  • To get updates with all_objects_supported_in_version=2.5:

...

  • To get an A record and an auth zone object update:




Wiki Markup
curl -k1 -u admin:infoblox -H content-type:application/jason -X GET https://10.32.2.202/wapi/v2.5/db_objects?start_sequence_id=183566281:0\&object_types=r ecord:a,zone_auth\;_return_fields=last_sequence_id,object,object_type,unique_id\;_retu rn_type=json
The response is as follows:
\[\{"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDA:19", "object": \{"_ref": "zone_auth/ZG5zLnpvbmUkLl9kZWZhdWx0LmNvbS5mb28:foo.com/default", "fqdn": "foo.com", "view": "default"\}, "object_type": "zone_auth", "unique_id": "087af628fa03418faa0577b953807efc"\}, \{"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDE:21", "object": \{"_ref": "record:a/ZG5zLmJpbmRfYSQuX2RlZmF1bHQuY29tLmZvbyxhcmVjMSwxLjIuMy4y:arec1.foo.com/defau lt", "ipv4addr": "1.2.3.2", "name": "arec1.foo.com", "view": "default"\}, "object_type": "record:a", "unique_id": "89314c3fae2841f49600e1b686b0c7b7"\},\{"_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDI:183566281%3A21", "last_sequence_id": "183566281:21"\},




  • NIOS returns deleted objects as synthetic deleted objects. To get updates on deleted host objects:




Wiki Markup
curl -s -k1 -u admin:infoblox -H content-type:application/json -X GET https://10.34.19.220/wapi/v2.5/db_objects?start_sequence_id=1207501969:0\&object_types
=record:host,bulkhost,record:host_ipv4addr,record:host_ipv6addr\&exclude_deleted=false
The response is as follows:
\[\{ "_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDM2YQ:130", "object": \{
"_ref": "deleted_objects/Li5kZWxldGVkX29iamVjdHMkMA", "object_type": "record:host_ipv6addr"
\},
"object_type": "deleted_objects",
"unique_id": "f7d87ec4b9204e16a3d14bfb340c402d" \},
\{ "_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDM2Yg:130", "object": \{
"_ref": "deleted_objects/Li5kZWxldGVkX29iamVjdHMkMQ", "object_type": "record:host_ipv4addr" \},
"object_type": "deleted_objects",
"unique_id": "68316853600f41f083e2be134628ce62" \},
\{ "_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDM2Yw:130", "object": \{
"_ref": "deleted_objects/Li5kZWxldGVkX29iamVjdHMkMg", "object_type": "record:host" \},
"object_type": "deleted_objects",
"unique_id": "7a5e0622e9db441caa47c12ca30700d5" \},
\{ "_ref": "db_objects/Li5hbGxfY2hhbmdlZF9vYmplY3RzJDM2ZA:1207501969%3A130", "last_sequence_id": "1207501969:130" \}\]
\\
\\
\\
!worddav82aac1426f41e4bf41b080762501fdd1.png|height=20,width=11!
NIOS 8.1NIOS Administrator Guide (Rev. A) 1427
Monitoring the Appliance
\\
\\




  • To dump incremental synchronization updates into a file using fileop->read operation when the updated objects are large in number, you can specify _object=db_objects and all the necessary parameters for incremental synchronization:

curl -k1 -u admin:infoblox -X POST 'https://10.34.19.100/wapi/v2.5/fileop?_function=read' -H 'Content-Type: application/json; charset=UTF-8' -d '{"_output_location": "LOCAL", "_object": "db_objects", "start_sequence_id" : "1973553522:0","all_object_types_supported_in_version": "2.5", "_max_results": 1000000,"_encoding": "JSON"}'
For more information about supported objects in the Infoblox API and Restful API, refer to the Infoblox API Documentation and the Infoblox WAPI Documentation.
















































Image Modified
1428NIOS Administrator Guide (Rev. A)NIOS 8.1