in progress
This commit is contained in:
parent
362710ffa8
commit
4ee5939b13
490 changed files with 14041 additions and 0 deletions
312
roles/nagios_server/templates/nagios/checkcommands.cfg.erb
Normal file
312
roles/nagios_server/templates/nagios/checkcommands.cfg.erb
Normal file
|
@ -0,0 +1,312 @@
|
|||
################################################################################
|
||||
# Sample object config file for Nagios
|
||||
#
|
||||
# Read the documentation for more information on this configuration file. I've
|
||||
# provided some comments here, but things may not be so clear without further
|
||||
# explanation, so make sure to read the HTML documentation!
|
||||
#
|
||||
# Last Modified: 12-15-2005
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
||||
################################################################################
|
||||
# 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
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# 'restart httpd'
|
||||
define command {
|
||||
command_name restart_httpd
|
||||
command_line $USER1$/restart_httpd $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ "$HOSTALIAS$" "$SERVICEDESC$" "$SERVICESTATE$"
|
||||
}
|
||||
|
||||
define command {
|
||||
command_name restart_rsyslog
|
||||
command_line $USER1$/restart_rsyslog $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$ $HOSTADDRESS$ "$HOSTALIAS$" "$SERVICEDESC$" "$SERVICESTATE$"
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# SAMPLE SERVICE CHECK COMMANDS
|
||||
#
|
||||
# These are some example service check commands. They may or may not work on
|
||||
# your system, as they must be modified for your plugins. See the HTML
|
||||
# documentation on the plugins for examples of how to configure command definitions.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# 'check_tape'
|
||||
define command{
|
||||
command_name check_tape
|
||||
command_line $USER1$/check_tape
|
||||
}
|
||||
|
||||
# 'check_koji'
|
||||
define command{
|
||||
command_name check_koji
|
||||
command_line $USER1$/check_koji
|
||||
}
|
||||
|
||||
# 'test nrpe'
|
||||
define command{
|
||||
command_name test_nrpe
|
||||
command_line $USER1$/check_nrpe -t 20 -H $HOSTADDRESS$
|
||||
|
||||
}
|
||||
# 'check by nrpe'
|
||||
define command{
|
||||
command_name check_by_nrpe
|
||||
command_line $USER1$/check_nrpe -t 20 -H $HOSTADDRESS$ -c $ARG1$
|
||||
}
|
||||
|
||||
# 'pgsql'
|
||||
define command{
|
||||
command_name check_pgsql
|
||||
command_line $USER1$/check_pgsql -H $HOSTADDRESS$ -d $ARG1$ -p '<%= nagiosDbUserPassword %>' --logname '<%= nagiosDbUser %>'
|
||||
}
|
||||
|
||||
# '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_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 -I $HOSTADDRESS$ -H $ARG1$ -u $ARG2$ -s "$ARG3$"
|
||||
}
|
||||
|
||||
define command{
|
||||
command_name check_ssl_cert
|
||||
command_line $USER1$/check_http -I $HOSTADDRESS$ -H $ARG1$ -C $ARG2$
|
||||
}
|
||||
|
||||
#define command {
|
||||
# command_name check_by_ssh_check_raid
|
||||
# command_line $USER1$/check_by_ssh -t 30 -H $HOSTADDRESS$ "$USER1$/check_raid.py"
|
||||
#}
|
||||
#
|
||||
#define command {
|
||||
# command_name check_by_ssh_check_disk
|
||||
# command_line $USER1$/check_by_ssh -t 30 -H $HOSTADDRESS$ "$USER1$/check_disk -w $ARG1$% -c $ARG2$% -p $ARG3$"
|
||||
#}
|
||||
|
||||
# 'check_ssh' command definition
|
||||
define command{
|
||||
command_name check_ssh
|
||||
command_line $USER1$/check_ssh -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
# 'check_dns' command definition
|
||||
define command{
|
||||
command_name check_dns
|
||||
command_line $USER1$/check_dns -H www.yahoo.com -s $HOSTADDRESS$
|
||||
}
|
||||
|
||||
# 'check_dns_fpo' command definition
|
||||
define command{
|
||||
command_name check_dns_fpo
|
||||
command_line $USER1$/check_dns -H fedoraproject.org -A -s $HOSTADDRESS$
|
||||
}
|
||||
|
||||
# 'check_ftp' command definition
|
||||
define command{
|
||||
command_name check_ftp
|
||||
command_line $USER1$/check_ftp -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
|
||||
# 'check_hpjd' command definition
|
||||
define command{
|
||||
command_name check_hpjd
|
||||
command_line $USER1$/check_hpjd -H $HOSTADDRESS$ -C public
|
||||
}
|
||||
|
||||
|
||||
# 'check_http' command definition
|
||||
define command{
|
||||
command_name check_http
|
||||
command_line $USER1$/check_http -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
|
||||
# 'check_local_disk' command definition
|
||||
define command{
|
||||
command_name check_local_disk
|
||||
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
|
||||
}
|
||||
|
||||
|
||||
# 'check_local_load' command definition
|
||||
define command{
|
||||
command_name check_local_load
|
||||
command_line $USER1$/check_load -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
||||
|
||||
# 'check_local_procs' command definition
|
||||
define command{
|
||||
command_name check_local_procs
|
||||
command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
|
||||
}
|
||||
|
||||
# 'check_local_users' command definition
|
||||
define command{
|
||||
command_name check_local_users
|
||||
command_line $USER1$/check_users -w $ARG1$ -c $ARG2$
|
||||
}
|
||||
|
||||
|
||||
# 'check_nntp' command definition
|
||||
define command{
|
||||
command_name check_nntp
|
||||
command_line $USER1$/check_nntp -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
|
||||
# 'check_ping' command definition
|
||||
define command{
|
||||
command_name check_ping
|
||||
command_line $USER1$/check_ping -4 -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
|
||||
}
|
||||
|
||||
|
||||
# 'check_pop' command definition
|
||||
define command{
|
||||
command_name check_pop
|
||||
command_line $USER1$/check_pop -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
|
||||
# 'check_smtp' command definition
|
||||
define command{
|
||||
command_name check_smtp
|
||||
command_line $USER1$/check_smtp -H $HOSTADDRESS$
|
||||
}
|
||||
|
||||
|
||||
# 'check_tcp' command definition
|
||||
define command{
|
||||
command_name check_tcp
|
||||
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
|
||||
}
|
||||
|
||||
|
||||
# 'check_telnet' command definition
|
||||
define command{
|
||||
command_name check_telnet
|
||||
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 23
|
||||
}
|
||||
|
||||
|
||||
# 'check_udp' command definition
|
||||
define command{
|
||||
command_name check_udp
|
||||
command_line $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$
|
||||
}
|
||||
|
||||
|
||||
# 'check_unbound_80' command definition
|
||||
define command{
|
||||
command_name check_unbound_80
|
||||
command_line $USER1$/check_dig -H $HOSTADDRESS$ -w 5 -c 9 -p 80 -l $ARG1$ -A "+tcp"
|
||||
}
|
||||
|
||||
|
||||
# 'check_unbound_443' command definition
|
||||
define command{
|
||||
command_name check_unbound_443
|
||||
command_line $USER1$/check_dig_ssl -H $HOSTADDRESS$ -w 5 -c 9 -p 443 -L $ARG1$ -l $ARG2$ -A "+tcp"
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# SAMPLE HOST CHECK COMMANDS
|
||||
#
|
||||
################################################################################
|
||||
|
||||
|
||||
# This command checks to see if a host is "alive" by pinging it
|
||||
# The check must result in a 100% packet loss or 5 second (5000ms) round trip
|
||||
# average time to produce a critical error.
|
||||
# Note: Only one ICMP echo packet is sent (determined by the '-p 1' argument)
|
||||
|
||||
# 'check-host-alive' command definition
|
||||
define command{
|
||||
command_name check-host-alive
|
||||
command_line $USER1$/check_ping -4 -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 2
|
||||
}
|
||||
|
||||
# 'check-host-alive-nrpe' is better for hosts that are on vpn.
|
||||
define command{
|
||||
command_name check-host-alive-nrpe
|
||||
command_line $USER1$/check_nrpe -t 20 -H $HOSTADDRESS$
|
||||
}
|
||||
# 'check_bzr' command definition
|
||||
# I'd like this to actually interact with BZR, but I can't find any
|
||||
# proper documentation on the protocol to craft send/expect/quit
|
||||
# strings.
|
||||
define command{
|
||||
command_name check_bzr
|
||||
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 4155
|
||||
}
|
||||
|
||||
# 'check_git' command definition
|
||||
# I'd like this to actually interact with GIT, but I can't find any
|
||||
# proper documentation on the protocol to craft send/expect/quit
|
||||
# strings.
|
||||
define command{
|
||||
command_name check_git
|
||||
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 9418
|
||||
}
|
||||
|
||||
# 'check_email_delivery' command definition
|
||||
define command{
|
||||
command_name check_email_delivery
|
||||
command_line $USER1$/check_email_delivery_epn -H $ARG1$ --mailto $ARG2$ --mailfrom $ARG3$ --username $ARG4$ --password $ARG5$ -w $ARG6$ -c $ARG7$
|
||||
}
|
||||
# 'check_postgres_conns' command definition
|
||||
#define command{
|
||||
# command_name check_postgres_conns
|
||||
# command_line $USER1$/check_by_ssh -t 30 -H $HOSTADDRESS$ "$USER1$/check_procs -u postgres -w $ARG1$ -c $ARG2$ -a $ARG3$"
|
||||
#}
|
||||
|
||||
|
||||
## dummy command nsca/passive checks
|
||||
|
||||
define command{
|
||||
command_name check_dummy
|
||||
command_line $USER1$/check_dummy $ARG1$ $ARG2$
|
||||
}
|
||||
|
||||
# 'check_https' command definition
|
||||
define command{
|
||||
command_name check_https
|
||||
command_line $USER1$/check_http -H $HOSTADDRESS$ -S
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue