All pastes #2104529 Raw Edit

Someone

public text v1 · immutable
#2104529 ·published 2012-01-20 15:33 UTC
rendered paste body
# Check command
define command{
        command_name    check_dns_with_args
        command_line    /usr/lib/nagios/plugins/check_dns '$ARG1$'
}

# Check maximus points to 10.0.0.3
define service{
        use generic-service
        host_name localhost
        service_description Maximus DNS Entry
        check_command check_dns_with_args!-H maximus -s 10.0.0.15 -a 10.0.0.3
        servicegroups dns-checks
}


# Check source points to 10.0.0.9
define service{
        use generic-service
        host_name localhost
        service_description Source DNS Entry
        check_command check_dns_with_args!-H source -s 10.0.0.15 -a 10.0.0.9
        servicegroups dns-checks
}


# In shell
nagios@fs02:/etc/nagios3/conf.d/hosts$ /usr/lib/nagios/plugins/check_dns -H maximus -s 10.0.0.15 -a 10.0.0.3
DNS OK: 0.005 seconds response time. maximus returns 10.0.0.3|time=0.005232s;;;0.000000
nagios@fs02:/etc/nagios3/conf.d/hosts$

# In web interface
	
maximus DNS Entry
CRITICAL	2012-01-20 10:28:06	 0d 0h 6m 22s	4/4	CRITICAL - Plugin timed out while executing system call