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
No data was received from host!
Re: No data was received from host!
Hi ofadl,
Can you post the services.cfg and commands.cfg for the windows host being monitored?
Thank you.
Kind Regards,
Gary Shergill
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!
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
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
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: No data was received from host!
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
http://nagios.sourceforge.net/docs/3_0/ ... ndows.html
Re: No data was received from host!
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!
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!
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: No data was received from host!
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!
what i posted earlier was my entire commands file, then i tried adding that definition to it, and i get that duplicate error
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: No data was received from host!
Odd, are you sure that it is not reading an additional commands.cfg file? The above was from:
Correct?
Code: Select all
/etc/nagios3/objects/commands.cfg