mirror of https://github.com/zulip/zulip.git
174 lines
8.7 KiB
INI
174 lines
8.7 KiB
INI
###############################################################################
|
|
# 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
|
|
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$
|
|
}
|
|
|
|
|
|
################################################################################
|
|
# 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
|
|
}
|
|
|
|
define command{
|
|
command_name check_remote_disk
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p 22 -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_disk -W$ARG1$ -K$ARG2$ -w $ARG1$ -c $ARG2$ -A -l'
|
|
}
|
|
|
|
define command{
|
|
command_name check_remote_load
|
|
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$'
|
|
}
|
|
|
|
define command{
|
|
command_name check_zephyr_mirror_forwarding
|
|
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'
|
|
}
|
|
|
|
define command{
|
|
command_name check_personal_zephyr_mirrors
|
|
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_personal_zephyr_mirrors'
|
|
}
|
|
|
|
define command{
|
|
command_name check_user_zephyr_mirror_liveness
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_user_zephyr_mirror_liveness'
|
|
}
|
|
|
|
define command{
|
|
command_name check_debian_packages
|
|
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'
|
|
}
|
|
|
|
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 0.debian.pool.ntp.org -w .5 -c 1'
|
|
}
|
|
|
|
define command{
|
|
command_name check_send_receive_time
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_send_receive_time --nagios --site=https://$HOSTADDRESS$'
|
|
}
|
|
|
|
define command{
|
|
command_name check_queue_worker_errors
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_queue_worker_errors'
|
|
}
|
|
|
|
define command{
|
|
command_name check_postgres
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p 22 -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_postgres.pl --dbname=$ARG1$ --dbuser=$ARG2$ --action $ARG3$'
|
|
}
|
|
|
|
define command{
|
|
command_name check_postgres_alert_args
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p 22 -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_postgres.pl --dbname=$ARG1$ --dbuser=$ARG2$ --action $ARG3$ --warning="$ARG4$" --critical="$ARG5$"'
|
|
}
|
|
|
|
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 zulip -c 1:1 -a "/home/zulip/zulip/bots/sync-public-streams"'
|
|
}
|
|
|
|
define command{
|
|
command_name check_rabbitmq_queues
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p $ARG1$ -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_rabbitmq_queues'
|
|
}
|
|
|
|
define command{
|
|
command_name check_rabbitmq_consumers
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p 22 -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_rabbitmq_consumers $ARG1$'
|
|
}
|
|
|
|
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$'
|
|
}
|
|
|
|
define command {
|
|
command_name check_named_procs
|
|
command_line /usr/lib/nagios/plugins/check_procs -C $ARG1$ -w $ARG2$ -c $ARG3$
|
|
}
|
|
|
|
define command {
|
|
command_name check_remote_arg_string
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -p 22 -l nagios -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_procs -a "$ARG1$" -w $ARG2$ -c $ARG3$'
|
|
}
|
|
|
|
define command {
|
|
command_name check_fts_update_log
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_fts_update_log'
|
|
}
|
|
|
|
define command {
|
|
command_name check_pg_replication_lag
|
|
command_line /usr/lib/nagios/plugins/check_pg_replication_lag
|
|
}
|
|
|
|
define command {
|
|
command_name check_postgres_backup
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_postgres_backup'
|
|
}
|
|
|
|
define command {
|
|
command_name check_email_mirror
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_email_mirror'
|
|
}
|
|
|
|
define command {
|
|
command_name check_email_deliverer_process
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_email_deliverer_process'
|
|
}
|
|
|
|
define command {
|
|
command_name check_email_deliverer_backlog
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_email_deliverer_backlog'
|
|
}
|
|
|
|
define command{
|
|
command_name check_website_response
|
|
command_line /usr/lib/nagios/plugins/check_website_response.sh -u $ARG1$ -w $ARG2$ -c $ARG3$
|
|
}
|
|
|
|
define command{
|
|
command_name check_worker_memory
|
|
command_line /usr/lib/nagios/plugins/check_by_ssh -l zulip -t 30 -i /var/lib/nagios/.ssh/id_rsa -H $HOSTADDRESS$ -C '/usr/lib/nagios/plugins/check_worker_memory'
|
|
}
|
|
|