############################################################################### # DELL_COMMANDS.CFG - SAMPLE COMMAND DEFINITIONS FOR NAGIOS Core # # Last Modified: 8-Oct-2014 # # NOTES: This config file provides you with some example command definitions # that you can reference in host, service, and contact definitions. # # You don't need to keep commands in a separate file from your other # object definitions. This has been done just to make things easier to # understand. # Copyright (c) 2014 Dell Inc. # All Rights Reserved. ############################################################################### ################################################################################ # # SAMPLE NOTIFICATION COMMANDS # # These are some example notification commands. They may or may not work on # your system without modification. As an example, some systems will require # you to use "/usr/bin/mailx" instead of "/usr/bin/mail" in the commands below. # ################################################################################ define command{ command_name notify-dell-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" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$ } # 'notify-service-by-email' command definition define command{ command_name notify-dell-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" | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ } define command{ command_name check_dell_oob_server_component_snmp command_line perl /usr/local/monitoring/nagios/dell/scripts/dell_check_idrac_snmp.pl -H $HOSTADDRESS$ -F $ARG1$ -i $ARG2$ } define command{ command_name check_dell_oob_server_component_wsman command_line perl /usr/local/monitoring/nagios/dell/scripts/dell_check_idrac_wsman.pl -H $HOSTADDRESS$ -F $ARG1$ -i $ARG2$ } ################################################################################ # # 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: Five ICMP echo packets are sent (determined by the '-p 5' argument) # 'check-host-alive' command definition define command{ command_name check-dell-host-alive command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5 }