Dns vs $hostaddress$


#1

Hello all!
I have one problem.
In hosts.cfg i wrote:

host_name 1007_2b

address 172.16.97.3

check_command check-host-alive

and nagios must check this host.But, i see, that nagios ask my dns-server who is 172.16.97.3.mydomain.ru.
In nagios-manual i’m find information, that nagios use address field.If address is not define, then nagios ask my dns, who is hostname.mydomain.ru. Why nagios asked my dns, if i have defined address field ???


#2

Run the command by hand as user nagios and paste the output.
cd /usr/local/nagios/libexec
./whatever you have defined for “check-host-alive” and all the appropriate options that you have defined for check-host-alive.


#3
  1. su nagios
  2. less commands.cfg

‘check-host-alive’ command definition

define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 500.0,80% -c 1000.0,100% -p 1
}

3. ./check_ping -H 172.16.97.3 -w 500.0,80% -c 1000.0,100% -p 1
On screen i see:

$ ./check_ping -H 172.16.97.3 -w 500.0,80% -c 1000.0,100% -p 1
PING OK - Packet loss = 0%, RTA = 10.82 ms


#4

How did you find out that nagios was talking to the DNS? Etherpeek/Wireshark?


#5

I’m setup tcpdump om my network interface:

tcpdump -i em0 |grep my dns


#6

Please, can somebody help me with my problem ?? My question is actual.