# Internal commands: contact="define contact { contact_name $1 alias $3 host_notification_period 24x7 service_notification_period 24x7 host_notification_options d,r service_notification_options c,r host_notification_commands host-notify-by-email service_notification_commands notify-by-email email $2 }" ncontact="define contact { contact_name $1 alias $3 host_notification_period none service_notification_period none host_notification_options n service_notification_options n host_notification_commands host-notify-by-email service_notification_commands notify-by-email email $2 }" define host { max_check_attempts 3 check_command check-host-alive notification_interval 240 notification_period 24x7 notification_options d,r name host_templ register 0 } host="define host { use host_templ host_name $1 alias $3 address $2 parents $4 }" host_wop="define host { use host_templ host_name $1 alias $3 address $2 }" phost="define host { use host_templ host_name $1 alias $3 address $2 parents $4 } define service { host_name $1 service_description PING check_period 24x7 max_check_attempts 3 normal_check_interval 3 retry_check_interval 1 contact_groups $5 notification_interval 240 notification_period 24x7 notification_options c,r check_command check_ping_u!100.0,30%!500.0,60% }" hostdep="define hostdependency { dependent_host_name $2 host_name $1 notification_failure_criteria o,d }" command="define command { command_name $1 command_line $2 }" contactgroup="define contactgroup { contactgroup_name $1 alias $2 members $3 }" hostgroup="define hostgroup { hostgroup_name $1 alias $2 contact_groups $3 members $4 }" hostgroupescalation="define hostgroupescalation { hostgroup_name $1 first_notification $2 last_notification $3 notification_interval $4 contact_groups $5 }" # Commands define command { command_name check_ping_u command_line /usr/lib/nagios/plugins/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5 } define command { command_name check_ssh command_line /usr/lib/nagios/plugins/check_ssh -H $HOSTADDRESS$ } define command { command_name check_https command_line /usr/lib/nagios/plugins/check_http -H $HOSTADDRESS$ --ssl } define command { command_name check_imap command_line /usr/lib/nagios/plugins/check_imap -H $HOSTADDRESS$ } define command { command_name check_imapt command_line /usr/lib/nagios/plugins/check_imap -H $HOSTADDRESS$ -p $ARG1$ } define command { command_name check_smtps command_line /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p 465 } define command { command_name check_pop3s command_line /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p 995 } define command { command_name check_imaps command_line /usr/lib/nagios/plugins/check_tcp -H $HOSTADDRESS$ -p 993 } define command { command_name check_ica command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 1494 } define command { command_name check_pgsql_local command_line /usr/lib/nagios/plugins/check_pgsql } # Services ping="define service { host_name $1 service_description PING check_period 24x7 max_check_attempts 3 normal_check_interval 3 retry_check_interval 1 contact_groups $2 notification_interval 240 notification_period 24x7 notification_options c,r check_command check_ping_u!100.0,30%!500.0,60% }" ping_slow="define service { host_name $1 service_description PING check_period 24x7 max_check_attempts 3 normal_check_interval 3 retry_check_interval 1 contact_groups $2 notification_interval 240 notification_period 24x7 notification_options c,r check_command check_ping_u!2000.0,40%!4000.0,80% }" service_templ="5min" define service { name 5min register 0 service_description TEMPLATE SERVICE check_period 24x7 max_check_attempts 1 normal_check_interval 5 retry_check_interval 1 notification_interval 240 notification_period 24x7 notification_options c,r } define service { name 30min register 0 service_description TEMPLATE SERVICE check_period 24x7 max_check_attempts 1 normal_check_interval 30 retry_check_interval 2 notification_interval 240 notification_period 24x7 notification_options c,r } ssh="define service { use $service_templ host_name $1 service_description SSH contact_groups $2 check_command check_ssh }" http="define service { use $service_templ host_name $1 service_description HTTP contact_groups $2 check_command check_http }" https="define service { use $service_templ host_name $1 service_description HTTPS contact_groups $2 check_command check_https }" smtp="define service { use $service_templ host_name $1 service_description SMTP contact_groups $2 check_command check_smtp }" psql="define service { use $service_templ host_name $1 service_description POSTGRES contact_groups $2 check_command check_tcp!5432 }" pgsql_local="define service { use $service_templ host_name $1 service_description POSTGRES contact_groups $2 check_command check_pgsql_local }" dnet="define service { use $service_templ host_name $1 service_description DNET contact_groups $2 check_command check_tcp!2064 }" ftp="define service { use $service_templ host_name $1 service_description FTP contact_groups $2 check_command check_ftp }" dns="define service { use $service_templ host_name $1 service_description DNS contact_groups $2 check_command check_dns }" imap="define service { use $service_templ host_name $1 service_description IMAP contact_groups $2 check_command check_imap }" pop3="define service { use $service_templ host_name $1 service_description POP3 contact_groups $2 check_command check_pop }" imaps="define service { use $service_templ host_name $1 service_description IMAPS contact_groups $2 check_command check_imaps }" smtps="define service { use $service_templ host_name $1 service_description SMTPS contact_groups $2 check_command check_smtps }" pop3s="define service { use $service_templ host_name $1 service_description POP3S contact_groups $2 check_command check_pop3s }" telnet="define service { use $service_templ host_name $1 service_description TELNET contact_groups $2 check_command check_telnet }" ica="define service { use $service_templ host_name $1 service_description ICA contact_groups $2 check_command check_ica }"