2012-11-01 15:47:50 +01:00
|
|
|
###############################################################################
|
|
|
|
# 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/Time: $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
|
2012-11-15 23:53:02 +01:00
|
|
|
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$LONGSERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
|
2012-11-01 15:47:50 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# 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-perfdata.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$SERVICEOUTPUT$\t$SERVICEPERFDATA$\n" >> /var/lib/nagios3/service-perfdata.out
|
|
|
|
}
|
|
|
|
|
2012-11-16 16:42:52 +01:00
|
|
|
define command{
|
|
|
|
command_name check_remote_disk
|
2012-11-21 20:32:26 +01:00
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_disk -w $ARG2$ -c $ARG3$ -p $ARG4$'
|
2012-11-16 16:42:52 +01:00
|
|
|
}
|
2012-11-01 15:47:50 +01:00
|
|
|
|
2012-11-16 16:42:52 +01:00
|
|
|
define command{
|
|
|
|
command_name check_remote_load
|
2012-11-21 20:32:26 +01:00
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_load -w $ARG2$ -c $ARG3$'
|
2012-11-16 16:42:52 +01:00
|
|
|
}
|
2012-11-16 17:19:53 +01:00
|
|
|
|
|
|
|
define command{
|
|
|
|
command_name check_zephyr_mirror_forwarding
|
2012-11-21 20:32:26 +01:00
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_zephyr_mirror'
|
2012-11-16 17:19:53 +01:00
|
|
|
}
|
2012-11-16 17:20:12 +01:00
|
|
|
|
|
|
|
define command{
|
|
|
|
command_name check_user_zephyr_mirror_liveness
|
2012-12-17 18:11:03 +01:00
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l humbug -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_user_zephyr_mirror_liveness'
|
2012-11-16 17:20:12 +01:00
|
|
|
}
|
2012-11-21 20:17:15 +01:00
|
|
|
|
|
|
|
define command{
|
|
|
|
command_name check_debian_packages
|
2012-11-21 20:32:26 +01:00
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_debian_packages'
|
2012-11-21 20:17:15 +01:00
|
|
|
}
|
2013-01-02 23:49:05 +01:00
|
|
|
|
|
|
|
define command{
|
|
|
|
command_name check_ntp_time
|
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_ntp_time -H time.mit.edu -w .5 -c 1'
|
|
|
|
}
|
2013-01-03 16:56:36 +01:00
|
|
|
|
|
|
|
define command{
|
|
|
|
command_name check_feedback_bot
|
2013-04-10 23:40:48 +02:00
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -u humbug -c 1:1 -a "python /home/humbug/humbug/bots/feedback-bot"'
|
2013-01-03 16:56:36 +01:00
|
|
|
}
|
2013-01-30 16:12:15 +01:00
|
|
|
|
|
|
|
define command{
|
|
|
|
command_name check_send_receive_time
|
2013-04-16 16:56:41 +02:00
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l humbug -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_send_receive_time --nagios --site=https://$HOSTADDRESS$'
|
2013-01-30 16:12:15 +01:00
|
|
|
}
|
2013-01-30 16:14:38 +01:00
|
|
|
|
|
|
|
define command{
|
|
|
|
command_name check_postgres
|
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l humbug -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_postgres.pl --dbuser=humbug --action $ARG2$'
|
|
|
|
}
|
|
|
|
|
|
|
|
define command{
|
|
|
|
command_name check_postgres_alert_args
|
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l humbug -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_postgres.pl --dbuser=humbug --action $ARG2$ --warning="$ARG3" --critical="$ARG4"'
|
|
|
|
}
|
2013-01-30 15:59:41 +01:00
|
|
|
|
|
|
|
define command{
|
|
|
|
command_name check_process_user_activity
|
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -u humbug -c 1:1 -a "manage.py process_user_activity"'
|
|
|
|
}
|
2013-02-05 19:17:49 +01:00
|
|
|
|
2013-04-05 23:15:08 +02:00
|
|
|
define command{
|
|
|
|
command_name check_process_mailchimp_signups
|
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -u humbug -c 1:1 -a "manage.py subscribe_new_users"'
|
|
|
|
}
|
|
|
|
|
2013-04-09 03:39:36 +02:00
|
|
|
define command{
|
|
|
|
command_name check_send_confirmation_emails
|
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -u humbug -c 1:1 -a "manage.py send_confirmation_emails"'
|
|
|
|
}
|
|
|
|
|
2013-02-05 19:17:49 +01:00
|
|
|
define command{
|
|
|
|
command_name check_sync_public_streams
|
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -u humbug -c 1:1 -a "/home/humbug/humbug/bots/sync-public-streams"'
|
|
|
|
}
|
2013-02-19 18:06:25 +01:00
|
|
|
|
|
|
|
define command{
|
|
|
|
command_name check_rabbitmq_queues
|
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l humbug -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_rabbitmq_queues'
|
|
|
|
}
|
2013-02-19 21:29:38 +01:00
|
|
|
|
2013-04-16 20:07:53 +02:00
|
|
|
define command{
|
|
|
|
command_name check_rabbitmq_consumers
|
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l humbug -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_rabbitmq_consumers'
|
|
|
|
}
|
|
|
|
|
2013-02-19 21:29:38 +01:00
|
|
|
define command{
|
|
|
|
command_name check_remote_swap
|
|
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_swap -w $ARG2$ -c $ARG3$'
|
|
|
|
}
|