Page 1 of 1

how to monitor Web URL

Posted: Thu Apr 21, 2016 8:00 am
by miyappan
how to monitor Web URL. im getting following error. NRPE: Command 'check_website' not defined.

below are the configuration.

Nrpe.cfg

command[check_website]=/usr/local/nagios/libexec/check_website -s //aep.altimetrik.com/Mentor-Mentee
...............................................................................................................................

command.cfg

#'check_website' command definition
define command{
command_name check_website
command_line $USER1$/check_website -H $HOSTADDRESS$ $ARG1$
}

# 'check_website_response' command definition
define command{
command_name check_website_response
command_line $USER1$/check_website_response.sh -u $ARG1$ -w $ARG2$ -c $ARG3$
}


..............................................................................................................

#################################################################################
# HOST DEFINITION #
# #
#################################################################################
define host{
use linux-server
host_name Mentor Mentee
alias MentorMentee
address 192.168.85.40
}

##################################################################################
# SERVICE DEFINITION #
# #
##################################################################################
define service{
use generic-service
host_name Mentor Mentee
service_description Mentor status
check_command check_nrpe!check_website
}

Re: how to monitor Web URL

Posted: Thu Apr 21, 2016 9:47 am
by rkennedy
Which Nrpe.cfg file did you put that line into? Can you paste the whole file here? Did you restart xinetd / NRPE after doing so?

Additionally, is there a specific reason you're running a check_http through NRPE, rather than just using check_http from the Nagios machine?