Lars Åges tanker

Politikk og teknologi

Nagios plugin for DNS roundrobin checks

| 0 kommentarer

We use DNS roundrobin to give students access to diffrent Windows terminal servers. One of the people in my department wrote a perlscript to check which servers are currently in production by checking what servers has a A-record in «tscluster.ped.local». I’ve rewritten parts of this small script to be able to use it as a Nagios plugin. No more problems with nobody actually fixing problems with servers after they have been taken out of production because of testing, reinstallation or errors.

check_dnscluster — download

These are the nagios configuration defintions I use:

define service {
use            generic-service
hostgroups        skole-windows-terminalserver-group
check_command        check_dnscluster!tscluster.ped.local!10.5.48.44
service_description    Skole-WTS innmeldt i cluster
servicegroups           skole-tscluster-servicegroup
check_interval        30
}

define command {
#./check_dnscluster.pl -s 10.5.48.44 -A tscluster.ped.local -H 10.5.49.32
command_name        check_dnscluster
command_line        $USER1$/check_dnscluster.pl -H $HOSTADDRESS$ -A $ARG1$ -s $ARG2$
}

define servicegroup
servicegroup_name    skole-tscluster-servicegroup
alias            Alle servere i tscluster
}

Legg igjen en kommentar

Påkrevde felter er merket *.