No data was received from host!

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
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

No data was received from host!

Post by ofadl »

Hello everyone,

I downloaded a NSClient++ for one of my servers and its on the nagios website, but i am getting a "no data was received from host error". Does anyone know how to fix this? thanks in advance
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: No data was received from host!

Post by gshergill »

Hi ofadl,

Can you post the services.cfg and commands.cfg for the windows host being monitored?

Thank you.

Kind Regards,

Gary Shergill
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: No data was received from host!

Post by ofadl »

the host is called VNADAT641

here is the host, and service definition

define host{
use generic-host ; Name of host template t$
host_name vnadat641
alias VNA Eq DB Warehouse
address 10.200.50.202
}



#######SERVICE DEFINITIONS#########

define service{

use generic-service

host_name VNAADM648,vnaidx122,vnadat641

service_description NSClient++ Version

check_command check_nt!CLIENTVERSION

}


and here is my commands file


###############################################################################
# COMMANDS.CFG - SAMPLE COMMAND DEFINITIONS FOR NAGIOS
###############################################################################


################################################################################
# NOTIFICATION COMMANDS
################################################################################


# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/bin/mail $
}

# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditi$
}




################################################################################
# HOST CHECK COMMANDS
################################################################################

# On Debian, check-host-alive is being defined from within the
# nagios-plugins-basic package

################################################################################
# PERFORMANCE DATA COMMANDS
################################################################################


# 'process-host-perfdata' command definition
define command{
command_name process-host-perfdata
command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/lib/nagios3/host-perfdata.out
}


# 'process-service-perfdata' command definition
define command{
command_name process-service-perfdata
command_line /usr/bin/printf "%b" "$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICESTATE$\t$SERVICEATTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /var/l$
}

# 'check_equinox_http' command definition
define command{
command_name check_equinox_http
command_line $USER1$/is_url_alive "http://$HOSTADDRESS$$ARG1$" "$ARG2$" "$ARG3$" "$ARG4$"
}


thanks
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: No data was received from host!

Post by slansing »

It does not look like you have the "check_nt" command defined in your commands.cfg file, you will need to define the command to use it. I'd recommend going through the following guide on setting this up:

http://nagios.sourceforge.net/docs/3_0/ ... ndows.html
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: No data was received from host!

Post by ofadl »

im getting a duplicate definition error when i tried adding that to the commands file like so

Warning: Duplicate definition found for command 'check_nt' (config file '/etc/na gios3/objects/commands.cfg', starting on line 58)
Error: Could not add object property in file '/etc/nagios3/objects/commands.cfg' on line 60.
Error processing object config files!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: No data was received from host!

Post by slansing »

Okay, so you must have it, can you share the check_nt definition you have in your commands.cfg?
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: No data was received from host!

Post by ofadl »

what i posted earlier was my entire commands file, then i tried adding that definition to it, and i get that duplicate error
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: No data was received from host!

Post by slansing »

Odd, are you sure that it is not reading an additional commands.cfg file? The above was from:

Code: Select all

/etc/nagios3/objects/commands.cfg
Correct?
Locked