Writing this article in the hope that it is useful to someone looking through google for the answer.
i installed gcc from sunfreeware.org. When you do this, you must also install perl from sunfreeware.org from sunfreeware to buiild cpan modules. Pur /usr/local/bin in your path before /usr/bin, or remove the vendor version of perl by pkgrm’ing the perl packages in /var/sadm/pkg
Trying to install HTML::Parser, I still suffered from lots of breakage :
/usr/include/sys/siginfo.h:259: error: parse error before “ctid_t”
/usr/include/sys/siginfo.h:292: error: parse error before ‘}’ token
/usr/include/sys/siginfo.h:292: error: ISO C forbids data definition with no type or storage class
/usr/include/sys/siginfo.h:261: error: previous declaration of `__proc’
/usr/include/sys/siginfo.h:398: error: conflicting types for `__fault’
/usr/include/sys/siginfo.h:267: error: previous declaration of `__fault’
[...]
There isn’t much information about fixing this. You need to replace the vendor headers with those from gcc :
cd /usr/local/lib/gcc-lib/sparc-sun-solaris2.10/3.3.2/install-tools
./mkheaders
Then it works.
At a recent UKNOF meeting, Nominet spoke of a test that they had written to ensure that all of the .uk domain name servers were savng the same ‘version’ of the UK zone file.
Such a script would solve the SOA-drift problem that we have at work. We often find that dns zone change notifications do not get picked up when notifies are sent from the Unix to Windows dns architecture (which the Active Directory guys need us to do).
I have implemented my own version of this simple test for Nagios, written in Perl, and release it to the community in the hope that is us useful.
The script can be downloaded from http://www.andyd.net/media/check-dns-soamatch.pl.txt
The script needs to know which domain name is being monitored, and where you consider the ‘master’ dns server to be. The script then asks the master which other nameservers are specified in the zone with NS resource records, and then compares the SOA serial number of all specified nameservers, treating the serial offered by the master as ‘correct’.
The nagios check should be run as :
perl check-dns-soamatch.pl -q [master dns server] -n [domain name]
If you run the script from the command line, you can see what is going on by adding the -d command line option (debug).
When running in debug mode, if everything works you will see this :
$ perl check-dns-soamatch.pl -d -q 10.0.1.4 -n big-shop.com
Nameserver to query: ns0.hd.big-shop.com
Nameserver to query: ns1.hd.big-shop.com
Master serial number from 10.0.1.4 is 2006060604
Checking server … ns0.hd.big-shop.com
Serial number from ns0.hd.big-shop.com is 2006060604
Checking server … ns1.hd.big-shop.com
Serial number from ns1.hd.big-shop.com is 2006060604
Everything OK testing domain big-shop.com
If SOA drift has occured you will see this :
Nameserver to query: piggie.hd.big-shop.com
Nameserver to query: deliverance.hd.big-shop.com
Master serial number from 10.0.1.4 is 2006060610
Checking server … piggie.hd.big-shop.com
Serial number from piggie.hd.big-shop.com is 2006060609
Checking server … deliverance.hd.big-shop.com
Serial number from deliverance.hd.big-shop.com is 2006060703
piggie.hd.big-shop.com serves Serial 2006060609 not 2006060610 deliverance.hd.big-shop.com serves Serial 2006060703 not 2006060610 (2 errors).
The ‘stain’ options in the script can be ignored unless you are also running my http-post interface into Nagios (which is not formally released … but the code is on sourceforge).
Improvement suggestions welcome !