Reply

Change TTL to inherited with CSV Import

Techie
Posts: 5
6895     0

Is there a value you can put in the TTL field to tell it to go back to "inherited", instead of a numerical value?

Alternately, let's say that I'm in "Data Management", "DNS", "Zones", and the "foo.com" domain. I want to change the TTL for 5 records from 20 minutes to either "inherited" or some other value. If I select more than one entry, then the "edit" icon greys out, so I have to go in and change them all individually, which is a pain. If I want to change an extended attribute of 5 records, I can select 5 different ones, and edit them all at once, or I can just double-click the entry and edit the EA in place rather than having to go through the 5+ clicks just to edit the TTL value on each individual record.

It would be nice if you could just modify the TTL values for multiple records at one time.

Oh, and I just remembered this. It appears that even for a host record, the TTL value for both forward and reverse do not appear to be tied together. This seems kind of strange.

Alan,

Posts: 75
6895     0

Alan,

Did you ever get an answer on this? I just realized I have thousands of zone that I need to change to the TTL settings back to "inherited".  Obviously bulk changes in the GUI will not work, but I am unsure how to do this with the API.

And advice out there would be appreciated. 


Susan

There is probably a more

Expert
Posts: 181
6895     0

There is probably a more elegant way of doing this but this was my solution.   This is a code snip,  I repeat this code for A, CNAME and host records.   It works but there would seem to be a better way.

 

my @retrieved_objs = $session->search(
object => "Infoblox:Smiley Very HappyNS::Record::CNAME",
zone => $DOMAINNAME
);
my $object = $retrieved_objs[0];
unless ($object) {
die("Get record CNAME failed: ",
$session->status_code() . ":" . $session->status_detail());
}
print "Get DNS CNAME object found at least 1 matching entry\n";

foreach my $CNAMEObj (@retrieved_objs) {
    #Modify one of the attributes of the specified CNAME record
    if ($CNAMEObj->ttl) {
        $CNAMEObj->ttl(undef);
        #Apply the changes
        $session->modify($CNAMEObj)
            or die("Modify record CNAME failed: ",
        $session->status_code() . ":" . $session->status_detail());
        print $CNAMEObj -> name(), " modified successfully\n";
    }
}

That would work great for the

Posts: 75
6895     0

That would work great for the individual TTL at the record level. I was looking for a way to change things at the zone level.

Given a zone, it will pull

Expert
Posts: 181
6895     0

Given a zone, it will pull all the records in the zone and update any record of the given type that has a TTL value besides inherit and change it to inherit.

 

I have not found a way to manage TTL settings on a zone in bulk. (ie single check box that updates hundreds of records)   This perl script runs through a 30,000 record zone in ~10 minutes on our 2000-A.   We wrote to run on zones after imports from other hardware.  But now we run it every few months just to clean up some zones that we do a lot of manual TTL changes in.

When we managed the zones on bind and could grep the zone files it was easy to find records with TTL’s.  When we shorted TTL's as part of a migration, we would set the TTL to 299, or something easy to grep for.   We started doing this in infoblox but found that when we would search for 299 in the GUI, it would still find records that we had set to 299 at one time but the record was now set back to inherit.  The overridden TTL value still lingers as part of the DNS record in the back end database.  This is the only way we have found to clear the ‘leftover’ value for the TTL and set it back to inherit. 

Working with support

Techie
Posts: 4
6895     0

Thanks Dave. It appears there is an updated plugin I can use in vco to test the cnames. Going to download and try once I'm back in the office .

The other option we use for

Expert
Posts: 181
6895     0

The other option we use for mass changes is ibcli   http://ibcli.blogspot.com/

The short description is it is an "executable" you can throw command line options at to make changes in Infoblox.

This is basically the piece that is lacking from infoblox.   They have a GUI for individual record changes.   They have API's for repetitive changes you need to script but really nothing for the one off mass changes.  This is what we use ibcli for.  I'm not sure it has an exact fit for what you are looking for but it may.   The admins doing day to day work in our grid simply have an excel spread sheet open with the ibcli commands in for their common tasks;

conf zone "" add CNAME

conf zone "" add host

conf zone "" add ptr

conf network add fixed

conf network add

configure zone add 10.10.10.in-addr delegate_to

All of these can be easily manipulated in excel with cut and paste to add or edit hundreds of records that can then just be pasted into the command line and updated.   The amount of time this has saved us vs the GUI is amazing.  The create delegated reverse zones is something we do quite often and takes minutes per zones in the GUI, it takes seconds with ibcli.

The person (NOT INFOBLOX) that created and was updating ibcli has moved on to another project but the app still remains current.  It is a well-documented Perl script that can be updated by anyone familiar with Perl.  We have not yet tested the new stripped down GUI version that is available on the same web site but it does look interesting.

Showing results for 
Search instead for 
Did you mean: 

Recommended for You