/etc/shinken/commands.cfg is in shinken-common 2.0.3-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 | ################################################################################
# commands.cfg - Main commands definition file
#===============================================================================
# This file show sample command definitions which are commonly used to monitor
# systems, websites, databases, etc.
#
# See also "pack/*/*/commands.cfg".
#
# You need the Nagios plugins installed under $PLUGINSDIR$ (see resource.cfg)
# in order to use most of these commands. For your own network you may need
# other plugins, which you can write yourself or find at Nagios Exchange.
#
# This file has three sections for easier reading:
# - Network_checks
# - Host_alive_checks
# - Notification_commands
# (You can use section names to jump there)
#===============================================================================
# Reference: http://www.shinken-monitoring.org/wiki/official/configuringshinken/configobjects/command
# Nagios Plugins: http://www.nagios.org/download/plugins/
# Nagios Exchange (Plugins repository): http://exchange.nagios.org/
################################################################################
################################################################################
# Network_checks
#===============================================================================
# Download:
# - Included in Nagios Plugins.
# - check_nrpe:
# http://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details
################################################################################
## Check a TCP port
# This plugin tests TCP connections with the specified host (or unix socket).
# check_tcp -H host -p port [-w <warning time>] [-c <critical time>] [-s <send
# string>] [-e <expect string>] [-q <quit string>][-m <maximum bytes>] [-d
# <delay>] [-t <timeout seconds>] [-r <refuse state>] [-M <mismatch state>]
# [-v] [-4|-6] [-j] [-D <warn days cert expire>[,<crit days cert expire>]] [-S
# <use SSL>] [-E]
define command {
command_name check_tcp
command_line $PLUGINSDIR$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
}
## Check a DNS entry
## This plugin test the DNS service on the specified host using dig
# check_dig -l <query_address> [-H <host>] [-p <server port>] [-T <query type>]
# [-w <warning interval>] [-c <critical interval>] [-t <timeout>] [-a <expected
# answer address>] [-v]
define command {
command_name check_dig
command_line $PLUGINSDIR$/check_dig -H $HOSTADDRESS$ -l $ARG1$
}
## Check ping command
## Use ping to check connection statistics for a remote host.
# check_ping -H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>% [-p packets]
# [-t timeout] [-4|-6]
define command {
command_name check_ping
command_line $PLUGINSDIR$/check_ping -H $HOSTADDRESS$ -w 3000,100% -c 5000,100% -p 1
}
## Ask a NRPE agent
## Requires that you have the NRPE daemon running on the remote host.
# check_nrpe -H <host> [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a
# <arglist...>]
define command {
command_name check_nrpe
command_line $PLUGINSDIR$/check_nrpe -H $HOSTADDRESS$ -t 9 -u -c $ARG1$
}
## Ask a NRPE agent with arguments (passing arguments may be a security risk)
## Requires that you have the NRPE daemon running on the remote host.
# check_nrpe -H <host> [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a
# <arglist...>]
define command {
command_name check_nrpe_args
command_line $PLUGINSDIR$/check_nrpe -H $HOSTADDRESS$ -t 9 -u -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$ $ARG5$
}
# Check SNMP service presence on target
define command {
command_name check_snmp_service
command_line $PLUGINSDIR$/check_snmp_service -H $HOSTADDRESS$ -C $SNMPCOMMUNITYREAD$
}
# Compare time between target and shinken
# Doc : http://nagios.frank4dd.com/plugins/manual/check_snmp_time.htm
# Plugin : http://nagios.frank4dd.com/plugins/source/check_snmp_time.pl
define command {
command_name check_snmp_time
command_line $PLUGINSDIR$/check_snmp_time.pl -H $HOSTADDRESS$ -C $SNMPCOMMUNITYREAD$ -f -w $ARG1$ -c $ARG2$
}
# 'check_local_disk' command definition
define command{
command_name check_local_disk
command_line $PLUGINSDIR$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}
# 'check_local_load' command definition
define command{
command_name check_local_load
command_line $PLUGINSDIR$/check_load -w $ARG1$ -c $ARG2$
}
# 'check_local_procs' command definition
define command{
command_name check_local_procs
command_line $PLUGINSDIR$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
}
# 'check_local_users' command definition
define command{
command_name check_local_users
command_line $PLUGINSDIR$/check_users -w $ARG1$ -c $ARG2$
}
# 'check_local_swap' command definition
define command{
command_name check_local_swap
command_line $PLUGINSDIR$/check_swap -w $ARG1$ -c $ARG2$
}
# 'check_ssh' command definition
define command{
command_name check_ssh
command_line $PLUGINSDIR$/check_ssh $ARG1$ $HOSTADDRESS$
}
# 'check_http' command definition
define command{
command_name check_http
command_line $PLUGINSDIR$/check_http -I $HOSTADDRESS$ $ARG1$
}
################################################################################
# application performance monitoring checks (end user experience)
#===============================================================================
# Download:
# - Included in shinken.
# This check is in alpha release and should be enabled with the following
# installer command : ./install --enableeue
# This is based on cucumber (see http://cukes.info)
################################################################################
define command {
command_name check_eue
command_line /usr/bin/cucumber --format Eue::Shinken $PLUGINSDIR$/eue/$ARG1$.feature
timeout 60
}
################################################################################
# Host_alive_checks
################################################################################
define command {
command_name check_host_alive
command_line $PLUGINSDIR$/check_ping -H $HOSTADDRESS$ -w 1000,100% -c 3000,100% -p 1
}
################################################################################
# Notification_commands
#===============================================================================
# Download:
# - notify-*-by-email:
# Use 'printf' and 'mail' system tools. (you may need to update their
# paths, ie. "/bin/mail" instead of "/usr/bin/mail").
# - notify-*-by-xmpp:
# The Python script is in the libexec folder of the Shinken's sources.
# It need the Python XMPP module.
# On supported distributions, this addon can be installed and configured by
# ./install -a notify_by_xmpp
# - notify-*-by-android-sms:
# Use Shinken reactionner (see shinken-specific.cfg).
################################################################################
## Notify Host by Email
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "Shinken Notification\n\nType:$NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\nDate/Time: $DATE$ $TIME$\n" | /usr/bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$" $CONTACTEMAIL$
}
## Notify Service by Email
define command {
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "Shinken Notification\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATE$ $TIME$\nAdditional Info : $SERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTNAME$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
## Notify Host by XMPP
define command {
command_name notify-host-by-xmpp
command_line $PLUGINSDIR$/notify_by_xmpp.py -a $PLUGINSDIR$/notify_by_xmpp.ini "Host '$HOSTNAME$' is $HOSTSTATE$ - Info : $HOSTOUTPUT$" $CONTACTEMAIL$
}
## Notify Service by XMPP
define command {
command_name notify-service-by-xmpp
command_line $PLUGINSDIR$/notify_by_xmpp.py -a $PLUGINSDIR$/notify_by_xmpp.ini "$NOTIFICATIONTYPE$ $HOSTNAME$ $SERVICEDESC$ $SERVICESTATE$ $SERVICEOUTPUT$ $LONGDATETIME$" $CONTACTEMAIL$
}
## Notify Host by SMS (through an Android phone)
# You need both reactionner_tag and module_type in most cases!
define command {
command_name notify-host-by-android-sms
command_line android_sms $CONTACTPAGER$ Host: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $HOSTSTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$
reactionner_tag android_sms
module_type android_sms
}
## Notify Service by SMS (through an Android phone)
# You need both reactionner_tag and module_type in most cases!
define command {
command_name notify-service-by-android-sms
command_line android_sms $CONTACTPAGER$ Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $OUTPUT$\nDate: $DATETIME$
reactionner_tag android_sms
module_type android_sms
}
################################################################################
# Skonf related commands (EXPERIMENTAL!)
#===============================================================================
define command {
command_name restart_shinken
command_line sudo /etc/init.d/shinken restart
}
define command {
command_name reload_shinken
command_line sudo /etc/init.d/shinken reload
}
define command {
command_name configuration_check
command_line sudo /etc/init.d/shinken check
}
|