IP and hostname mapping control

Paul Weaver paul.weaver at bbc.co.uk
Tue Jun 29 13:05:23 CEST 2010


We have a service that checks dns addresses. We run it against some of our internal DNS servers (we're checking the DNS server is resolving, so the check belongs on the dns server rather than the host you're interested in).
 
define service{
        use                             infrastructure-dns-service
        host_name                       dc1025,dc1026,dc1030
        service_description             DNS-myserver
        check_command                   check_dns!myserver.com!4.5.6.7
        }

define command{
        command_name    check_dns
        command_line    $USER1$/check_dns -H $ARG1$ -s $HOSTADDRESS$ -a $ARG2$
        }

(I believe check_dns is a standard plugin)

So you'd have:
	define service {
	    use            local-service
	    host_name      local.dns.server
	    service_description   DNS resolving foo.mylan.com
	    check_command  check_dns!foo.mylan.com!192.168.0.1
	}

--

The probability of someone watching you is proportional to the stupidity of your action.

Paul Weaver    
Systems Development Engineer
BBC FM&T BETG TDD SDT 


________________________________

	From: Network Operation Center FMC Luxemburg [mailto:NOC at eurofmc.com] 
	Sent: 29 June 2010 06:40
	To: Nagios Users List
	Subject: [Nagios-users] IP and hostname mapping control
	
	
	Hi everybody,
	
	I'm looking for a way to check out the mapping between a hostname and IP address.
	
	Example: IP 192.168.0.1 exists and if the hostname foo.mylan.com is not associated with this IP, I would have an alarm.
	
	Indeed the script below returns no alarm :
	
	define host {
	    use             unix-server
	    host_name       foo.mylan.com  
	    display_name    foo
	    address         192.168.0.1
	    check_command   check_http
	}
	
	define service {
	    use            local-service
	    host_name      foo.mylan.com
	    service_description   HTTP local
	    check_command  check_http
	}
	
	Any idea?
	
	Thanks a lot
	
	François
	
	-- 
	Network Operation Center
	        LUXEMBURG 


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list