First commit for check_dns_replication
This commit is contained in:
87
README.md
87
README.md
@@ -12,12 +12,14 @@ encounter any issues or require changes.
|
||||
The latest versions, documentation and bugtracker available on my
|
||||
[GitLab instance](https://gitlab.lindenaar.net/scripts/nagios-plugins)
|
||||
|
||||
Copyright (c) 2015 - 2019 Frederik Lindenaar. free for distribution under
|
||||
Copyright (c) 2015 - 2021 Frederik Lindenaar. free for distribution under
|
||||
the GNU General Public License, see [below](#license)
|
||||
|
||||
contents
|
||||
========
|
||||
This repository contains the following scripts:
|
||||
* [check_dns_replication](#check_dns_replication)
|
||||
check DNS zone replication by comparing zone serial numbers on DNS servers
|
||||
* [check_memory](#check_memory)
|
||||
patched version of nagios-plugins check_memory script for Linux procps v3.3+
|
||||
* [check_multiple_host_addresses](#host_addresses)
|
||||
@@ -30,6 +32,66 @@ This repository contains the following scripts:
|
||||
* [nagiosstatus](#nagiosstatus)
|
||||
CGI-BIN script to report the status of nagios (to monitor nagios itself)
|
||||
|
||||
|
||||
<a name=check_dns_replication>plugins/check_dns_replication</a>
|
||||
---------------------------------------------------------------
|
||||
With this check plugin / script, Nagios can monitor the replication of DNS zones
|
||||
between the authoritative DNS server for a domain and one or more of it's slave
|
||||
(or secondary) DNS servers. The script can check one or multiple DNS zones and
|
||||
can be pointed at one ore more specific DNS slave server(s) or us the NS records
|
||||
of the zone to check all DNS servers of that domain (or a combination of this)
|
||||
|
||||
The script expects a (comma separated list of) DNS zone(s) to validate as its
|
||||
first command line parameter. It optionally also accepts one or more DNS servers
|
||||
to check as further parameters (either separate parameters or comma separated).
|
||||
If no DNS Servers are provided or the `-n` command line option is passed it will
|
||||
lookup the DNS Servers from the NS records in de DNS zone.
|
||||
|
||||
The script will first fetch the authoritative DNS server from the SOA record, so
|
||||
that server must be reachable. This first lookup will be done against the first
|
||||
DNS server, if provided, or the default nameserver of the host. Next it will
|
||||
fetch the DNS zone's SOA record from each server and compare it with the master.
|
||||
|
||||
Installation is straightforward, after installing the script on your server, add
|
||||
the following to your `commands.cmd` configuration file to make it available:
|
||||
|
||||
~~~
|
||||
# 'check-dns-replication' command definition to check DNS replication of one or more zones
|
||||
define command {
|
||||
command_name check-dns-replication
|
||||
command_line [install_path]/plugins/check_dns_replication -n '$ARG1$' '$HOSTADDRESS$'
|
||||
}
|
||||
|
||||
# 'check-dns-slave' command to check DNS replication of one or more zones against a single server
|
||||
define command {
|
||||
command_name check-dns-slave
|
||||
command_line [install_path]/plugins/check_dns_replication '$ARG1$' '$HOSTADDRESS$'
|
||||
}
|
||||
~~~
|
||||
|
||||
The example below shows how to check DNS zone replication for the primary DNS
|
||||
server (which checks replication to all secondaries) and how to check an extra
|
||||
secondary DNS server that is not listed as NS record in the zone.
|
||||
|
||||
~~~
|
||||
# check DNS replication for an DNS zone to ensure all secondaries are in sync
|
||||
define service {
|
||||
host auth.dns.mydomain.tld
|
||||
service_description DNS Zone Replication
|
||||
check_command check-dns-replication!mydomain.tld
|
||||
use generic-service
|
||||
}
|
||||
|
||||
# check DNS replication to a specific secondary DNS server
|
||||
define service {
|
||||
host sec1.dns.mydomain.tld
|
||||
service_description DNS Zone Replication to secondary
|
||||
check_command check-dns-slave!mydomain.tld
|
||||
use generic-service
|
||||
}
|
||||
~~~
|
||||
|
||||
|
||||
<a name=check_memory>plugins/check_memory</a>
|
||||
---------------------------------------------
|
||||
Nagios check script to monitor the memory on Linux systems. Due to changes in
|
||||
@@ -54,23 +116,23 @@ Installation is straightforward, after installing the script on your server, add
|
||||
the following to your `commands.cmd` configuration file to make it available:
|
||||
|
||||
~~~
|
||||
# 'check-host-alive' command definition for multi-homed/dual-stack servers
|
||||
define command{
|
||||
command_name check-addresses-alive
|
||||
command_line [install_path]/plugins/check_multiplehost_addresses '$HOSTADDRESS$' '$_HOSTADDRESS6$'
|
||||
}
|
||||
# 'check-host-alive' command definition for multi-homed/dual-stack servers
|
||||
define command {
|
||||
command_name check-addresses-alive
|
||||
command_line [install_path]/plugins/check_multiplehost_addresses '$HOSTADDRESS$' '$_HOSTADDRESS6$'
|
||||
}
|
||||
~~~
|
||||
|
||||
The example above assumes that the IPv6 address of the host is provided as part
|
||||
of the host configuration, i.e.:
|
||||
|
||||
~~~
|
||||
define host {
|
||||
...
|
||||
address 192.168.0.1
|
||||
_address6 fdf8:f340:ab9d:c213::1
|
||||
...
|
||||
}
|
||||
define host {
|
||||
...
|
||||
address 192.168.0.1
|
||||
_address6 fdf8:f340:ab9d:c213::1
|
||||
...
|
||||
}
|
||||
~~~
|
||||
|
||||
To use the script either add `check_command check-addresses-alive`
|
||||
@@ -431,4 +493,3 @@ General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, download it from <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user