Question about host_name and address

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

Question about host_name and address

Post 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
       }

tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Question about host_name and address

Post 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.
Former Nagios employee
Locked