Page 1 of 1

Question about host_name and address

Posted: Fri Jan 09, 2015 3:07 pm
by nagmoto
Hi
I had a NRPE configure issue on Nagios core 3.5.1/centos 6 and in the end found out it was due to address "10.65.184.208" was wrong.

Is there a logfile somewhere I can check ip was in correct ?
for check_nrpe looks like It was using ip address even I specify the hostname in service declaration.

Code: Select all

define host{
        use linux-server
        host_name              dbtest01.test.com
        alias                  dbtest01.test.com
        address                10.65.184.208
        hostgroups             db,test
        max_check_attempts     15
        check_period           24x7
        notification_interval  30
        notification_period    24x7
        }
       define service{
        use generic-service
        host_name dbtest01.test.com
        service_description check_load
        check_command check_nrpe!check_load -a 15,10,5 30,25,20
       }


Re: Question about host_name and address

Posted: Fri Jan 09, 2015 3:13 pm
by tmcdonald
The host_name field in the service declaration is not the same as a "hostname" or an address. It simply tells the service which host to use. It will then get the address from that host. so if you do not want to use an IP you would put "dbtest01.test.com" or whatever the DNS name is.