add dns checks

This commit is contained in:
Kameron Kenny - pi501 2025-02-19 14:32:21 -05:00
parent 35ef1c8322
commit b63f7ec336
3 changed files with 42 additions and 3 deletions

View File

@ -12,7 +12,7 @@ services:
build:
dockerfile: Dockerfile
container_name: nagios
image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:250219.0.02
image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:250219.1.01
networks:
infra_dev_net:
ipv4_address: 10.99.23.36

View File

@ -230,6 +230,10 @@ define command {
command_line $USER1$/check_dns -H $HOSTNAME$ -q A -a $HOSTADDRESS$ -w 2 -c 5 -t 7
}
define command {
command_name check_local_dns_a_record
command_line $USER1$/check_dns -H $ARG1$ -q A -s $HOSTNAME$ -w 2 -c 5 -t 7
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -2 -H $HOSTADDRESS$ -c $ARG1$

View File

@ -1,7 +1,42 @@
### Service definitions for all web hosts
### Service definitions for all nameserver hosts
define service{
use generic-service,graphed-service
hostgroup_name network-devices
hostgroup_name nameservers
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
define service{
use generic-service,graphed-service
hostgroup_name nameservers
service_description DNS: google.com
check_command check_dns_a_record!google.com
}
define service{
use generic-service,graphed-service
hostgroup_name nameservers
service_description DNS: pi501.in.thelinuxpro.net
check_command check_dns_a_record!pi501.in.thelinuxpro.net
}
define service{
use generic-service,graphed-service
hostgroup_name nameservers
service_description DNS: pi502.in.thelinuxpro.net
check_command check_dns_a_record!pi502.in.thelinuxpro.net
}
define service{
use generic-service,graphed-service
hostgroup_name nameservers
service_description DNS: pi503.in.thelinuxpro.net
check_command check_dns_a_record!pi503.in.thelinuxpro.net
}
define service{
use generic-service,graphed-service
hostgroup_name nameservers
service_description DNS: pi504.in.thelinuxpro.net
check_command check_dns_a_record!pi504.in.thelinuxpro.net
}