Hello,<br><br>I'm trying to configure nagios to include the disk full percentage in the subject line of the email notification. For example. Subject: [Nagios] CRITICAL 99% Full on Server1<br><br>My commands currently look something like this for checking disk space.<br>
<br>Anyone have any suggestions for me?<br><br>-JJ<br>=================================================================<br>Check Disk Commands:<br><br>define command{<br> command_name check_local_disk<br> command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$<br>
}<br><br>define command{<br> command_name check_remote_disk<br> command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_remote_disk<br> }<br><br>Email Commands:<br><br># 'host-notify-by-email' command definition<br>
define command{<br> command_name host-notify-by-email<br> command_line /usr/bin/printf "Subject: [Nagios] $SERVICESTATE$: $SERVICEDESC$ $HOSTNAME$\nFrom: nagios@$HOSTNAME$.<a href="http://mascorp.com">mascorp.com</a>\n\n ***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/sbin/exim "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$<br>
}<br><br><br>Service:<br><br>define service{<br> use local-service ; Name of service template to use<br> use generic-service ; Name of service template<br>
hostgroup_name servers<br> service_description DISK SPACE<br> is_volatile 0<br> check_period 24x7<br> max_check_attempts 3<br>
normal_check_interval 3<br> retry_check_interval 1<br> contact_groups admins<br> notification_interval 1440<br> notification_period 24x7<br>
notification_options w,u,c,r<br> check_command check_nrpe!check_remote_disk!4%!2%!<br> }<br><br><br>