Page 1 of 1

No data was received from host!

Posted: Fri Jun 07, 2013 8:16 am
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

Re: No data was received from host!

Posted: Fri Jun 07, 2013 8:19 am
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

Re: No data was received from host!

Posted: Fri Jun 07, 2013 8:26 am
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

Re: No data was received from host!

Posted: Fri Jun 07, 2013 9:47 am
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

Re: No data was received from host!

Posted: Fri Jun 07, 2013 9:58 am
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!

Re: No data was received from host!

Posted: Fri Jun 07, 2013 10:05 am
by slansing
Okay, so you must have it, can you share the check_nt definition you have in your commands.cfg?

Re: No data was received from host!

Posted: Fri Jun 07, 2013 10:08 am
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

Re: No data was received from host!

Posted: Fri Jun 07, 2013 3:03 pm
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?