check_nt returns UNKNOWN - No service/process specified

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
tduncan
Posts: 4
Joined: Tue Aug 11, 2015 1:11 pm

check_nt returns UNKNOWN - No service/process specified

Post by tduncan »

check_nt

Returns the following a warning in the web interface
UNKNOWN No service/process specified



But when ran at the command line it returns OK
check_nt -H 10.1.1.1 -p 12489 -v SERVICESTATE -l MSExchangeRPC
OK: All services are in their appropriate state.



MYSERVER.cfg contains...

define service{
use generic-service
host_name MYSERVER
service_description MSExchangeRPC
check_command check_nt!SERVICESTATE!-p 12489 -d SHOWALL -l MSExchangeRPC
}



Any help is appreciated.

Nagios® Core™
Version 3.2.3
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: check_nt returns UNKNOWN - No service/process specified

Post by jolson »

In addition to the service.cfg that you provided, I would like to see your commands.cfg file - typically located at /usr/local/nagios/etc/commands.cfg. The output should look something like this:

Code: Select all

define command {
       command_name                             check_nt
       command_line                             $USER1$/check_nt -H $HOSTADDRESS$ -p $USER7$ -s $USER8$ -v $ARG1$ $ARG2$
}
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
tduncan
Posts: 4
Joined: Tue Aug 11, 2015 1:11 pm

Re: check_nt returns UNKNOWN - No service/process specified

Post by tduncan »

cat /etc/nagios3/commands.cfg

###############################################################################
# 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/Tim
e: $LONGDATETIME$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}

# '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\nAdditional Info:\n\n$SERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}





################################################################################
# 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-p
erfdata.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$SERVICEOU
TPUT$\t$SERVICEPERFDATA$\n" >> /var/lib/nagios3/service-perfdata.out
}
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: check_nt returns UNKNOWN - No service/process specified

Post by jolson »

Your check_nt command must be defined elsewhere. You might need to grep around to find the file that defines the check_nt command - I would like the output of that file.

Code: Select all

grep -A2 -B2 -R command_name.*check_nt /etc/nagios3/ 
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
Locked