ansible/roles/nagios_server/files/nagios/commands/httpd.cfg
Silvie Chlupova debd3c5b7e copr: define new command for nagios
We need to use --ssl and also -f follow
2022-01-20 15:26:53 +01:00

89 lines
2.8 KiB
INI

##
## This file has the commands to check and restart general httpd services
## and websites.
##
################################################################################
# COMMAND DEFINITIONS
#
# SYNTAX:
#
# define command{
# template <templatename>
# name <objectname>
# command_name <commandname>
# command_line <commandline>
# }
#
# WHERE:
#
# <templatename> = object name of another command definition that should be
# used as a template for this definition (optional)
# <objectname> = object name of command definition, referenced by other
# command definitions that use it as a template (optional)
# <commandname> = name of the command, as recognized/used by Nagios
# <commandline> = command line
#
################################################################################
# 'reload httpd'
define command {
command_name restart_httpd
command_line $USER1$/restart_httpd $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ "$HOSTALIAS$" "$SERVICEDESC$" "$SERVICESTATE$"
}
#
# 'check_website_publiclist' command definition
define command{
command_name check_website_publiclist
command_line $USER1$/check_http -w 60 -c 80 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$"
}
# 'check_website' command definition
define command{
command_name check_website
command_line $USER1$/check_http -w 30 -c 40 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$"
}
define command{
command_name check_website_follow
command_line $USER1$/check_http -w 30 -c 40 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$" -f follow
}
define command{
command_name check_website_follow_ssl
command_line $USER1$/check_http -w 30 -c 40 --ssl --sni -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$" -f follow
}
define command{
command_name check_website_ppc
command_line $USER1$/check_http -w 300 -c 400 -I $HOSTADDRESS$ -H $ARG1$ -u "$ARG2$" -s "$ARG3$"
}
define command{
command_name check_website_ssl
command_line $USER1$/check_http -w 30 -c 40 --ssl --sni -I $HOSTADDRESS$ -H $ARG1$ -u $ARG2$ -s "$ARG3$"
}
define command{
command_name check_ssl_cert
command_line $USER1$/check_http --sni -I $HOSTADDRESS$ -H $ARG1$ -C $ARG2$
}
define command{
command_name check_website_publiclist_ssl
command_line $USER1$/check_http -w 40 -c 60 --ssl -I $HOSTADDRESS$ -H $ARG1$ -u $ARG2$ -s "$ARG3$"
}
# 'check_http' command definition
define command{
command_name check_http
command_line $USER1$/check_http -H $HOSTADDRESS$
}
# 'check_https' command definition
define command{
command_name check_https
command_line $USER1$/check_http -H $HOSTADDRESS$ --ssl
}